mirror of https://github.com/arendst/Tasmota.git
Updated Home Assistant (markdown)
parent
63ec1fb9a1
commit
b383def7e3
|
@ -13,7 +13,7 @@ If you don't want to use this option, please refer to:
|
||||||
- [[Home Assistant - Manual Config|Home-Assistant-‐-Manual-Config]] - For Home Assistant 0.84.2 or later together with Sonoff-Tasmota developement version built 2018-12-13 or later
|
- [[Home Assistant - Manual Config|Home-Assistant-‐-Manual-Config]] - For Home Assistant 0.84.2 or later together with Sonoff-Tasmota developement version built 2018-12-13 or later
|
||||||
- [[Home Assistant - Manual Config (Legacy)|Home-Assistant-‐-Manual-Config-(Legacy)]] - For older versions of Home Assistant or Sonoff-Tasmota
|
- [[Home Assistant - Manual Config (Legacy)|Home-Assistant-‐-Manual-Config-(Legacy)]] - For older versions of Home Assistant or Sonoff-Tasmota
|
||||||
|
|
||||||
Hass configuration not exposed in the UI is done by editing the file `configuration.yaml` which is found in folder `.homeassistant` after installation and first start of Hass. (Or in the `/config` folder, if you’re using Hass.io.)
|
Hass configuration is not exposed in the web UI. It is done by editing the `configuration.yaml` file which is found in folder `.homeassistant` after installing and first starting of Hass (or in the `/config` folder, if you’re using Hass.io).
|
||||||
|
|
||||||
Note: After every change to the configuration file you'll need to restart Hass to make it aware of the changes.
|
Note: After every change to the configuration file you'll need to restart Hass to make it aware of the changes.
|
||||||
This can be done either:
|
This can be done either:
|
||||||
|
@ -65,12 +65,12 @@ For other type of devices, e.g iFan02, example entries for configuration.yaml is
|
||||||
On each Tasmota device which should be automatically discovered by Hass, enter the following commands in the web console:\
|
On each Tasmota device which should be automatically discovered by Hass, enter the following commands in the web console:\
|
||||||
`SetOption19 1` - Enables MQTT discovery\
|
`SetOption19 1` - Enables MQTT discovery\
|
||||||
|
|
||||||
By executing command `SetOption19 1` the automatic discovery feature is enabled and a retained MQTT message starting with topic "homeassistant/..", as defined in user_config.h HOME_ASSISTANT_DISCOVERY_PREFIX, is sent containing parameters used by Home Assistant to automatically configure a device.
|
By executing `SetOption19 1`, the automatic discovery feature is enabled and a retained MQTT message starting with topic "homeassistant/..", as defined in `my_user_config.h` HOME_ASSISTANT_DISCOVERY_PREFIX, is sent containing parameters used by Home Assistant to automatically configure a device.
|
||||||
|
|
||||||
To disable the automatic discovery feature and remove the retained message, execute command `SetOption19 0` and the homeassistant topic is removed from Home Assistant and MQTT broker.\ Device topic will not revert to defaults, you have to manually change back the topic structure to `%prefix%/%topic%/` in [**MQTT Configuration**](MQTT).
|
To disable the automatic discovery feature and remove the retained message, execute `SetOption19 0` and the "homeassistant" topic is removed from Home Assistant and MQTT broker. The device topic will not revert to defaults. You have to manually change the topic structure back to `%prefix%/%topic%/` in [**MQTT Configuration**](MQTT).
|
||||||
|
|
||||||
#### :warning: Important:
|
#### :warning: Important:
|
||||||
This feature will change the default Tasmota topic `%prefix%/%topic%/COMMAND`, e.g. `cmnd/sonoff/POWER` to `%topic%/%prefix%/COMMAND`, e.g. `sonoff/cmnd/POWER`.
|
This feature will change the default Tasmota topic `%prefix%/%topic%/<command>`, e.g. `cmnd/sonoff/POWER` to `%topic%/%prefix%/<command>`, e.g., `sonoff/cmnd/POWER`.
|
||||||
You cannot use custom defined topics while `Setoption19` is on since it will always revert it to `%topic%/%prefix%` due to Home Assistant requirements.
|
You cannot use custom defined topics while `Setoption19` is on since it will always revert it to `%topic%/%prefix%` due to Home Assistant requirements.
|
||||||
|
|
||||||
## Setup Tasmota devices through Home Assistant
|
## Setup Tasmota devices through Home Assistant
|
||||||
|
@ -112,7 +112,7 @@ Use this automation to get all your (auto discovered) devices in sync, including
|
||||||
If you want all your devices to be found by Home Assistant, add an automation which will enable `SetOption19` for all devices.\
|
If you want all your devices to be found by Home Assistant, add an automation which will enable `SetOption19` for all devices.\
|
||||||
The automation will be triggered each time Home Assistant is (re)started although it is necessary to run it only if you have a device that doesn't have `SetOption19` enabled. After all your devices are setup with autodiscovery its advisable to turn off or delete this automation.
|
The automation will be triggered each time Home Assistant is (re)started although it is necessary to run it only if you have a device that doesn't have `SetOption19` enabled. After all your devices are setup with autodiscovery its advisable to turn off or delete this automation.
|
||||||
|
|
||||||
Note: This must use the default Tasmota topic format `%prefix%/%topic%/COMMAND`. After enabling SetOption19, the format will change to `%topic%/%prefix%/COMMAND` and those devices won't see this message.
|
Note: This must use the default Tasmota topic format `%prefix%/%topic%/<command>`. After enabling SetOption19, the format will change to `%topic%/%prefix%/<command>` and those devices won't see this message.
|
||||||
|
|
||||||
This can also be done manually in Home Assistant UI through Developer tools - ![](https://cdn.pbrd.co/images/HY47i1b.jpg) (MQTT) by posting to topic `cmnd/sonoffs/SetOption19` with payload `1`
|
This can also be done manually in Home Assistant UI through Developer tools - ![](https://cdn.pbrd.co/images/HY47i1b.jpg) (MQTT) by posting to topic `cmnd/sonoffs/SetOption19` with payload `1`
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue