mirror of https://github.com/arendst/Tasmota.git
Updated Home Assistant (markdown)
parent
e7986a1305
commit
065624dd64
|
@ -102,9 +102,11 @@ When you use a partially dynamic configured environment without a persistent bro
|
|||
Instead of relying on automatic discovery, devices can be manually added to Home Assistant.
|
||||
The following section gives example for how to configure some typical device types.
|
||||
|
||||
### Tip: Pull state on Home Assistant start-up without retain option
|
||||
### Tip: Refresh state on Home Assistant start-up without retain option
|
||||
|
||||
#### Example 1
|
||||
An automation can be used to send `status` command. One example is an automation at Home Assistant startup which you can also easily trigger again via the GUI manually.
|
||||
|
||||
#### Example
|
||||
Edit `automations.yaml` and add:
|
||||
```yaml
|
||||
- alias: "Power state on HA start-up"
|
||||
|
@ -114,40 +116,11 @@ Edit `automations.yaml` and add:
|
|||
action:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "cmnd/sonoffs/power1"
|
||||
payload: ""
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "cmnd/sonoffs/power2"
|
||||
payload: ""
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "cmnd/sonoffs/Power3"
|
||||
payload: ""
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "cmnd/sonoffs/power4"
|
||||
topic: "cmnd/sonoffs/state"
|
||||
payload: ""
|
||||
```
|
||||
|
||||
#### Example 2
|
||||
An automation is required to push the status 2 command. One example is during an automation at Home Assistant startup which you can easily trigger again via the GUI manually.
|
||||
|
||||
This automation posts to the default "sonoffs" group topic. Each device will send back their status 2 message along with the states of the relays.
|
||||
|
||||
Edit `automations.yaml` and add:
|
||||
|
||||
```yaml
|
||||
- alias: "Tasmota state on HA start-up"
|
||||
trigger:
|
||||
platform: homeassistant
|
||||
event: start
|
||||
action:
|
||||
- service: mqtt.publish
|
||||
data:
|
||||
topic: "cmnd/sonoffs/backlog"
|
||||
payload: "status 2;power1 ;power2 ;power3 ;power4 ;power5 "
|
||||
```
|
||||
This automation posts to the default "sonoffs" group topic. Each device will send back their status message which contains relay power and light status.
|
||||
|
||||
### Tip: View the firmware version number of a Tasmota device
|
||||
|
||||
|
|
Loading…
Reference in New Issue