[{"id":"4665776db8aa159c","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"36e16fb9a29dc742","type":"api-call-service","z":"4665776db8aa159c","name":"Pompa podłogówki ON","server":"2513de51.f4bb22","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_pompa_podlogowki"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":700,"y":200,"wires":[[]]},{"id":"48c8f922371b046e","type":"api-call-service","z":"4665776db8aa159c","name":"Pompa podłogówki OFF","server":"2513de51.f4bb22","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_pompa_podlogowki"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":710,"y":240,"wires":[[]]},{"id":"5040e2e0f75fb923","type":"inject","z":"4665776db8aa159c","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":70,"y":200,"wires":[["8b35652bccae0c56"]]},{"id":"8b35652bccae0c56","type":"api-current-state","z":"4665776db8aa159c","name":"zadana","server":"2513de51.f4bb22","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.zadana_temperatura_bufora_2_4","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"iinput_number.zadana_temperatura_bufora_2_4","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":220,"y":200,"wires":[["f6ec960b5cf037b6"]]},{"id":"f6ec960b5cf037b6","type":"api-current-state","z":"4665776db8aa159c","name":"Bufor","server":"2513de51.f4bb22","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_bufor_2_4","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"sensor.czujniki_temperatury_bufor_2_4","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":350,"y":200,"wires":[["20a9747cdc3d4804"]]},{"id":"20a9747cdc3d4804","type":"function","z":"4665776db8aa159c","name":"function 1","func":"let vt1 = flow.get('zadana');\nlet vt2 = flow.get('Bufor');\n\nif (vt1 > vt2) {\n msg.payload = \"1\";\n return [msg, null];\n}\n\nif (vt1 <= vt2) {\n msg.payload = \"1\";\n return [null, msg];\n} ","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":480,"y":200,"wires":[["36e16fb9a29dc742"],["48c8f922371b046e"]]},{"id":"2513de51.f4bb22","type":"server","name":"Home Assistant","addon":true}]
to chyba to
Dobra już działa Dzięki za cierpliwość.
To może kolejny krok? Teraz muszę dodać następujący warunek. Jeśli temperatura bufora jest wyższa niż temperatura zadana a jest otwarty jakikolwiek zawór podłogówki to pompa może startować. Jeśli nie to ma zostać uśpiona. Spróbuję to dodać do kodu i dam znać o efektach. Być może temat się przyda w starcie kolejnemu tak zielonemu jak ja.
Spróbuję to dodać do kodu i dam znać o efektach
Pochwal się koniecznie, ciekawy jestem jak do tego podejdziesz 🙂 Tu polecam sprawdzanie stanu zaworów bezpośrednio, a nie w interwale czasowym, umożliwi to wyłączenie pompy natychmiast po zamknięciu, tak żeby pompa nie pracowała przy zamkniętych pętlach.
Spróbuję to dodać do kodu i dam znać o efektach
Tu polecam sprawdzanie stanu zaworów bezpośrednio, a nie w interwale czasowym, umożliwi to wyłączenie pompy natychmiast po zamknięciu, tak żeby pompa nie pracowała przy zamkniętych pętlach.
Trzeba było zacząć od prostego połączenia ,jak @marekmazurek zaczął ( tylko nie wpadł na to ,że noda wejściowego ze stanem można powielić) , a nie pisać , że trzeba zbudować przepływ , który sprawdza w interwale temperatury 😉
Czyli o ile rozumiem to zamiast pętli jako wyzwalacza mogę użyć akcji np zmiana temperatury?
a nie pisać , że trzeba zbudować przepływ , który sprawdza w interwale temperatury 😉
Ale gdzie widzisz problem ? Bo ja widzę tylko zalety tego interwału. Budując przepływ z kilkoma czujnikami, gdzie każdy ma inny czas aktualizacji nie robi się sieczka wyzwoleń itd.
Natomiast dołożenie do tego przepływu warunków z zaworami nie stanowi problemu.
Powiem więcej gdyby chcieć dołożyć np obniżanie zadanej na podstawie temp zewnętrznej to taki interwał wręcz ułatwia zadanie, ale każdy ma prawo myśleć- robić jak uważa 🙂
Kolega @marekmazurek napisał, że spróbuje więc trzeba dać mu szansę. Małą podpowiedzią niech będzie ten obrazek, wystarczy nody debug zmienić na takie które ustawią wartość zmiennej "zawory" i polączyć jedną linią z tym co już ma.
A tu stan gdy wszystkie zawory są OFF
a nie pisać , że trzeba zbudować przepływ , który sprawdza w interwale temperatury 😉
Ale gdzie widzisz problem ? Bo ja widzę tylko zalety tego interwału. Budując przepływ z kilkoma czujnikami, gdzie każdy ma inny czas aktualizacji nie robi się sieczka wyzwoleń itd.
Natomiast dołożenie do tego przepływu warunków z zaworami nie stanowi problemu.
Powiem więcej gdyby chcieć dołożyć np obniżanie zadanej na podstawie temp zewnętrznej to taki interwał wręcz ułatwia zadanie, ale każdy ma prawo myśleć- robić jak uważa 🙂
Kolega @marekmazurek napisał, że spróbuje więc trzeba dać mu szansę. Małą podpowiedzią niech będzie ten obrazek, wystarczy nody debug zmienić na takie które ustawią wartość zmiennej "zawory" i polączyć jedną linią z tym co już ma.
A tu stan gdy wszystkie zawory są OFF
Zanim to przeczytałem to bardziej skłaniałem się do zebrania w grupę interesujących mnie zaworów w HA i jako warunek wystawienia stanu grupy. Tzn jeśli choć jeden zaworów z grupy jest otwarty to grupa daje odpowiedź ON i pompa może pracować. Jeśli wszystkie są zamknięte to grupa daje odpowiedź OFF i pompa mimo pozostałych spełnionych warunków zostaje uśpiona. Ale tu zaczynają się schody. W mojej instalacji występuje następująca sytuacja. Na rozdzielaczu jest 10 głowic elektrycznych których czas otwarcia/zamknięcia to 2 minuty. o ile przy zamknięciu nie ma to znaczenia to podczas otwarcia pierwszego z dziesiątki pompa przez jakiś czas pracuje na zamkniętym /przymkniętym obwodzie. Rozwiązaniem jest warunek nakazujący pompie czekać 2 minuty jeśli wcześniej wszystkie zawory układu były zamknięte 😀
Tylko jak go napisać?
Każdy ma prawo myśleć i robić jak uważa , ale to Ty pisałeś ,że trzeba z interwałem , co prawdą nie było ... 😉
trzeba z interwałem
W miom mniemaniu trzeba 🙂 Bo albo robię coś z sensem albo myślę żeby tak było, zrobić żeby tylko działało to zły nawyk.
czekać 2 minuty jeśli wcześniej wszystkie zawory układu były zamknięte
Przecież wystarczy dodać opóźnienie załączenia pomy i po sprawie, gdy dowolny zawór jest otwarty pompa pracuje, nie pracuje tylko wtedy gdy wszystkie są zamknięte, to co znaczy "jeżeli wcześniej "? wcześniej gdy pompa nie pracowała musiały być zamknięte.
Opóźnienie można dodać na dwa sposoby, albo node delay, albo trigger
Tu do tego przepływu dołożyłem jeszcze sprawdzanie stanu pompy, żeby niepotrzebie nie klepać przekaźnikiem przy każdym sprawdzeniu temperatury
NIE KRZYCZEĆ NA MNIE!!!
To tylko idea. 😀 Konfiguracja jeszcze do przemyślenia.
No to tak. Akcja wyzwalana jest zmianą nastawy temperatury zadanej, zmianą temperatury wody w buforze. I to działa.
Dalej jeśli warunki zaworu pozwolą na otwarcie go to zawór da znać warunkom pompy że może działać W przeciwnym wypadku zawór da znać by uruchomić sprawdzenie warunków dla innych zaworów. Sam już chyba widzę błędy w połączeniach. Ale powiedzcie co o samej idei myślicie.
Sam już chyba widzę błędy w połączeniach.
Jak je widzisz to popraw bo zalączenie zaworu Panorama o 19:37 jakoś nie włączyło pompy. Jak widzisz nie krzyczę 🙂
W miom mniemaniu trzeba 🙂 Bo albo robię coś z sensem albo myślę żeby tak było, zrobić żeby tylko działało to zły nawyk.
Zły nawyk to myślenie ,że tylko Ty robisz wszystko z sensem , a inni nie ( i to zdanie o tym świadczy , moje mniemanie - trzeba = inny sposób jest bez sensu,bo ja tylko robię wszystko z sensem). A dobry , to patrzeć na inne rozwiązania ,bo mogą być zadziwiająco proste i lepsze.
A dobry , to patrzeć na inne rozwiązania
Wstaw takie dobre, będę mógł porównać, inaczej to tylko przekomarzanie się z Twojej strony.
Masz już praktycznie wszystkie wytyczne, ja mialem gorzej bo nie znałem dodatkowych warunków na wstępie
Sam już chyba widzę błędy w połączeniach.
Jak je widzisz to popraw bo zalączenie zaworu Panorama o 19:37 jakoś nie włączyło pompy. Jak widzisz nie krzyczę 🙂
Oczywiście że nie załączyło bo jak napisałem nie skonfigurowałem jeszcze funkcji. Pytałem tylko czy kierunek myślenia ma sens... 😀
W przeciwnym wypadku zawór da znać by uruchomić sprawdzenie warunków dla innych zaworów.
Dołóż to sprawdzanie dla chociaż jeszcze jednego zaworu, to będzie można coś więcej powiedzieć, nie chcę krytykować nieskończonego procesu.
A dobry , to patrzeć na inne rozwiązania
Wstaw takie dobre, będę mógł porównać, inaczej to tylko przekomarzanie się z Twojej strony.
Masz już praktycznie wszystkie wytyczne, ja mialem gorzej bo nie znałem dodatkowych warunków na wstępie
Nie ma problemu ,żeby zrobić to wszystko w jednej funkcji ( czyli wszystkie wejścia - temperatury , stany zaworów wprowadzić do funkcji ) , a wyście z funkcji to jeden node ,ktory potrafi włączyć i wyłączyć pompę. Bez żadnych interwałów 🙂
Na teraz jest tak ale jeszcze żadnych firewerków
[{"id":"2b70191b3a88991e","type":"tab","label":"Ogrzewanie sekcja bufora","disabled":false,"info":"","env":[]},{"id":"08c3cfdcdd2eaac6","type":"tab","label":"Ogrzewanie podłogowe","disabled":false,"info":"","env":[]},{"id":"2513de51.f4bb22","type":"server","name":"Home Assistant","addon":true},{"id":"1a9033b6.071e8c","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","statusSeparator":"","enableGlobalContextStore":false},{"id":"8b12998edf9981b6","type":"api-call-service","z":"2b70191b3a88991e","name":"Pompa podłogówki ON","server":"2513de51.f4bb22","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_pompa_podlogowki"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":180,"wires":[[]]},{"id":"02fefb2777decf9f","type":"api-call-service","z":"2b70191b3a88991e","name":"Pompa podłogówki OFF","server":"2513de51.f4bb22","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_pompa_podlogowki"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1030,"y":240,"wires":[[]]},{"id":"0be102f894f17647","type":"api-current-state","z":"2b70191b3a88991e","name":"zadana","server":"2513de51.f4bb22","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.zadana_temperatura_bufora_2_4","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"zadana","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":280,"y":200,"wires":[["32b1efdc800522cf"]]},{"id":"32b1efdc800522cf","type":"api-current-state","z":"2b70191b3a88991e","name":"Bufor","server":"2513de51.f4bb22","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_bufor_2_4","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Bufor","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":430,"y":200,"wires":[["b2ce285f8753c8e9"]]},{"id":"b2ce285f8753c8e9","type":"function","z":"2b70191b3a88991e","name":"function 1","func":"let vt1 = flow.get('zadana');\nlet vt2 = flow.get('Bufor');\n\nif (vt1 > vt2) {\n msg.payload = \"1\";\n return [null, msg];\n}\n\nif (vt1 <= vt2) {\n msg.payload = \"1\";\n return [msg, null]; \n} ","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":760,"y":200,"wires":[["8b12998edf9981b6"],["02fefb2777decf9f"]]},{"id":"1fea41839e82cd59","type":"api-current-state","z":"2b70191b3a88991e","name":"E_zawory_podłogówki","server":"2513de51.f4bb22","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":" switch.elekrtozawory_podlogowki","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":620,"y":400,"wires":[[],[]]},{"id":"a60d5a3feee605cf","type":"server-state-changed","z":"2b70191b3a88991e","name":">Temp. podogówki","server":"2513de51.f4bb22","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.zadana_temperatura_bufora_2_4","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":">Temp. podogówki","propertyType":"flow","value":"","valueType":"entityState"}],"x":90,"y":240,"wires":[["0be102f894f17647"]]},{"id":"c9a406eb5ea84eec","type":"server-state-changed","z":"2b70191b3a88991e","name":"Temperatura bufora 2/4","server":"2513de51.f4bb22","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.czujniki_temperatury_bufor_2_4","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":100,"y":180,"wires":[["0be102f894f17647"]]},{"id":"4bb3d977c447fe99","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Panorama ON","server":"2513de51.f4bb22","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_panorama"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":800,"y":20,"wires":[[]]},{"id":"d433f2e2187ff922","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Panorama OFF","server":"2513de51.f4bb22","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_panorama"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":800,"y":80,"wires":[[]]},{"id":"debbf12fe48ed636","type":"inject","z":"08c3cfdcdd2eaac6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":70,"y":200,"wires":[["e70a52ad8d2173d3","281702da0309fd51"]]},{"id":"e70a52ad8d2173d3","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":">Panorama","server":"2513de51.f4bb22","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.panorama","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":">Panorama","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":290,"y":40,"wires":[["5a351b60a64ecaf3"]]},{"id":"5a351b60a64ecaf3","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Temp.Panorama","server":"2513de51.f4bb22","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_panorama","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Temp.Panorama","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":460,"y":40,"wires":[["1b9284026207cf29"]]},{"id":"1b9284026207cf29","type":"function","z":"08c3cfdcdd2eaac6","name":"Panorama","func":"let vt1 = flow.get('Temp.Panorama');\nlet vt2 = flow.get('>Panorama');\n\nif (vt1 > vt2) {\n msg.payload = \"1\";\n return [null, msg];\n}\n\nif (vt1 <= vt2) {\n msg.payload = \"1\";\n return [msg, null]; \n} ","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":40,"wires":[["4bb3d977c447fe99"],["d433f2e2187ff922"]]},{"id":"05e8c6da6f1a81e5","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Panorama ON","server":"2513de51.f4bb22","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_panorama"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":140,"wires":[[]]},{"id":"e6e54b38b8f4c610","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Panorama OFF","server":"2513de51.f4bb22","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_panorama"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":900,"y":200,"wires":[[]]},{"id":"281702da0309fd51","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":">Poddasze","server":"2513de51.f4bb22","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.poddasze_biurko","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":">Poddasze","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":290,"y":160,"wires":[["540a671b1285559e"]]},{"id":"540a671b1285559e","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Temp.poddasze","server":"2513de51.f4bb22","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_poddasze_biurko","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Temp.poddasze","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":500,"y":160,"wires":[["1e9cdb762967bc22"]]},{"id":"1e9cdb762967bc22","type":"function","z":"08c3cfdcdd2eaac6","name":"Biurko","func":"let vt1 = flow.get('Temp.poddasze');\nlet vt2 = flow.get('>Poddasze');\n\nif (vt1 > vt2) {\n msg.payload = \"1\";\n return [null, msg];\n}\n\nif (vt1 <= vt2) {\n msg.payload = \"1\";\n return [msg, null]; \n} ","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":710,"y":160,"wires":[["05e8c6da6f1a81e5"],["e6e54b38b8f4c610"]]}]
A dobry , to patrzeć na inne rozwiązania
Wstaw takie dobre, będę mógł porównać, inaczej to tylko przekomarzanie się z Twojej strony.
Masz już praktycznie wszystkie wytyczne, ja mialem gorzej bo nie znałem dodatkowych warunków na wstępie
Nie ma problemu ,żeby zrobić to wszystko w jednej funkcji ( czyli wszystkie wejścia - temperatury , stany zaworów wprowadzić do funkcji ) , a wyście z funkcji to jeden node ,ktory potrafi włączyć i wyłączyć pompę. Bez żadnych interwałów 🙂
Wiesz... Dla mnie nie jest problemem naprawa fotela dentystycznego, rentgena czy, kątnicy... Ale tego co opisałeś powyżej nie potrafię i właśnie próbuję się nauczyć 😀
właśnie próbuję się nauczyć
To zerknij na razie na to i porównaj z tym jak to zrobiłeś. Nie trzeba dublować nodów żeby były wyzwalaczmi i jednocześnie zapisały swoje wartości w zmiennych. Skoro rozbiłęś ten proces na dwa odzielne przepływy, to jeden może wyglądać tak. Celowo nie powielam tego o czym pisałem wcześniej.
[{"id":"2b70191b3a88991e","type":"tab","label":"Ogrzewanie sekcja bufora","disabled":false,"info":"","env":[]},{"id":"8b12998edf9981b6","type":"api-call-service","z":"2b70191b3a88991e","name":"Pompa podłogówki ON","server":"2513de51.f4bb22","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_pompa_podlogowki"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":180,"wires":[[]]},{"id":"02fefb2777decf9f","type":"api-call-service","z":"2b70191b3a88991e","name":"Pompa podłogówki OFF","server":"2513de51.f4bb22","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_pompa_podlogowki"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1030,"y":240,"wires":[[]]},{"id":"b2ce285f8753c8e9","type":"function","z":"2b70191b3a88991e","name":"function 1","func":"let vt1 = flow.get('zadana');\nlet vt2 = flow.get('Bufor');\nlet vt3 = flow.get('zawory')\nif (vt1 > vt2 && vt3 == \"true\") {\n msg.payload = \"1\";\n return [msg, null];\n}\n\nif (vt1 <= vt2 || vt3 == \"false\") {\n msg.payload = \"1\";\n return [null, msg];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":760,"y":200,"wires":[["8b12998edf9981b6"],["02fefb2777decf9f"]]},{"id":"1fea41839e82cd59","type":"api-current-state","z":"2b70191b3a88991e","name":"E_zawory_podłogówki","server":"2513de51.f4bb22","version":3,"outputs":2,"halt_if":"off","halt_if_type":"str","halt_if_compare":"is","entity_id":" switch.elekrtozawory_podlogowki","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":580,"y":340,"wires":[["25314c54d9779f1e"],["069ebb6a39a49e69"]]},{"id":"a60d5a3feee605cf","type":"server-state-changed","z":"2b70191b3a88991e","name":">Temp. podogówki","server":"2513de51.f4bb22","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.zadana_temperatura_bufora_2_4","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"zadana","propertyType":"flow","value":"","valueType":"entityState"}],"x":490,"y":240,"wires":[["b2ce285f8753c8e9"]]},{"id":"c9a406eb5ea84eec","type":"server-state-changed","z":"2b70191b3a88991e","name":"Temperatura bufora 2/4","server":"2513de51.f4bb22","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"sensor.czujniki_temperatury_bufor_2_4","entityidfiltertype":"exact","outputinitially":false,"state_type":"num","haltifstate":"","halt_if_type":"num","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"},{"property":"Bufor","propertyType":"flow","value":"","valueType":"entityState"}],"x":480,"y":160,"wires":[["b2ce285f8753c8e9"]]},{"id":"069ebb6a39a49e69","type":"change","z":"2b70191b3a88991e","name":"Pompa Praca","rules":[{"t":"set","p":"zawory","pt":"flow","to":"true","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":820,"y":380,"wires":[[]]},{"id":"25314c54d9779f1e","type":"change","z":"2b70191b3a88991e","name":"Pompa Stop","rules":[{"t":"set","p":"zawory","pt":"flow","to":"false","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":810,"y":300,"wires":[["02fefb2777decf9f"]]},{"id":"2513de51.f4bb22","type":"server","name":"Home Assistant","addon":true}]
I nie sugeruj się tym, że wszystko można zapisać w jednej funkcji, tylko staraj się tak budować procesy, żeby były dla Ciebie zrozumiałe i łatwe w modyfikacji. Np dodanie do istniejącego przepływu warunku Ogrzewanie ON/OFF realizowane jednym przełącznikiem w HA nie powinno zmuszać do przepisania całej funkcji.
Witam ponownie. Podłogówka hula aż miło jednak trzeba zrobić krok dalej. Nie wiem jak napisać funkcję która będzie brała informację z innej funkcji. Najlepiej pokaże to kod. A właściwie błędy które generuje funkcja Panorama.
[{"id":"1c7b99b3333d6276","type":"tab","label":"Ogrzewanie sekcja bufora","disabled":false,"info":"","env":[]},{"id":"08c3cfdcdd2eaac6","type":"tab","label":"Ogrzewanie podłogowe","disabled":false,"info":"","env":[]},{"id":"1a9033b6.071e8c","type":"server","name":"Home Assistant","addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","statusSeparator":"","enableGlobalContextStore":false},{"id":"b7797abfd87bc6e2","type":"server","name":"Home Assistant","addon":true},{"id":"2513de51.f4bb22","type":"server","name":"Home Assistant","addon":true},{"id":"14b9a3a7b01c92db","type":"api-call-service","z":"1c7b99b3333d6276","name":"Pompa podłogówki OFF","server":"b7797abfd87bc6e2","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_pompa_podlogowki"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":730,"y":240,"wires":[[]]},{"id":"b903d8c4f789a2e4","type":"function","z":"1c7b99b3333d6276","name":"Praca pompy","func":"let vt1 = flow.get('Bufor_2/4');\nlet vt2 = flow.get('>Bufor_2/4')\n\nif (vt1 > vt2) {\n msg.payload = \"1\";\n return [msg, null];\n}\n\nif (vt1 <= vt2) {\n msg.payload = \"1\";\n return [null, msg];\n}","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":110,"y":220,"wires":[["7311f35442c4c130","f650644cdc7764aa"],["14b9a3a7b01c92db","24c6091b863b3b30"]]},{"id":"b1da2881016ffe0e","type":"inject","z":"1c7b99b3333d6276","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"10","topic":"","payload":"","payloadType":"date","x":90,"y":100,"wires":[["13416b263aadb697"]]},{"id":"13416b263aadb697","type":"api-current-state","z":"1c7b99b3333d6276","name":">Bufor_2/4","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.zadana_temperatura_bufora_2_4","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":">Bufor_2/4","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":250,"y":100,"wires":[["b759620856f79962"]]},{"id":"b759620856f79962","type":"api-current-state","z":"1c7b99b3333d6276","name":"Bufor_2/4","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_bufor_2_4","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Bufor_2/4","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":420,"y":100,"wires":[["b903d8c4f789a2e4"]]},{"id":"41248333f892512d","type":"api-call-service","z":"1c7b99b3333d6276","name":"Pompa podłogówki ON","server":"b7797abfd87bc6e2","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_pompa_podlogowki"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":720,"y":180,"wires":[[]]},{"id":"7311f35442c4c130","type":"api-current-state","z":"1c7b99b3333d6276","name":"E_zawory_podogówki","server":"1a9033b6.071e8c","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"switch.elekrtozawory_podlogowki","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":420,"y":180,"wires":[["41248333f892512d"],["14b9a3a7b01c92db"]]},{"id":"24c6091b863b3b30","type":"debug","z":"1c7b99b3333d6276","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":280,"y":320,"wires":[]},{"id":"f650644cdc7764aa","type":"debug","z":"1c7b99b3333d6276","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":300,"y":280,"wires":[]},{"id":"4bb3d977c447fe99","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Panorama ON","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_panorama"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":980,"y":20,"wires":[[]]},{"id":"d433f2e2187ff922","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Panorama OFF","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_panorama"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":980,"y":80,"wires":[[]]},{"id":"debbf12fe48ed636","type":"inject","z":"08c3cfdcdd2eaac6","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"10","crontab":"","once":true,"onceDelay":"1","topic":"","payload":"","payloadType":"date","x":70,"y":480,"wires":[["e70a52ad8d2173d3","281702da0309fd51","826d81cfcd8beab8","dc508e65549284db","b4b7976750cd8448","e8d8f7b67cd3cbda","2d6de27873fc93d7","4d2cd10acef81968","59b74c258a9e2d42"]]},{"id":"e70a52ad8d2173d3","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":">Panorama","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.panorama","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":">Panorama","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":470,"y":40,"wires":[["5a351b60a64ecaf3"]]},{"id":"5a351b60a64ecaf3","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Temp.Panorama","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_panorama","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Temp.Panorama","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":640,"y":40,"wires":[["1b9284026207cf29"]]},{"id":"1b9284026207cf29","type":"function","z":"08c3cfdcdd2eaac6","name":"Panorama","func":"let vt1 = flow.get('Temp.Panorama');\nlet vt2 = flow.get('>Panorama')\nlet vt3 = flow.get('>Praca pompy')\n\nif (vt1 > vt2 && vt3 == \"true\") {\n msg.payload = \"1\";\n return [null, msg];\n}\n\nif (vt1 <= vt2) {\n msg.payload = \"1\";\n return [msg, null]; \n} ","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":40,"wires":[["4bb3d977c447fe99"],["d433f2e2187ff922"]]},{"id":"05e8c6da6f1a81e5","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Biurko ON","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_poddasze_biurko"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":140,"wires":[[]]},{"id":"e6e54b38b8f4c610","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Biurko OFF","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_poddasze_biurko"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":200,"wires":[[]]},{"id":"281702da0309fd51","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":">Poddasze","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.poddasze_biurko","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":">Poddasze","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":490,"y":160,"wires":[["540a671b1285559e"]]},{"id":"540a671b1285559e","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Temp.poddasze","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_poddasze_biurko","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Temp.poddasze","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":660,"y":160,"wires":[["1e9cdb762967bc22"]]},{"id":"1e9cdb762967bc22","type":"function","z":"08c3cfdcdd2eaac6","name":"Biurko","func":"let vt1 = flow.get('Temp.poddasze');\nlet vt2 = flow.get('>Poddasze')\n\nif (vt1 > vt2) {\n msg.payload = \"1\";\n return [null, msg];\n}\n\nif (vt1 <= vt2) {\n msg.payload = \"1\";\n return [msg, null]; \n} ","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":810,"y":160,"wires":[["05e8c6da6f1a81e5"],["e6e54b38b8f4c610"]]},{"id":"147eebe317809563","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Sypialnia ON","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_sypialnia"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":970,"y":260,"wires":[[]]},{"id":"ce67dbc16d3d53f0","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Sypialnia OFF","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_sypialnia"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":980,"y":320,"wires":[[]]},{"id":"826d81cfcd8beab8","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":">Sypialnia","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.sypialnia","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":">Sypialnia","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":490,"y":280,"wires":[["f6b30600287a442d"]]},{"id":"f6b30600287a442d","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Sypialnia","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_sypialnia","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Sypialnia","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":640,"y":280,"wires":[["dfc136e245ca77c2"]]},{"id":"dfc136e245ca77c2","type":"function","z":"08c3cfdcdd2eaac6","name":"Sypialnia","func":"let vt1 = flow.get('Sypialnia');\nlet vt2 = flow.get('>Sypialnia')\n\nif (vt1 > vt2) {\n msg.payload = \"1\";\n return [null, msg];\n}\n\nif (vt1 <= vt2) {\n msg.payload = \"1\";\n return [msg, null]; \n} ","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":800,"y":280,"wires":[["147eebe317809563"],["ce67dbc16d3d53f0"]]},{"id":"d317eef4ae4bbdfc","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Północny_taras ON","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_taras_polnoc"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1050,"y":500,"wires":[[]]},{"id":"84ae032958adfa21","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":">Północny_taras","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.taras_polnocny","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":">Północny_taras","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":470,"y":520,"wires":[["b8f5b716dcc70d42"]]},{"id":"b8f5b716dcc70d42","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Północny_taras","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Północny_taras","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":660,"y":520,"wires":[["f7cce3ddf541e18a"]]},{"id":"f7cce3ddf541e18a","type":"function","z":"08c3cfdcdd2eaac6","name":"Północny_taras","func":"let vt1 = flow.get('Północny_taras');\nlet vt2 = flow.get('>Północny_taras')\n\nif (vt1 > vt2) {\n msg.payload = \"1\";\n return [null, msg];\n}\n\nif (vt1 <= vt2) {\n msg.payload = \"1\";\n return [msg, null]; \n} ","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":840,"y":520,"wires":[["d317eef4ae4bbdfc"],["f19a7e90a0a55026"]]},{"id":"f19a7e90a0a55026","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Północny_taras OFF","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_taras_polnoc"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":560,"wires":[[]]},{"id":"5660174d8662f594","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Łazienka_góra ON","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_lazienka_gora"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1030,"y":400,"wires":[[]]},{"id":"5db0b969dd7be01b","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":">Łazienka_góraOFF","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_lazienka_gora"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1040,"y":440,"wires":[[]]},{"id":"dc508e65549284db","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":">Łazienka_góra","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.lazienka_gora","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":">Łazienka_góra","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":480,"y":420,"wires":[["b073a990c851c16e"]]},{"id":"b073a990c851c16e","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Łazienka_góra","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_sypialnia","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Łazienka_góra","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":660,"y":420,"wires":[["fe4ec3ca902abbef"]]},{"id":"fe4ec3ca902abbef","type":"function","z":"08c3cfdcdd2eaac6","name":"Łazienka_góra","func":"let vt1 = flow.get('Łazienka_góra');\nlet vt2 = flow.get('>Łazienka_góra')\n\nif (vt1 > vt2) {\n msg.payload = \"1\";\n return [null, msg];\n}\n\nif (vt1 <= vt2) {\n msg.payload = \"1\";\n return [msg, null]; \n} ","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":840,"y":420,"wires":[["5660174d8662f594"],["5db0b969dd7be01b"]]},{"id":"5406af23674f36b6","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Łazienka dolna ON","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_lazienka_dol"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1150,"y":740,"wires":[[]]},{"id":"b4b7976750cd8448","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":">Łazienka_dół","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.lazienka_dol","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":">Łazienka_dół","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":360,"y":780,"wires":[["d6889f1d0f483d29"]]},{"id":"e84faaff35c7d889","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Łazienka_dolna_prysznic","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_lazienka_dolna_prysznic","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Łazienka_dolna_prysznic","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":750,"y":780,"wires":[["79ab5534c46a2969"]]},{"id":"79ab5534c46a2969","type":"function","z":"08c3cfdcdd2eaac6","name":"Łazienka_góra","func":"let vt1 = flow.get('Łazienka_dolna');\nlet vt2 = flow.get('Łazienka_dolna_prysznic');\nlet vt3 = flow.get('>Łazienka_dół')\n\nif (vt1 && vt2 > vt3) {\n msg.payload = \"1\";\n return [null, msg];\n}\n\nif (vt1 && vt2 < vt3) {\n msg.payload = \"1\";\n return [msg, null]; \n} ","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":960,"y":780,"wires":[["5406af23674f36b6"],["e2bc9ec5afca2124"]]},{"id":"d6889f1d0f483d29","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Łazienka_dolna","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_lazienka_dolna","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Łazienka_dolna","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":540,"y":780,"wires":[["e84faaff35c7d889"]]},{"id":"e2bc9ec5afca2124","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Łazienka dolna OFF","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_lazienka_dol"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1160,"y":800,"wires":[[]]},{"id":"76278a3e4afc0e62","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Wykusz i jadalnia ON","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_jadalnia_i_wykusz"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1120,"y":600,"wires":[[]]},{"id":"e8d8f7b67cd3cbda","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":">Wykusz_i_jadalnia","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.wykusz_i_jadalnia","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":">Wykusz_i_jadalnia","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":420,"y":640,"wires":[["0940f5f76d669350"]]},{"id":"1f44d226c5d13e9c","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Wykusz","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_wykusz","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Wykusz","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":740,"y":640,"wires":[["c886330b696cf0e9"]]},{"id":"c886330b696cf0e9","type":"function","z":"08c3cfdcdd2eaac6","name":"Wykusz i jadalnia","func":"let vt1 = flow.get('Jadalnia');\nlet vt2 = flow.get('Wykusz');\nlet vt3 = flow.get('>Wykusz_i_jadalnia')\n\nif (vt1 && vt2 > vt3) {\n msg.payload = \"1\";\n return [null, msg];\n}\n\nif (vt1 && vt2 < vt3) {\n msg.payload = \"1\";\n return [msg, null]; \n} ","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":910,"y":640,"wires":[["76278a3e4afc0e62"],["044ba02d8846f926"]]},{"id":"0940f5f76d669350","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Jadalnia","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_jadalnia","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Jadalnia","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":600,"y":640,"wires":[["1f44d226c5d13e9c"]]},{"id":"044ba02d8846f926","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Wykusz i jadalnia OFF","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_jadalnia_i_wykusz"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1120,"y":660,"wires":[[]]},{"id":"f7eb76271b8d2f04","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Przedpokój ON","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_przedpokoj"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":860,"wires":[[]]},{"id":"2d6de27873fc93d7","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":">Przedpokój","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.przedpokoj","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":">Przedpokój","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":370,"y":900,"wires":[["379bcb99b9204e76"]]},{"id":"f14518ebaf81fbe0","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Przedpokój","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_przedpokoj","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Przedpokój","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":670,"y":900,"wires":[["8ab42ecaedfa3f35"]]},{"id":"8ab42ecaedfa3f35","type":"function","z":"08c3cfdcdd2eaac6","name":"Przedpokój","func":"let vt1 = flow.get('Przedpokój');\nlet vt2 = flow.get('Wejście');\nlet vt3 = flow.get('>Przedpokój')\n\nif (vt1 && vt2 > vt3) {\n msg.payload = \"1\";\n return [null, msg];\n}\n\nif (vt1 && vt2 < vt3) {\n msg.payload = \"1\";\n return [msg, null]; \n} ","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":830,"y":900,"wires":[["f7eb76271b8d2f04"],["100917c8bc69f178"]]},{"id":"379bcb99b9204e76","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Wejście","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_wejscie","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Wejście","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":520,"y":900,"wires":[["f14518ebaf81fbe0"]]},{"id":"100917c8bc69f178","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Przedpokój OFF","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_przedpokoj"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1020,"y":920,"wires":[[]]},{"id":"4d2cd10acef81968","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":">Przybudówka","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.przybudowka","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":">Przybudówka","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":400,"y":1020,"wires":[["b847def88dbc0bee"]]},{"id":"b847def88dbc0bee","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Przybudówka","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_przybudowka","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Przybudówka","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":580,"y":1020,"wires":[["a42d1ae3bf466603"]]},{"id":"a42d1ae3bf466603","type":"function","z":"08c3cfdcdd2eaac6","name":"Przybudówka","func":"let vt1 = flow.get('Przybudówka');\nlet vt2 = flow.get('>Przybudówka')\n\nif (vt1 > vt2) {\n msg.payload = \"1\";\n return [null, msg];\n}\n\nif (vt1 <= vt2) {\n msg.payload = \"1\";\n return [msg, null]; \n} ","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":760,"y":1020,"wires":[["1b6901c627771c47"],["0db4e61f0ff1145f"]]},{"id":"1b6901c627771c47","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Przybudówka ON","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_przybudowka"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":990,"y":1000,"wires":[[]]},{"id":"0db4e61f0ff1145f","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Przybudówka OFF","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_przybudowka"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":990,"y":1060,"wires":[[]]},{"id":"7908612a72f90986","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Salon ON","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_on","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_salon"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1060,"y":1200,"wires":[[]]},{"id":"59b74c258a9e2d42","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":">Salon","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"input_number.salon","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":">Salon","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":380,"y":1160,"wires":[["5a4f6f759385ce13"]]},{"id":"3cb27710758e30b3","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Salon_telewizor","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_salon_przed_telewizorem","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Salon_telewizor","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":720,"y":1160,"wires":[["17de9a69e3054538"]]},{"id":"1027759534e63dfe","type":"function","z":"08c3cfdcdd2eaac6","name":"Salon","func":"let vt1 = flow.get('Salon_kominek');\nlet vt2 = flow.get('Salon_telewizor');\nlet vt3 = flow.get('Salon_okno');\nlet vt4 = flow.get('Salon_kanapa');\nlet vt5 = flow.get('Salon_środek');\nlet vt6 = flow.get('>Salon')\n\nif (vt1 && vt2 && vt3 && vt4 && vt5 > vt6) {\n msg.payload = \"1\";\n return [null, msg];\n}\n\nif (vt1 && vt2 && vt3 && vt4 && vt5 < vt6) {\n msg.payload = \"1\";\n return [msg, null]; \n} ","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":910,"y":1220,"wires":[["7908612a72f90986"],["2dcb054cda61a09a"]]},{"id":"5a4f6f759385ce13","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Salon_kominek","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_salon_kominek","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Salon_kominek","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":540,"y":1160,"wires":[["3cb27710758e30b3"]]},{"id":"17de9a69e3054538","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Salon_okno","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_salon_pod_oknem","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Salon_okno","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":390,"y":1220,"wires":[["a8cfbe2c4d813a63"]]},{"id":"a8cfbe2c4d813a63","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Salon_kanapa","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_salon_przed_kanapa","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Salon_kanapa","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":560,"y":1220,"wires":[["5967014db7bc36b0"]]},{"id":"5967014db7bc36b0","type":"api-current-state","z":"08c3cfdcdd2eaac6","name":"Salon_środek","server":"1a9033b6.071e8c","version":3,"outputs":1,"halt_if":"","halt_if_type":"num","halt_if_compare":"is","entity_id":"sensor.czujniki_temperatury_salon_srodek","state_type":"num","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"},{"property":"Salon_środek","propertyType":"flow","value":"","valueType":"entityState"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":740,"y":1220,"wires":[["1027759534e63dfe"]]},{"id":"2dcb054cda61a09a","type":"api-call-service","z":"08c3cfdcdd2eaac6","name":"Salon OFF","server":"1a9033b6.071e8c","version":5,"debugenabled":false,"domain":"switch","service":"turn_off","areaId":[],"deviceId":[],"entityId":["switch.czujniki_temperatury_salon"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1070,"y":1260,"wires":[[]]}]