Calm down, I’m not behind my pc 24/7. Think I’m even in another time zone as well. The good thing about this kind of platform is that you can answer when you have time. Else it would be better to do live chat.
It’s about the ‘Battery level notification’ and ‘Entity unavailable notification’
Tried with empty message field, which should give a default message, as well as with a modified message.
blueprint:
name: Zone Notification
description: Send a notification to a device when a person leaves a specific zone.
domain: automation
source_url: https://github.com/home-assistant/core/blob/295b1a91c3017258b2743f951e2d2bdb2a5690da/homeassistant/components/automation/blueprints/notify_leaving_zone.yaml
input:
person_entity:
name: Person
selector:
entity:
domain: person
zone_entity:
name: Zone
selector:
entity:
domain: zone
notify_device:
name: Device to notify
description: Device needs to run the official Home Assistant app to receive notifications.
selector:
device:
integration: mobile_app
trigger:
platform: state
entity_id: !input person_entity
variables:
zone_entity: !input zone_entity
# This is the state of the person when it's in this zone.
zone_state: "{{ states[zone_entity].name }}"
person_entity: !input person_entity
person_name: "{{ states[person_entity].name }}"
condition:
condition: template
value_template: "{{ trigger.from_state.state == zone_state and trigger.to_state.state != zone_state }}"
action:
domain: mobile_app
type: notify
device_id: !input notify_device
message: "{{ person_name }} has left {{ zone_state }}"
I still haven’t quite got my head around the selectors, but try changing the blueprint to this…
blueprint:
name: Zone Notification
description: Send a notification to a device when a person leaves a specific zone.
domain: automation
source_url: https://github.com/home-assistant/core/blob/295b1a91c3017258b2743f951e2d2bdb2a5690da/homeassistant/components/automation/blueprints/notify_leaving_zone.yaml
input:
person_entity:
name: Person
selector:
entity:
domain: person
zone_entity:
name: Zone
selector:
entity:
domain: zone
notify_device:
name: Device to notify
description: Device needs to run the official Home Assistant app to receive notifications.
selector:
service:
domain: notify
trigger:
platform: state
entity_id: !input person_entity
variables:
zone_entity: !input zone_entity
# This is the state of the person when it's in this zone.
zone_state: "{{ states[zone_entity].name }}"
person_entity: !input person_entity
person_name: "{{ states[person_entity].name }}"
condition:
condition: template
value_template: "{{ trigger.from_state.state == zone_state and trigger.to_state.state != zone_state }}"
action:
service: !input notify_device
data:
message: "{{ person_name }} has left {{ zone_state }}"
… and the automation to this…
- id: '1608108681796'
alias: Zone Notification test
description: ''
use_blueprint:
path: homeassistant/notify_leaving_zone.yaml
input:
person_entity: person.jacqui
zone_entity: zone.home
notify_device: YOUR NOTIFY SERVICE ( notify.mobile_app_pixel_4 or whatever)
Reload automations, see if any errors, if not trigger it (not manually, with an actual state change) and see if it works.
If it does, see if you get the correct selectors in the ui for creating an automation from the modified blueprint.
I have the same issue, but it seems that this issue is only when you use zone.home. For every other zone notify_leaving_zone.yaml and notify_entering_zone.yaml the templates are working.
Hi, I’m trying to use the blueprint project you did to notify to telegram but it doesn’t works.
I’m trying to monitor the spathiphyllum_ble Battery (72 %)
Do you know why?
Can you help me please?
UPDATE!!!
In my opinion the problem are in the quotes!
The field “message”, in the service notify.telegram, doesn’t work if it contain quotes.
message: test WORKS
message: ‘test’ DOESN’T WORKS