I have been using this configuration for 2 pir sensor with sonoff bridge to control the lights in bhaus sala. this is working fine but this is working 24/7. I would like to control this configuration to deactivate in a specific time of the day or when it is sunset until 11pm or 23:00. Any help on how I may go about the scheduling?
- alias: Turn on Bhaus Sala if there is movement trigger: - platform: state entity_id: binary_sensor.bhaus_sala_motion, binary_sensor.bhaus_kitchen_motion to: 'on' action: - service: homeassistant.turn_on data: entity_id: - switch.bhaus_sala - service: timer.start data: entity_id: timer.bhaussala - alias: Turn Off Bhaus Sala 5 minutes after trigger trigger: - platform: event event_type: timer.finished event_data: entity_id: timer.bhaussala action: - service: homeassistant.turn_off data: entity_id: - switch.bhaus_sala timer: bhaussala: duration: 00:05:00