diff --git a/items/onewire.items b/items/onewire.items index 916586a..22aa1ed 100644 --- a/items/onewire.items +++ b/items/onewire.items @@ -4,7 +4,7 @@ Group temperatury Switch sOWFS01 "Światełka [%s]" { onewire="deviceId=12.0C7045000000;propertyName=PIO.A" } Switch sOWFS01_expected "Światełka wg automatyki" Switch sOWFS02 "Lampka nocna [%s]" { onewire="deviceId=12.C56E45000000;propertyName=PIO.A" } -/*Switch sOWFS03 "OneWire włącznik 03 [%s]" { onewire="deviceId=12.7B6845000000;propertyName=PIO.A" } */ +Switch sOWFS03 "Głośniki salon [%s]" { onewire="deviceId=12.7B6845000000;propertyName=PIO.A" } Number t_spizarnia "Spiżarnia [%.1f °C]" (spizarnia, temperatury) { onewire="deviceId=28.807A2A060000;propertyName=latesttemp" } Number t_schowek "Schowek [%.1f °C]" (schowek, temperatury) { onewire="deviceId=28.6B4925030000;propertyName=latesttemp" } diff --git a/rules/salon.głośniki.rules b/rules/salon.głośniki.rules new file mode 100644 index 0000000..e657347 --- /dev/null +++ b/rules/salon.głośniki.rules @@ -0,0 +1,15 @@ + +rule "Zasilanie głośników" +when + Item Kodi_State received update or + Item Mpd_quodlibet_StartStop received update +then + + if (Kodi_State.state == "Play" || Mpd_quodlibet_StartStop.state == ON) { + sOWFS03.sendCommand(ON) + + } else if (Kodi_State.state == "Stop" && Mpd_quodlibet_StartStop.state == OFF) { + sOWFS03.sendCommand(OFF) + } +end + diff --git a/sitemaps/default.sitemap b/sitemaps/default.sitemap index 68c08e1..82a23e8 100644 --- a/sitemaps/default.sitemap +++ b/sitemaps/default.sitemap @@ -23,6 +23,7 @@ sitemap pbrk label="Domek" Frame label="Media" { Switch item=samsungtv + Switch item=sOWFS03 Switch item=Mpd_quodlibet_StartStop icon="audio" mappings=[OFF="Pause", ON="Play"] /*Switch item=Mpd_quodlibet_StartStop label="Kontrola" icon="play" mappings=[ON="Play"] visibility=[Mpd_quodlibet_StartStop==OFF]