Skip to content

Commit

Permalink
Merge branch 'next' into feature/tile-card-icon-hold-and-icon-double-tap
Browse files Browse the repository at this point in the history
  • Loading branch information
martindybal authored Sep 12, 2024
2 parents f36d66d + 00c054d commit dcb5d86
Show file tree
Hide file tree
Showing 43 changed files with 1,139 additions and 629 deletions.
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ source/_integrations/ld2410_ble.markdown @930913
source/_integrations/leaone.markdown @bdraco
source/_integrations/led_ble.markdown @bdraco
source/_integrations/legrand.markdown @cgtobi
source/_integrations/lektrico.markdown @lektrico
source/_integrations/leviton_z_wave.markdown @home-assistant/z-wave
source/_integrations/lg_netcast.markdown @Drafteed @splinter98
source/_integrations/lidarr.markdown @tkdrob
Expand Down
27 changes: 27 additions & 0 deletions source/_docs/automation/trigger.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ An {% term automation %} can be triggered by an {% term event %}, a certain {% t
- [Sentence trigger](#sentence-trigger)
- [Multiple triggers](#multiple-triggers)
- [Multiple Entity IDs for the same Trigger](#multiple-entity-ids-for-the-same-trigger)
- [Disabling a trigger](#disabling-a-trigger)
- [Merging lists of triggers](#merging-lists-of-triggers)

## Trigger ID

Expand Down Expand Up @@ -1049,3 +1051,28 @@ blueprint:
```

{% endraw %}

## Merging lists of triggers

{% caution %}
This feature requires Home Assistant version 2024.10 or later. If using this in a blueprint, set the `min_version` for the blueprint to at least this version.
{% endcaution %}

In some advanced cases (like for blueprints with trigger selectors), it may be necessary to insert a second list of triggers into the main trigger list. This can be done by adding a dictionary in the main trigger list with the sole key `triggers`, and the value for that key contains a second list of triggers. These will then be flattened into a single list of triggers. For example:

```yaml
blueprint:
name: Nested Trigger Blueprint
domain: automation
input:
usertrigger:
selector:
trigger:
trigger:
- platform: event
event_type: manual_event
- triggers: !input usertrigger
```

This blueprint automation can then be triggered either by the fixed manual_event trigger, or additionally by any triggers selected in the trigger selector. This is also applicable for `wait_for_trigger` action.
172 changes: 172 additions & 0 deletions source/_docs/configuration/templating.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,178 @@ See: [Python regular expression operations](https://docs.python.org/3/library/re
- Filter `value | regex_findall(find='', ignorecase=False)` will find all regex matches of the find expression in `value` and return the array of matches.
- Filter `value | regex_findall_index(find='', index=0, ignorecase=False)` will do the same as `regex_findall` and return the match at index.

## Merge action responses

Using action responses we can collect information from various entities at the same time.
Using the `merge_response` template we can merge several responses into one list.

| Variable | Description |
| -------------- | ---------------------------------- |
| `value` | The incoming value (must be an action response). |

The `entity_id` key is appended to each dictionary within the template output list as a reference of origin. If the input dictionary already contains an `entity_id` key, the template will fail.

The `value_key` key is appended to each dictionary within the template output list as a reference of origin if the original service call was providing a list of dictionaries, for example, `calendar.get_events` or `weather.get_forecasts`.

Examples of these two keys can be seen in [example merge calendar action response](#example-merge-calendar-action-response) template output.


### Example

```yaml
{% raw %}
{% set combined_forecast = merge_response(response) %}
{{ combined_forecast[0].precipitation | float(0) | round(1) }}
{% endraw %}
```

### Example how to sort

Sorting the dictionaries within the list based on a specific key can be done directly by using Jinja's `sort` filter.

```yaml
{% raw %}
{{ merge_response(calendar_response) | sort(attribute='start') | ... }}
{% endraw %}
```

### Example merge calendar action response

```json
{
"calendar.sports": {
"events": [
{
"start": "2024-02-27T17:00:00-06:00",
"end": "2024-02-27T18:00:00-06:00",
"summary": "Basketball vs. Rockets",
"description": "",
}
]
},
"calendar.local_furry_events": {"events": []},
"calendar.yap_house_schedules": {
"events": [
{
"start": "2024-02-26T08:00:00-06:00",
"end": "2024-02-26T09:00:00-06:00",
"summary": "Dr. Appt",
"description": "",
},
{
"start": "2024-02-28T20:00:00-06:00",
"end": "2024-02-28T21:00:00-06:00",
"summary": "Bake a cake",
"description": "something good",
}
]
},
}
```

```yaml
{% raw %}
{{ merge_response(response_variable) }}
{% endraw %}
```

```json
[
{
"description": "",
"end": "2024-02-27T18:00:00-06:00",
"entity_id": "calendar.sports",
"start": "2024-02-27T17:00:00-06:00",
"summary": "Basketball vs. Rockets",
"value_key": "events"
},
{
"description": "",
"end": "2024-02-26T09:00:00-06:00",
"entity_id": "calendar.yap_house_schedules",
"start": "2024-02-26T08:00:00-06:00",
"summary": "Dr. Appt",
"value_key": "events"
},
{
"description": "something good",
"end": "2024-02-28T21:00:00-06:00",
"entity_id": "calendar.yap_house_schedules",
"start": "2024-02-28T20:00:00-06:00",
"summary": "Bake a cake",
"value_key": "events"
}
]
```

### Example non-list action responses

```json
{
"vacuum.deebot_n8_plus_1": {
"header": {
"ver": "0.0.1",
},
"payloadType": "j",
"resp": {
"body": {
"msg": "ok",
},
},
},
"vacuum.deebot_n8_plus_2": {
"header": {
"ver": "0.0.1",
},
"payloadType": "j",
"resp": {
"body": {
"msg": "ok",
},
},
},
}
```

```yaml
{% raw %}
{{ merge_response(response_variable) }}
{% endraw %}
```

```json
[
{
"entity_id": "vacuum.deebot_n8_plus_1",
"header": {
"ver": "0.0.1",
},
"payloadType": "j",
"resp": {
"body": {
"msg": "ok",
},
},
},
{
"entity_id": "vacuum.deebot_n8_plus_2",
"header": {
"ver": "0.0.1",
},
"payloadType": "j",
"resp": {
"body": {
"msg": "ok",
},
},
},
]
```

## Processing incoming data

The other part of templating is processing incoming data. It allows you to modify incoming data and extract only the data you care about. This will only work for platforms and integrations that mention support for this in their documentation.
Expand Down
19 changes: 17 additions & 2 deletions source/_integrations/amazon_polly.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ profile_name:
region_name:
description: The region identifier to connect to.
required: false
type: [string, list]
type: string
default: us-east-1
text_type:
description: "Whether to interpret messages as `text` or as [`ssml`](https://docs.aws.amazon.com/polly/latest/dg/ssml.html) by default."
Expand All @@ -76,7 +76,7 @@ sample_rate:
type: string
default: 22050 for MP3 and Ogg Vorbis, 16000 for pcm
engine:
description: "Override the default engine. Can be either of `standard` or `neural`. See Amazon documentation for compatible regions and voices."
description: "Override the default engine. Can be either of [`standard`](https://docs.aws.amazon.com/polly/latest/dg/standard-voices.html), [`neural`](https://docs.aws.amazon.com/polly/latest/dg/neural-voices.html), [`long-form`](https://docs.aws.amazon.com/polly/latest/dg/long-form-voices.html) or [`generative`](https://docs.aws.amazon.com/polly/latest/dg/generative-voices.html). See Amazon documentation for compatible regions and voices."
required: false
type: string
default: standard
Expand Down Expand Up @@ -127,6 +127,21 @@ Say with break:
Amazon Polly
</speak>
```

Say with specific voice and engine as options:

```yaml
- service: tts.amazon_polly_say
data:
message: "Hello from Amazon Polly"
entity_id: media_player.living_room
language: en-GB
options:
voice: Amy
engine: generative
```


## Advanced usage
Amazon Polly supports accented bilingual voices and you may find that you'd prefer the voice you like be slowed down, or speeded up. If the speed of the voice is a concern, Amazon Polly provides the ability to modify this using SSML tags. First enable SSML in configuration:

Expand Down
13 changes: 11 additions & 2 deletions source/_integrations/asuswrt.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,18 @@ These sensors are automatically created and associated to the router device:
- Upload sensor (unit_of_measurement: Gigabyte - *Daily accumulation*)
- Upload Speed sensor (unit_of_measurement: Mbit/s)
- Load average sensors (1min, 5min, 15min)
- Temperature sensors (2ghz, 5ghz, cpu). NB: only temperature sensors available on your router will be created
- Temperature sensors (2 GHz, 5 GHz, 6 GHz, CPU). Only temperature sensors available on your router will be created.

Only `Connected devices sensor` is created in status **enabled**, all other sensors are created in status **disabled**. To use them, simply **enable** on the devices page.
If the integration is configured to use the http(s) protocol, also the following sensors will be available:

- CPU usage sensors (percentage for total and single core)
- Memory usage sensor (percentage)
- Free memory sensor (Megabyte)
- Memory used sensor (Megabyte)
- Last boot sensor (Timestamp)
- Uptime sensor (HH:MM:SS)

Only `Connected devices sensor` and `Last boot sensor` are created in status **enabled**, all other sensors are created in status **disabled**. To use them, simply **enable** on the devices page.

{% include integrations/option_flow.md %}
{% configuration_basic %}
Expand Down
3 changes: 2 additions & 1 deletion source/_integrations/azure_devops.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ This integration provides a sensor for Azure DevOps:
- Latest build queue time - How long the latest build was queued.
- Latest build start time - The time when the latest build actually started.
- Latest build finish time - The time when the latest build finished.
- Latest build URL - The URL to the latest build.
- Latest build URL - The URL to the latest build.
- Work item count - The number of work items for each work item type and state in the project.
64 changes: 64 additions & 0 deletions source/_integrations/cambridge_audio.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: Cambridge Audio
description: Instructions on how to integrate Cambridge Audio Receivers into Home Assistant.
ha_category:
- Media player
ha_release: '2024.10'
ha_iot_class: Local Push
ha_domain: cambridge_audio
ha_platforms:
- media_player
ha_codeowners:
- '@noahhusby'
ha_config_flow: true
ha_integration_type: integration
---

The **Cambridge Audio** {% term integration %} allows you to control all receivers and streamers that support the StreamMagic app.

The integration automatically discovers all enabled zones and sources. Each zone is added as a media player device with the enabled sources available as inputs. Media information and controls (such as play, pause, skip) are supported if the selected source reports it.

## Supported devices

This integration allows you to connect the following devices:

- Cambridge Audio Evo 75
- Cambridge Audio Evo 150
- Cambridge Audio CXN
- Cambridge Audio CXN (v2)
- Cambridge Audio CXR120
- Cambridge Audio CXR200
- Cambridge Audio 851N
- Cambridge Audio Edge NQ

Older, RS-232 serial-based amplifiers like the [CXA series](https://www.cambridgeaudio.com/usa/en/products/hi-fi/cx-series-2/cxa81)
use a different protocol and are not currently supported.

{% include integrations/config_flow.md %}

{% configuration_basic %}
Host:
description: The IP address of your device can be found by navigating to the device on the [StreamMagic app](https://www.cambridgeaudio.com/usa/en/products/streammagic) and selecting `Settings``IP address`.
required: true
type: string
{% endconfiguration_basic %}

## Troubleshooting

### The buttons to skip, shuffle, and repeat the track are missing

Control functionality depends on the source / service that is currently selected.
The interface automatically sets which controls are available depending on which source is selected.

### The ability to change volume is missing

Volume control is only supported on all-in-one amps, or streamers with pre-amp mode.
Likely, the device is not configured to be in pre-amp mode.
This can be changed by navigating to the IP address of the device in a web browser,
or selecting settings in the StreamMagic app and setting **Pre-Amp** to **On**.

### Turning on the device doesn't work from Home Assistant

Cambridge Audio devices come with ECO mode enabled by default, which disables the network interface when
the device is powered down. This can be changed by navigating to the IP address of the device in a web browser,
or selecting settings in the StreamMagic app and setting **Standby Mode** to **Network standby**.
3 changes: 2 additions & 1 deletion source/_integrations/comelit.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ ha_codeowners:
ha_iot_class: Local Polling
ha_platforms:
- alarm_control_panel
- binary_sensor
- climate
- cover
- humidifier
Expand All @@ -38,4 +39,4 @@ There is support for the following platform types within Home Assistant:

## Alarm control panel

The integration will create an alarm entity for each area and a sensor for each zone.
The integration will create an alarm entity for each area. Additionally, it will create a sensor and a presence detection binary sensor for each zone, enhancing monitoring capabilities.
Loading

0 comments on commit dcb5d86

Please sign in to comment.