Hello, I have an automation that closes the curtains 1 degree above horizon, about 5 min later the curtain opens again but I cannot find what is causing it. It appears to also be about the time when the sun is setting. Below is the debug log of when it is opening again.
Note: I have a helper set up called “kitchen_curtains” that combines the left and right side.
2023-11-25 17:06:05.358 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=homeassistant, service=turn_on, service_data=entity_id=switch.kitchen_curtains>
2023-11-25 17:06:05.359 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=switch, service=turn_on, service_data=entity_id=['switch.kitchen_curtains']>
2023-11-25 17:06:05.360 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event call_service[L]: domain=homeassistant, service=turn_on, service_data=entity_id=switch.kitchen_curtains>)
2023-11-25 17:06:05.361 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7ff9f17a9f30> checked out from pool
2023-11-25 17:06:05.364 INFO (MainThread) [homeassistant.helpers.script.kitchen_curtains] kitchen_curtains: Running template script
2023-11-25 17:06:05.364 INFO (MainThread) [homeassistant.helpers.script.kitchen_curtains] kitchen_curtains: Executing step call service
2023-11-25 17:06:05.365 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=cover, service=open_cover, service_data=entity_id=['cover.kitchen_curtains']>
2023-11-25 17:06:05.367 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event call_service[L]: domain=cover, service=open_cover, service_data=entity_id={'cover.kitchen_curtain_right', 'cover.kitchen_curtain_left'}>
2023-11-25 17:06:05.370 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event call_service[L]: domain=switch, service=turn_on, service_data=entity_id=['switch.kitchen_curtains']>)
2023-11-25 17:06:05.372 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event call_service[L]: domain=cover, service=open_cover, service_data=entity_id=['cover.kitchen_curtains']>)
2023-11-25 17:06:05.373 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event call_service[L]: domain=cover, service=open_cover, service_data=entity_id={'cover.kitchen_curtain_right', 'cover.kitchen_curtain_left'}>)
2023-11-25 17:06:05.374 DEBUG (SyncWorker_29) [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m130), 'b'zigbee2mqtt/Kitchen Curtain - Right/set'', ... (4 bytes)
2023-11-25 17:06:05.375 DEBUG (MainThread) [homeassistant.components.mqtt.client] Transmitting message on zigbee2mqtt/Kitchen Curtain - Right/set: 'OPEN', mid: 130, qos: 0
2023-11-25 17:06:05.377 DEBUG (SyncWorker_62) [paho.mqtt.client] Sending PUBLISH (d0, q0, r0, m131), 'b'zigbee2mqtt/Kitchen Curtain - Left/set'', ... (4 bytes)
2023-11-25 17:06:05.380 DEBUG (MainThread) [homeassistant.components.mqtt.client] Transmitting message on zigbee2mqtt/Kitchen Curtain - Left/set: 'OPEN', mid: 131, qos: 0
2023-11-25 17:06:05.689 DEBUG (Thread-3 (_thread_main)) [paho.mqtt.client] Received PUBLISH (d0, q0, r0, m0), 'zigbee2mqtt/Kitchen Curtain - Right', ... (156 bytes)
2023-11-25 17:06:05.692 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on zigbee2mqtt/Kitchen Curtain - Right (qos=0): b'{"battery":75,"border":null,"click_control":null,"linkquality":160,"motor_fault":false,"position":0,"reverse_direction":null,"running":false,"state":"OPEN"}'