Światło sterowane czujką ruchu, włącznikiem i aplikacją

Witam. Potrzebuje pomocy do stworzenia procesu zapalania światła które ma być sterowane czujką, włacznikiem i z aplikacji HA. Czy wyjaśni ktoś odpłatnie. Prosze o info na PW.

Kod:

[{"id":"dfac38f170b66f79","type":"api-call-service","z":"3862e008bb2e6e9e","name":"Włącz LED down","server":"1be24b09.4dad55","version":5,"debugenabled":false,"domain":"light","service":"turn_on","areaId":[],"deviceId":[],"entityId":["light.kuchnia_rgbw"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":630,"y":1480,"wires":[[]]},{"id":"7c025213e1f131e1","type":"api-call-service","z":"3862e008bb2e6e9e","name":"LED down","server":"1be24b09.4dad55","version":5,"debugenabled":false,"domain":"light","service":"turn_off","areaId":[],"deviceId":[],"entityId":["light.kuchnia_rgbw"],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":830,"y":1560,"wires":[[]]},{"id":"720a3b79f65edc43","type":"server-state-changed","z":"3862e008bb2e6e9e","name":"Timer LED down","server":"1be24b09.4dad55","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.led_down_kuchnia_timer","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":120,"y":1640,"wires":[["9cf39bd646b75c48"]]},{"id":"12fadf83a57308f0","type":"trigger","z":"3862e008bb2e6e9e","name":"","op1":"1","op2":"0","op1type":"str","op2type":"str","duration":"120","extend":false,"overrideDelay":true,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":650,"y":1640,"wires":[["7c025213e1f131e1"]]},{"id":"9cf39bd646b75c48","type":"change","z":"3862e008bb2e6e9e","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"delay","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":1640,"wires":[["12fadf83a57308f0"]]},{"id":"52ec62c80e5754e4","type":"api-current-state","z":"3862e008bb2e6e9e","name":"Stan LED down","server":"1be24b09.4dad55","version":3,"outputs":2,"halt_if":"on","halt_if_type":"str","halt_if_compare":"is","entity_id":"light.kuchnia_rgbw","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"","forType":"num","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":360,"y":1460,"wires":[["12fadf83a57308f0"],["dfac38f170b66f79"]]},{"id":"c7b129a9a40755d6","type":"time-range-switch","z":"3862e008bb2e6e9e","name":"","lat":"52.588","lon":"14.644","startTime":"19:00","endTime":"06:00","startOffset":0,"endOffset":0,"x":150,"y":1500,"wires":[["52ec62c80e5754e4"],[]]},{"id":"bcd0a9f7f305ac3a","type":"server-state-changed","z":"3862e008bb2e6e9e","name":"Pir zigbee Kchnia","server":"1be24b09.4dad55","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.cr_kuchnia_occupancy","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"","halt_if_type":"str","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":80,"y":1580,"wires":[["c7b129a9a40755d6"]]},{"id":"1be24b09.4dad55","type":"server","name":"Home Assistant_2022","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":false}]

W razie niejasności pytaj.
PS. Piwo/Wsparcie Autorowi Forum

1 Like

Mam ustawioną autmatyzacje że po zachodzie słońca swiatło załącza się z czujki ruchu na 60 sek. Chciałbym aby wykrywanie z czujki ruchu było wyłączane po wlączeniu swiatła z HA lub włącznika fizycznego i wyłączało sie (swiatło) jesli czujka nie wykryje ruchu przez 5 min, badz wyłączenie z przycisku fizycznego lub z HA. No i trzeba tak zrobić aby te wyłączenia sie nie gryzły. A co w przypadku jesli wyłacze z przycisku fizycznego i za chwile wróce, a czujka bedzie dalej w stanie wykrycia obecności - wtedy nie załączy swiatła…???

1 Like

To wrzuć tu kod twojego flow.

A jak ten kod wygenerować?


[{“id”:“68650deb77439f73”,“type”:“server-state-changed”,“z”:“98554e64b1a795d8”,“name”:“czujka korytarz dol”,“server”:“7c0eed12.95fbc4”,“version”:4,“exposeToHomeAssistant”:false,“haConfig”:[{“property”:“name”,“value”:""},{“property”:“icon”,“value”:""}],“entityidfilter”:“binary_sensor.czujka_korytarz_dol_occupancy”,“entityidfiltertype”:“exact”,“outputinitially”:true,“state_type”:“str”,“haltifstate”:“on”,“halt_if_type”:“str”,“halt_if_compare”:“is”,“outputs”:2,“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”:130,“y”:140,“wires”:[[“6a68088e6938fadf”],[“4fbb8d040d655043”]]},{“id”:“7c0eed12.95fbc4”,“type”:“server”,“name”:“Home Assistant”,“version”:5,“addon”:true,“rejectUnauthorizedCerts”:true,“ha_boolean”:“y|yes|true|on|home|open”,“connectionDelay”:true,“cacheJson”:true,“heartbeat”:false,“heartbeatInterval”:30,“areaSelector”:“friendlyName”,“deviceSelector”:“friendlyName”,“entitySelector”:“friendlyName”,“statusSeparator”:"at: ",“statusYear”:“hidden”,“statusMonth”:“short”,“statusDay”:“numeric”,“statusHourCycle”:“h23”,“statusTimeFormat”:“h:m”,“enableGlobalContextStore”:true}]

Wyeksportuj poprawny format, twoj format “addon”:true,“ powinno być "addon":true,"
we wszystkich linijkach kodu.

[{"id":"81799e069afa0cca","type":"api-call-service","z":"79acfd52faf43b21" 

To chyba skutki użycia cytatu zamiast narzędzi do wklejania kodu… (ale pewien nie jestem)

1 Like

To już nie wiem jak. Zaznaczam właściwą automatyzacje, prawy przycisk myszy - copy selected nodes i tu wkleiłem. Co zrobiłem źle?

Nie wiemy, ale cudzysłowy są do bani.
Przywróć posta, który skasowałeś tam są chyba OK.
do wklejania kodu jest ikonka </>
a jeśli to wielolinjkowy kod (ten raczej nie jest) to trzeba go poprzedzić linijką z 3 odwrotnymi apostofami (i taką samą dodać za kodem)

Czy wogóle może ktoś wyjaśnić jak zrobić to co w filmie Artura ( Procesy z życia wzięte - Czujnik ruchu, światło i przełącznik) tylko zamiast przycisku (toggle) z włącznikiem on/off?