Hi guys,
I’m still slowly getting my head around home assistant and feel like i’m almost there, but as soon as i understand a little more - it gives me more ideas!
Anyway - i’m stuck on a notification automation at the moment.
automation:
- id: vacuum_complete_ios_notification
alias: Vacuum Complete
trigger:
platform: state
entity_id: sensor.vacuum_cleaning_count
condition:
- condition: template
value_template: '{{ trigger.from_state.state != none }}'
action:
service: notify.ios_steves_iphone
data:
title: "Home Assistant"
message: "Jeeves has finished cleaning."
data:
push:
thread-id: "home-assistant-vacuum"
Occasionally the sensor.vacuum_cleaning_count value goes to nothing and triggers the automation.
I’ve tried a handful of different entries in the value_template: ‘{{ trigger.from_state.state != none }}’ line but none of them seem to help.
The log shows:
Line 15: 2019-01-23 14:32:04 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=sensor.vacuum_cleaning_count, old_state=<state sensor.vacuum_cleaning_count=; friendly_name=vacuum_cleaning_count @ 2019-01-23T14:29:18.645057+11:00>, new_state=<state sensor.vacuum_cleaning_count=57; friendly_name=vacuum_cleaning_count @ 2019-01-23T14:32:04.127175+11:00>>
So I’m just not sure how to ignore based on old_state=<state sensor.vacuum_cleaning_count=;
I went down the path of trying to only have it trigger on an integer increase but unfortunately got nowhere. Just wondering if anyone has any advice?
Thanks!