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

[Solved] Could someone help me to understand automation with event as trigger?

$
0
0

@stiw47 wrote:

Hi guys. I tried to automate some stuff reading documentation here: https://www.home-assistant.io/docs/configuration/events/ and here: https://www.home-assistant.io/docs/automation/trigger/

Actually, plan was some different automation, dim lights on Kodi playing and raise back on Kodi paused/idle, but since this not worked, I’m trying to make basic simple case and understand how things are going with events. Unfortunately, below is not working as well. Want to get HA android app notification when light bulb is turned on and another HA android app notification when light bulb is turned off. Below is my setup.

Configured from GUI:

was produced following in automations.yaml

- id: '1584706054922'
  alias: test bulb on
  description: ''
  trigger:
  - event_data:
      entity_id: light.bulb
      new_state: 'on'
      old_state: 'off'
    event_type: state_changed
    platform: event
  condition: []
  action:
  - data:
      message: sijalica je upaljena
    service: notify.mobile_app_sagit
- id: '1584706254500'
  alias: test bulb off
  description: ''
  trigger:
  - event_data:
      entity_id: light.bulb
      new_state: 'off'
      old_state: 'on'
    event_type: state_changed
    platform: event
  condition: []
  action:
  - data:
      message: sijalica je ugasena
    service: notify.mobile_app_sagit

When I toggle on/off this particular bulb, nothing happens, notifications are not arriving. I would mention also that same notifications are working for me, I’m using it when game is started on Playstation, but here I’m using state which is bit more simple for me. I never before used event.

I would also mention that bulb was toggled on/off from HA.

Unfortunately, there is nothing related in logs, either in Frontend Logbook or in /home-assistant.log , so I assume that my syntax isn’t good.

Could someone help me, thanks.

Posts: 9

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 96121

Trending Articles



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