slashback100 / presence_simulation

Home Assistant Presence Simulation
654 stars 26 forks source link

Help re event presence_simulation_change #118

Closed Wright55 closed 6 months ago

Wright55 commented 6 months ago

You advise Each time the simulation calls a service (turn on a light, open a cover, ...), an event presence_simulation_change is fired. You can catch this event in an automation, to notify you for instance. Would appreciate if you can help in setting this up. I have a group with 11 lights listed. I know how to set up basic automations but researching has not helped.

slashback100 commented 6 months ago

Here is a simple example that will create a persistent notification :

alias: Test Simulation Event
trigger:
  - platform: event
    event_type: presence_simulation_change
action:
  - service: persistent_notification.create
    metadata: {}
    data:
      message: >-
        Simulation of the entity {{ trigger.event.data.entity_id }},  {{
        trigger.event.data.service }} called with following parameters: {{
        trigger.event.data.service_data }}
mode: single
Wright55 commented 6 months ago

Thank you for this, all makes sense, however does not appear to work.This is my slightly altered automationalias: Presence Simulation Event Testdescription: ""trigger:  - platform: event    event_type: presence_simulation_changeaction:  - service: notify.whatsapp    metadata: {}    data:      message: >-        Simulation of the entity {{ trigger.event.data.entity_id }},  {{        trigger.event.data.service }} called with following parameters: {{        trigger.event.data.service_data }}mode: singleMy automation to run PS works fine and I can also trigger using the switch manually, however whilst my lights do come on as expected the event automation does not trigger.Anything else I should be doing.GrahamSent from my iPad ProOn 14 Mar 2024, at 10:46, slashback100 @.***> wrote: Here is a simple example that will create a persistent notification : alias: Test Simulation Event trigger:

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>