Frankla
September 20, 2023, 4:26pm
1
I want to create a template sensor that shows me if a phone with home assistant companion is communicating with my home assistant installation or not.
Example: A phone with home assistant companion gets into an area with no data signal.
I want that template sensor to change from “alive” to “dead” after 5 minutes of missing communication.
Which of the companion sensors would yield that information? I tried hard to find one to “milk” that information, but didn’t find anything suitable.
Thanks
Frank
location updates come in every 1-3 minutes with duplicate locations not sending updates for 15 minutes, the others will have more variability.
I created a template sensor that detects when my plant sensors are not delivering updated data, something you could re-use maybe? If you could combine it with location or something.
- name: Plant 1 stale sensor
icon: mdi:flower
state: >-
{% if as_timestamp(now()) - as_timestamp(states.sensor.plant_1_illuminance.last_updated) > 43200 %}
true
{% else %}
false
{% endif %}
Frankla
September 21, 2023, 4:15pm
4
When the phone is lying on a table (it is static for several hours), there won’t be a location update, right?
So what would be a sensor with a better variability?
location updates come in every 1-3 minutes with duplicate locations not sending updates for 15 minutes, the others will have more variability.
already answered how it works in this regard 2 posts up.