Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 103263

Light turn off event automation

$
0
0

I want to respond to a light turn off event. But my automation doesn’t trigger. I copied the layout from an event listener, but perhaps my formatting is wrong?

alias: Adaptive Lighting Auto Off - Dining Room
description: ''
trigger:
  - platform: event
    event_type: call_service
    event_data:
      domain: light
      service: turn_off
      servce_data:
        entity_id: light.dining_room_zha_group
condition: []
action:
  - service: switch.turn_off
    data: {}
    target:
      entity_id: switch.adaptive_lighting_bedroom_lamps
  - delay:
      hours: 0
      minutes: 10
      seconds: 0
      milliseconds: 0
  - service: switch.turn_on
    data: {}
    target:
      entity_id: switch.adaptive_lighting_bedroom_lamps
mode: single

The event itself

{
    "event_type": "call_service",
    "data": {
        "domain": "light",
        "service": "turn_off",
        "service_data": {
            "entity_id": [
                "light.living_room",
                "light.dining_room_zha_group"
            ]
        }
    },
    "origin": "LOCAL",
    "time_fired": "2022-05-06T19:33:50.375132+00:00",
    "context": {
        "id": "01809add36a0b2da2c5edb12e19ae7f3",
        "parent_id": "01809add3698de3666cde5041aaf37b2",
        "user_id": null
    }
}

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 103263

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>