tohle by mohlo snad už fungovat a během dne si můžeš ručně odemykat a zamykat jak chceš
Kód: Vybrat vše
[{"id":"f52942bd.d5437","type":"trigger-state","z":"f1e7e052.b425e8","name":"slunce vyjde po 7:00","server":"31810f0.ea8c872","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sun.sun","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"property","comparatorType":"is","comparatorValueDatatype":"bool","comparatorValue":"true","propertyValue":"new_state.attributes.rising"},{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"above_horizon","propertyValue":"new_state.state"},{"targetType":"entity_id","targetValue":"sensor.time","propertyType":"current_state","comparatorType":">","comparatorValueDatatype":"str","comparatorValue":"07:00","propertyValue":"new_state.state"},{"targetType":"this_entity","targetValue":"","propertyType":"property","comparatorType":">","comparatorValueDatatype":"str","comparatorValue":"0","propertyValue":"new_state.attributes.elevation"},{"targetType":"this_entity","targetValue":"","propertyType":"property","comparatorType":"<","comparatorValueDatatype":"str","comparatorValue":"1","propertyValue":"new_state.attributes.elevation"}],"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":260,"y":200,"wires":[["30ced296.6db206"],[]]},{"id":"f62d9a32.a5a628","type":"trigger-state","z":"f1e7e052.b425e8","name":"slunce vyjde před 7:00","server":"31810f0.ea8c872","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sensor.time","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"07:00","propertyValue":"new_state.state"},{"targetType":"entity_id","targetValue":"sun.sun","propertyType":"property","comparatorType":"is","comparatorValueDatatype":"bool","comparatorValue":"true","propertyValue":"attributes.rising"},{"targetType":"entity_id","targetValue":"sun.sun","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"above_horizon","propertyValue":"new_state.state"}],"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":262,"y":128,"wires":[["30ced296.6db206"],[]]},{"id":"f0abb9e7.6e15e8","type":"trigger-state","z":"f1e7e052.b425e8","name":"slunce zapadne po 21:00","server":"31810f0.ea8c872","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sensor.time","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"21:00","propertyValue":"new_state.state"},{"targetType":"entity_id","targetValue":"sun.sun","propertyType":"property","comparatorType":"is","comparatorValueDatatype":"bool","comparatorValue":"false","propertyValue":"attributes.rising"},{"targetType":"entity_id","targetValue":"sun.sun","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"above_horizon","propertyValue":"new_state.state"}],"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":250,"y":500,"wires":[["30ced296.6db206"],[]]},{"id":"81f341e.2a0a2c","type":"trigger-state","z":"f1e7e052.b425e8","name":"slunce zapadne před 21:00","server":"31810f0.ea8c872","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityid":"sun.sun","entityidfiltertype":"exact","debugenabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"property","comparatorType":"is","comparatorValueDatatype":"bool","comparatorValue":"false","propertyValue":"new_state.attributes.rising"},{"targetType":"this_entity","targetValue":"","propertyType":"current_state","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":"below_horizon","propertyValue":"new_state.state"},{"targetType":"entity_id","targetValue":"sensor.time","propertyType":"current_state","comparatorType":"<","comparatorValueDatatype":"str","comparatorValue":"21:00","propertyValue":"new_state.state"},{"targetType":"this_entity","targetValue":"","propertyType":"property","comparatorType":"<","comparatorValueDatatype":"num","comparatorValue":"0","propertyValue":"new_state.attributes.elevation"},{"targetType":"this_entity","targetValue":"","propertyType":"property","comparatorType":">","comparatorValueDatatype":"num","comparatorValue":"-1","propertyValue":"new_state.attributes.elevation"}],"outputs":2,"customoutputs":[],"outputinitially":false,"state_type":"str","x":260,"y":580,"wires":[["30ced296.6db206"],[]]},{"id":"31810f0.ea8c872","type":"server","name":"Home Assistant","legacy":true,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]
Na co je ještě potřeba si dát pozor? Třeba na to aby Tě tvůj chytrý domek v -15°C nezamkl venku v pantoflích až půjdeš pro hrablo na sníh do kůlny.
- V 7:00 odemkni pokud je slunce nad obzorem
- Odemkni pokud je víc než 7:00 a slunce je mezi 0°až 1°elevace nad horizontem
- Zamkni pokud je 21:00 a slunce je nad obzorem
- Zamkni pokud je méně než 21:00 a slunce je 0°až -1°elevace pod horizontem