Added working template of Sonoff B1 other templates caused errors. and lights turning on due to retained messages (formatting)

Uksa007 2018-09-09 00:44:18 +10:00
parent 490678ccfe
commit eae78afbc8
1 changed files with 5 additions and 2 deletions

@ -347,16 +347,19 @@ light:
## Sonoff B1
https://community.home-assistant.io/t/sonoff-b1-led-wifi-bulb-template-error-in-log/28690/9
So I have found a few issues with the current templates and retained messages making the B1 come on when reconnecting to the MQTT server, and generating errors in the HA log, I worked out this is best approach:
On the sonoff B1 its best to turn on PoweRetain so Homassistant can see the status when it first starts up, also SetOption 4 on so that the responses are the same as the commands, set the following options:
On the sonoff B1 its best to turn on PoweRetain so Homassistant can see the status when it first starts up, also SetOption 4 on so that the responses are the same as the commands, set the following using the sonoff web interface - Console or by sending it MQTT commands (eg cmnd/sonoffb1/PowerRetain on):
```
PowerRetain on
SetOption4 on
Fade on (optional, but makes the transitions slower)
Speed 5 (optional, but makes the transitions slower)
```
```yaml
light:
- platform: mqtt
name: "Lounge lamp"
state_topic: "stat/sonoffb1/POWER"