mirror of https://github.com/arendst/Tasmota.git
Added OpenHab example Config
parent
e1620e117a
commit
5ba4b1fef3
|
@ -51,3 +51,28 @@ Hold the little button pressed while connecting the USB cable to your Notebook,
|
|||
after ca. 2 sec. let go of the button.
|
||||
It is now in flashing mode.
|
||||
Follow the [Hardware Preparation](https://github.com/arendst/Sonoff-Tasmota/wiki/Hardware-Preparation) page for general instructions.
|
||||
|
||||
|
||||
### OpenHab configuration
|
||||
|
||||
sonoff.items:
|
||||
```
|
||||
Switch S20_1 "Coffee S20-1 Powerplug" (LR,gLight)
|
||||
{ mqtt=">[broker:cmnd/sonoff-S20-1/POWER:command:*:default],
|
||||
<[broker:stat/sonoff-S20-1/POWER:state:default],
|
||||
<[broker:stat/sonoff-S20-1/RESULT:state:JSONPATH($.POWER)],
|
||||
<[broker:tele/sonoff-S20-1/STATE:state:JSONPATH($.POWER)]
|
||||
"}
|
||||
Switch S20_1_Reachable "S20-1 reachable" <contact> (gReachable)
|
||||
{ mqtt="<[broker:tele/sonoff-S20-1/LWT:state:MAP(reachable.map)],
|
||||
<[broker:stat/sonoff-S20-1/RESULT:state:ON],
|
||||
<[broker:stat/sonoff-S20-1/POWER:state:ON],
|
||||
<[broker:tele/sonoff-S20-1/STATE:state:ON]
|
||||
" }
|
||||
```
|
||||
|
||||
default.sitemap:
|
||||
```
|
||||
Switch item=S20_1 labelcolor=[S20_1_Reachable == "ON" = "green",S20_1_Reachable == "OFF" = "red"]
|
||||
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue