Open Toxicable opened 1 month ago
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (automation
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
automation documentation automation source (message by IssueLinks)
On your automation select yaml mode and then copy it and paste here in a code-block 👍
@gjohansson-ST Ah yeah, here's that automation:
alias: leave home test
description: ""
trigger:
- platform: zone
entity_id: person.fabian
zone: zone.home
event: leave
condition: []
action:
- device_id: ...
domain: mobile_app
type: notify
message: test
title: fabian left
mode: single
Also I have the track device setup here
Your automation action is not correct. Try this:
alias: leave home test
description: ""
trigger:
- platform: zone
entity_id: person.fabian
zone: zone.home
event: leave
condition: []
action:
- action: notify.fabian
data:
title: "Fabian left"
message: "test"
mode: single
If you are using this automation to see run automations based on if your house is empty or not, I recommend adding more triggers, just because phones don't always update that quick imho.
This is my trigger for presence home:
trigger:
- platform: zone
entity_id:
- person.a
- person.b
zone: zone.home
event: enter
- platform: state
entity_id: zone.home
from: '0'
And this for presence away:
trigger:
- platform: state
entity_id: zone.home
to: '0'
Your automation action is not correct.
@dhoeben This was configured via the UI, so the yaml is generated. I verified this by triggering the notification, which has been successful so I don't think the issue is in the action.
If you are using this automation to see run automations based on if your house is empty or not
The end goal is just for when the one person leaves home, it's not relevant for others
Still it does not correspondent to the docs. https://www.home-assistant.io/integrations/notify/
Might be worth trying as the rest looks correct.
The problem
I've been trying to configure a notification when I leave home. I'm using the companion app on my iphone to provide updates. Which has both an internal and external url configured, along with all update sources enabled The updates are being logged in logbook but they are not triggering the automation.
On top of that, History shows that the zone is still Home even though logbook showed a zone change detected
I can force the automation to trigger by setting my gps coordinates on my iphone in the debug console, but when I set the state it does not trigger the automation.
There's a bit more detail in the Home Assistant discord thread I opened
What version of Home Assistant Core has the issue?
core-2024.9.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
No response