Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
3b11aed
Add config flow to Snapcast (#24562)
luar123 Mar 30, 2023
12f9c38
Remove siren firmware issue (#26808)
starkillerOG Mar 31, 2023
9da22bd
Add HomeSeer integration (#26757)
b-uwe Mar 31, 2023
f3e4523
Remove xbox_live integration (#26817)
MartinHjelmare Mar 31, 2023
f92d56b
Rename Android TV to Android Debug Bridge (#26832)
tronikos Apr 2, 2023
acf7767
Document new profiler object logging with source (#26842)
bdraco Apr 3, 2023
83d07f9
Add config flow to qbittorrent (#25028)
chrisx8 Apr 3, 2023
a5b9d2d
Add example of sorting states by entity_id (#26822)
bdraco Apr 3, 2023
5c5bc51
Remove Darksky (#26740)
gjohansson-ST Apr 3, 2023
f3b4d1a
Document the constant selector (#26844)
emontnemery Apr 3, 2023
1f7756b
Updating Supla docs with garage door channel type support (#26820)
alh84001 Apr 3, 2023
98afb95
Remove deprecated imap_content_sensor integration documentation (#26792)
jbouwh Apr 3, 2023
092a395
Add attachment documentation for Simplepush (#26813)
tymm Apr 3, 2023
eae4e02
Add sort list service to Shopping List (#26839)
mib1185 Apr 3, 2023
e9ef492
Fan and alarm tile features (#26851)
piitaya Apr 4, 2023
1247cb0
Add guidance on dumping template information to the profiler integrat…
bdraco Apr 4, 2023
ae4a491
Add matter cover platform (#26857)
hidaris Apr 4, 2023
0456f07
Add new sensors to airq integration (#26761)
Sibgatulin Apr 5, 2023
94a793f
Add Relative_time and today_at updates (#25986)
Petro31 Apr 5, 2023
b8e9019
Merge branch 'current' into next
frenck Apr 5, 2023
1fb37b3
Add documentation for supported features selector (#26882)
bramkragten Apr 5, 2023
e2e978b
Merge branch 'current' into next
frenck Apr 5, 2023
6adaf23
Remove the coronavirus integration (#26897)
emontnemery Apr 6, 2023
bad0844
Remove stale information from history (#26901)
bdraco Apr 8, 2023
8921f18
Update UDP ports used by new aioswitcher version (#26950)
regevbr Apr 11, 2023
a20c6c9
Add config flow to brottsplatskartan (#22475)
gjohansson-ST Apr 12, 2023
4cb080a
Allow an unknown state, position or tilt for template cover (#26939)
jbouwh Apr 12, 2023
c30ec90
Add HomeKit RPi transcoding (#26953)
shmuelzon Apr 12, 2023
1303de1
Add documentation for to_json options (#26956)
depoll Apr 12, 2023
6c49322
Merge branch 'current' into next
frenck Apr 14, 2023
22e86c1
Describe webhook trigger allowed_methods/local_only options (#21637)
esev Apr 14, 2023
02dd643
Describe `announce` service call option for Sonos (#27010)
jjlawren Apr 14, 2023
7bc8011
add ssl_cipher_list option (#26942)
mib1185 Apr 15, 2023
163a60c
Adjust ssl_cipher_list options in rest docs (#27018)
mib1185 Apr 16, 2023
8a4e45b
Add documentation for Ping drop rate & fix missing sensors (#27015)
boswelja Apr 16, 2023
1006004
Add synology photos documentation (#26002)
lodesmets Apr 16, 2023
2cb2dae
Update minimum supported controller version (#27025)
MarkGodwin Apr 17, 2023
23bd12f
Add MyPlace support to Advantage Air (#26934)
Bre77 Apr 17, 2023
d0cf5e0
Android TV Remote integration documentation (#26659)
tronikos Apr 17, 2023
b0a4133
Monessen virtual IntelliFire integration (#26506)
jeeftor Apr 17, 2023
36551b0
Add docs for rapt_ble integration (#26210)
sairon Apr 17, 2023
105be2f
Allow mqtt device_class or UOM to be None (#26973)
jbouwh Apr 17, 2023
ec654f9
Extend doorbell features (#26791)
starkillerOG Apr 22, 2023
b16779c
Update tts docs (#27077)
MartinHjelmare Apr 22, 2023
d5c1e68
Update stt docs (#26988)
MartinHjelmare Apr 22, 2023
c4f5603
Implement Config Flow Workday (#22907)
gjohansson-ST Apr 22, 2023
49d156d
Add new Roborock integration documentation (#26520)
Lash-L Apr 22, 2023
2c3eb3c
Setup of anova docs (#25851)
Lash-L Apr 22, 2023
876df04
Add info about new entities for easyEnergy (#27091)
klaasnicolaas Apr 22, 2023
a7e3b2d
Add device actions to NUT integration doc (#24698)
pestevez Apr 23, 2023
b519527
Add YS7106
matrixd2 Apr 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,6 @@ source/_integrations/workday.markdown @fabaff @gjohansson-ST
source/_integrations/worldclock.markdown @fabaff
source/_integrations/ws66i.markdown @ssaenger
source/_integrations/xbox.markdown @hunterjm
source/_integrations/xbox_live.markdown @MartinHjelmare
source/_integrations/xiaomi_aqara.markdown @danielhiversen @syssi
source/_integrations/xiaomi_ble.markdown @Jc2k @Ernst79
source/_integrations/xiaomi_miio.markdown @rytilahti @syssi @starkillerOG
Expand Down
9 changes: 8 additions & 1 deletion source/_docs/automation/trigger.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,10 @@ automation:
trigger:
- platform: webhook
webhook_id: "some_hook_id"
allowed_methods:
- POST
- PUT
local_only: true
```

You can run this automation by sending an HTTP POST request to `http://your-home-assistant:8123/api/webhook/some_hook_id`. Here is an example using the **curl** command line program, with an example form data payload:
Expand All @@ -794,7 +798,9 @@ You can run this automation by sending an HTTP POST request to `http://your-home
curl -X POST -d 'key=value&key2=value2' https://your-home-assistant:8123/api/webhook/some_hook_id
```

Webhooks support HTTP POST, PUT, and HEAD requests; POST requests are recommended. HTTP GET requests are not supported.
Webhooks support HTTP POST, PUT, HEAD, and GET requests; PUT requests are recommended. HTTP GET and HEAD requests are not enabled by default but can be enabled by adding them to the `allowed_methods` option. The request methods can also be configured in the UI by clicking the settings gear menu button beside the Webhook ID.

By default, webhook triggers can only be accessed from devices on the same network as Home Assistant or via [Nabu Casa Cloud webhooks](https://www.nabucasa.com/config/webhooks/). The `local_only` option should be set to `false` to allow webhooks to be triggered directly via the internet. This option can also be configured in the UI by clicking the settings gear menu button beside the Webhook ID.

Remember to use an HTTPS URL if you've secured your Home Assistant installation with SSL/TLS.

Expand All @@ -817,6 +823,7 @@ Webhook endpoints don't require authentication, other than knowing a valid webho
- Do not use webhooks to trigger automations that are destructive, or that can create safety issues. For example, do not use a webhook to unlock a lock, or open a garage door.
- Treat a webhook ID like a password: use a unique, non-guessable value, and keep it secret.
- Do not copy-and-paste webhook IDs from public sources, including blueprints. Always create your own.
- Keep the `local_only` option enabled for webhooks if access from the internet is not required.

## Zone trigger

Expand Down
13 changes: 7 additions & 6 deletions source/_docs/configuration/templating.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -657,13 +657,14 @@ To fix it, enforce the ISO conversion via `isoformat()`:

The `to_json` filter serializes an object to a JSON string. In some cases, it may be necessary to format a JSON string for use with a webhook, as a parameter for command-line utilities or any number of other applications. This can be complicated in a template, especially when dealing with escaping special characters. Using the `to_json` filter, this is handled automatically.

Similarly to the Python equivalent, the filter accepts an `ensure_ascii` parameter, defaulting to `True`. If `ensure_ascii` is `True`, the output is guaranteed to have all incoming non-ASCII characters escaped. If `ensure_ascii` is false, these characters will be output as-is.
`to_json` also accepts boolean arguments for `pretty_print`, which will pretty print the JSON with a 2-space indent to make it more human-readable, and `sort_keys`, which will sort the keys of the JSON object, ensuring that the resulting string is consistent for the same input.

If you need to generate JSON that will be used by a parser that lacks support for Unicode characters, you can add `ensure_ascii=True` to have `to_json` generate Unicode escape sequences in strings.

The `from_json` filter operates similarly, but in the other direction, de-serializing a JSON string back into an object.

### To/From JSON examples

In this example, the special character '°' will be automatically escaped in order to produce valid JSON. The difference between the stringified object and the actual JSON is evident.
### To/From JSON examples

#### Template

Expand All @@ -672,7 +673,7 @@ In this example, the special character '°' will be automatically escaped in ord
```text
{% set temp = {'temperature': 25, 'unit': '°C'} %}
stringified object: {{ temp }}
object|to_json: {{ temp|to_json(ensure_ascii=False) }}
object|to_json: {{ temp|to_json(sort_keys=True) }}
```

{% endraw %}
Expand All @@ -683,7 +684,7 @@ object|to_json: {{ temp|to_json(ensure_ascii=False) }}

```text
stringified object: {'temperature': 25, 'unit': '°C'}
object|to_json: {"temperature": 25, "unit": "\u00b0C"}
object|to_json: {"temperature": 25, "unit": "°C"}
```

{% endraw %}
Expand All @@ -695,7 +696,7 @@ Conversely, `from_json` can be used to de-serialize a JSON string back into an o
{% raw %}

```text
{% set temp = '{"temperature": 25, "unit": "\u00b0C"}'|from_json %}
{% set temp = '{"temperature": 25, "unit": "°C"}'|from_json %}
The temperature is {{ temp.temperature }}{{ temp.unit }}
```

Expand Down
16 changes: 10 additions & 6 deletions source/_integrations/advantage_air.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ The integration will create a climate entity for each air conditioning system fo

### Cover

The integration will create a cover entity for each zone that is not temperature controlled, allowing you to adjust the opening level manually from 0% to 100% in 5% increments.
The integration will create a cover entity for each air conditioning zone that is not temperature controlled, allowing you to adjust the opening level manually from 0% to 100% in 5% increments.

With MyPlace, any blinds and/or garage doors will be created as cover entities.

### Sensor

Expand All @@ -53,23 +55,25 @@ The integration will create sensor entities for a variety of aspects:

### Binary Sensor

The `advantage_air` binary sensor platform will create a binary sensor for each zone that has a motion sensor.
The integration will create a binary sensor for each zone that has a motion sensor.

### Switch

The `advantage_air` switch platform will create a switch entity to toggle fresh air mode, if it is supported.
The integration will create a switch entity to toggle air conditioning fresh air mode, if it is supported.

With MyPlace, any relays will be created as switch entities.

### Select

The `advantage_air` select platform allows you to change the zone used for the "MyZone" feature.
The MyZone select entity that allows you to change the zone used for the "MyZone" feature. Set this to "Inactive" to use the return air vent temperature.

### Update

The `advantage_air` update platform shows if the controller app requires an update.
The update platform shows if the controller app requires an update.

### Light

The `advantage_air` light platform will create a light entity for each light in MyLights tab of the MyPlace app.
With MyLights or MyPlace, light entities will be created for each light.

## Services

Expand Down
46 changes: 23 additions & 23 deletions source/_integrations/androidtv.markdown
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Android TV
description: Instructions on how to integrate Android TV and Fire TV devices into Home Assistant.
title: Android Debug Bridge
description: Instructions on how to integrate Android and Fire TV devices into Home Assistant.
ha_category:
- Media Player
ha_release: 0.7.6
Expand All @@ -16,7 +16,7 @@ ha_platforms:
ha_integration_type: device
---

The `androidtv` platform allows you to control an Android TV device or [Amazon Fire TV](https://www.amazon.com/b/?node=8521791011) device.
The Android Debug Bridge integration allows you to control an Android device or [Amazon Fire TV](https://www.amazon.com/b/?node=8521791011) device.

<div class='note'>

Expand All @@ -26,7 +26,7 @@ When setting up this integration, it is recommended that you do NOT use an ADB s

## Device preparation

To set up your device, you will need to find its IP address and enable ADB debugging. For Android TV devices, please consult the documentation for your device.
To set up your device, you will need to find its IP address and enable ADB debugging. For Android devices, please consult the documentation for your device.

For Fire TV devices, the instructions are as follows:

Expand Down Expand Up @@ -62,11 +62,11 @@ Configure State Detection Rules:

## ADB Setup

This integration works by sending ADB commands to your Android TV / Fire TV device. There are two ways to accomplish this.
This integration works by sending ADB commands to your Android / Fire TV device. There are two ways to accomplish this.

<div class='note'>

When connecting to your device for the first time, a dialog will appear on your Android TV / Fire TV asking you to approve the connection. Check the box that says "always allow connections from this device" and hit OK.
When connecting to your device for the first time, a dialog will appear on your Android / Fire TV asking you to approve the connection. Check the box that says "always allow connections from this device" and hit OK.

</div>

Expand All @@ -84,29 +84,29 @@ Prior to Home Assistant 0.101, this approach did not work well for newer devices

### 2. ADB Server

The second option is to use an ADB server to connect to your Android TV and Fire TV devices.
The second option is to use an ADB server to connect to your Android and Fire TV devices.

<div class='note'>

To configure ADB server on integration setup, you need to enable [advanced mode](/blog/2019/07/17/release-96/#advanced-mode).

</div>

Using this approach, Home Assistant will send the ADB commands to the server, which will then send them to the Android TV / Fire TV device and report back to Home Assistant. To use this option, add the `adb_server_ip` option to your configuration. If you are running the server on the same machine as Home Assistant, you can use `127.0.0.1` for this value.
Using this approach, Home Assistant will send the ADB commands to the server, which will then send them to the Android / Fire TV device and report back to Home Assistant. To use this option, add the `adb_server_ip` option to your configuration. If you are running the server on the same machine as Home Assistant, you can use `127.0.0.1` for this value.

## ADB Troubleshooting

If the setup for your Android TV or Fire TV device fails, then there is probably an issue with your ADB connection. Here are some possible causes.
If the setup for your Android or Fire TV device fails, then there is probably an issue with your ADB connection. Here are some possible causes.

1. You have the wrong IP address for the device.

2. ADB is not enabled on your device.

3. You are already connected to the Android TV / Fire TV via ADB from another device. Only one device can be connected, so disconnect the other device, restart the Android TV / Fire TV (for good measure), and then restart Home Assistant.
3. You are already connected to the Android / Fire TV via ADB from another device. Only one device can be connected, so disconnect the other device, restart the Android / Fire TV (for good measure), and then restart Home Assistant.

4. You need to approve the ADB connection; see the note in the [ADB Setup](#adb-setup) section above.

5. Some Android TV devices (e.g., Philips TVs running Android TV) only accept the initial ADB connection request over their Wi-Fi interface. If you have the TV wired, you need to connect it to Wi-Fi and try the initial connection again. Once the authentication has been granted via Wi-Fi, you can connect to the TV over the wired interface as well.
5. Some Android devices (e.g., Philips TVs running Android TV) only accept the initial ADB connection request over their Wi-Fi interface. If you have the TV wired, you need to connect it to Wi-Fi and try the initial connection again. Once the authentication has been granted via Wi-Fi, you can connect to the TV over the wired interface as well.

6. If your device drops off WiFi, breaking the ADB connection and causing the entity to become unavailable in Home Assistant, you could install a wake lock utility (such as [Wakelock](https://github.com/d4rken/wakelock-revamp)) to prevent this from happening. Some users have reported this problem with Xiaomi Mi Box devices.

Expand Down Expand Up @@ -138,11 +138,11 @@ stop_netflix:

### `androidtv.adb_command`

The service `androidtv.adb_command` allows you to send either keys or ADB shell commands to your Android TV / Fire TV device. If there is any output, it will be stored in the `'adb_response'` attribute (i.e., `state_attr('media_player.android_tv_living_room', 'adb_response')` in a template) and logged at the INFO level.
The service `androidtv.adb_command` allows you to send either keys or ADB shell commands to your Android / Fire TV device. If there is any output, it will be stored in the `'adb_response'` attribute (i.e., `state_attr('media_player.android_tv_living_room', 'adb_response')` in a template) and logged at the INFO level.

| Service data attribute | Optional | Description |
| ---------------------- | -------- | ----------- |
| `entity_id` | no | Name(s) of Android TV / Fire TV entities.
| `entity_id` | no | Name(s) of Android / Fire TV entities.
| `command` | no | Either a key command or an ADB shell command.

In an [action](/getting-started/automation-action/) of your [automation setup](/getting-started/automation/) it could look like this:
Expand Down Expand Up @@ -177,14 +177,14 @@ A list of various intents can be found [here](https://gist.github.com/mcfrojd/9e

### `androidtv.learn_sendevent` (for faster ADB commands)

When sending commands like UP, DOWN, HOME, etc. via ADB, the device can be slow to respond. The problem isn't ADB, but rather the Android command `input` that is used to perform those actions. A faster way to send these commands is using the Android `sendevent` command. The challenge is that these commands are device-specific. To assist users in learning commands for their device, the Android TV integration provides the `androidtv.learn_sendevent` service. Its usage is as follows:
When sending commands like UP, DOWN, HOME, etc. via ADB, the device can be slow to respond. The problem isn't ADB, but rather the Android command `input` that is used to perform those actions. A faster way to send these commands is using the Android `sendevent` command. The challenge is that these commands are device-specific. To assist users in learning commands for their device, the Android debug bridge integration provides the `androidtv.learn_sendevent` service. Its usage is as follows:

| Service data attribute | Optional | Description |
| ---------------------- | -------- | ----------- |
| `entity_id` | no | Name(s) of Android TV / Fire TV entities.
| `entity_id` | no | Name(s) of Android / Fire TV entities.

1. Call the `androidtv.learn_sendevent` service.
2. Within 8 seconds, hit a single button on your Android TV / Fire TV remote.
2. Within 8 seconds, hit a single button on your Android / Fire TV remote.
3. After 8 seconds, a persistent notification will appear that contains the equivalent command that can be sent via the `androidtv.adb_command` service. This command can also be found in the `adb_response` attribute of the media player in Home Assistant, and it will be logged at the INFO level.

As an example, a service call in a [script](/docs/scripts) could be changed from this:
Expand All @@ -211,25 +211,25 @@ to this:

### `androidtv.download` and `androidtv.upload`

You can use the `androidtv.download` service to download a file from your Android TV / Fire TV device to your Home Assistant instance.
You can use the `androidtv.download` service to download a file from your Android / Fire TV device to your Home Assistant instance.

| Service data attribute | Optional | Description |
| ---------------------- | -------- | ----------- |
| `entity_id` | no | Name of Android TV / Fire TV entity.
| `device_path` | no | The filepath on the Android TV / Fire TV device.
| `entity_id` | no | Name of Android / Fire TV entity.
| `device_path` | no | The filepath on the Android / Fire TV device.
| `local_path` | no | The filepath on your Home Assistant instance.

Similarly, you can use the `androidtv.upload` service to upload a file from Home Assistant instance to Android TV / Fire TV devices.
Similarly, you can use the `androidtv.upload` service to upload a file from Home Assistant instance to Android / Fire TV devices.

| Service data attribute | Optional | Description |
| ---------------------- | -------- | ----------- |
| `entity_id` | no | Name(s) of Android TV / Fire TV entities.
| `device_path` | no | The filepath on the Android TV / Fire TV device.
| `entity_id` | no | Name(s) of Android / Fire TV entities.
| `device_path` | no | The filepath on the Android / Fire TV device.
| `local_path` | no | The filepath on your Home Assistant instance.

## Custom State Detection

The Android TV integration works by polling the Android TV / Fire TV device at a regular interval and collecting a handful of properties. Unfortunately, there is no standard API for determining the state of the device to which all apps adhere. Instead, the backend `androidtv` package uses three of the properties that it collects to determine the state: `audio_state`, `media_session_state`, and `wake_lock_size`. The correct logic for determining the state differs depending on the current app, and the backend `androidtv` package implements app-specific state detection logic for a handful of apps. Of course, it is not feasible to implement custom logic for each and every app in the `androidtv` package. Moreover, the correct state detection logic may differ across devices and device configurations.
The Android Debug Bridge integration works by polling the Android / Fire TV device at a regular interval and collecting a handful of properties. Unfortunately, there is no standard API for determining the state of the device to which all apps adhere. Instead, the backend `androidtv` package uses three of the properties that it collects to determine the state: `audio_state`, `media_session_state`, and `wake_lock_size`. The correct logic for determining the state differs depending on the current app, and the backend `androidtv` package implements app-specific state detection logic for a handful of apps. Of course, it is not feasible to implement custom logic for each and every app in the `androidtv` package. Moreover, the correct state detection logic may differ across devices and device configurations.

The solution to this problem is the `state_detection_rules` configuration parameter, which allows you to provide your own rules for state detection. The keys are app IDs, and the values are lists of rules that are evaluated in order. Valid rules are:

Expand Down
Loading