- alias: TV Time trigger: - platform: state entity_id: sensor.samsungtv state: offline condition: condition: and conditions: - condition: state entity_id: sun.sun state: 'below_horizon' action: service: light.turn_off entity_id: - group.living_room - group.living_room_accents