Hi experts,
I want to add my cats like person-badges to my HA-Lovelace.
The CatFlap gives me binary signals to tell me if they are at home or not.
Unfortunately I can only add device_tracker as persons.
Is there a workaround available?
Hi experts,
I want to add my cats like person-badges to my HA-Lovelace.
The CatFlap gives me binary signals to tell me if they are at home or not.
Unfortunately I can only add device_tracker as persons.
Is there a workaround available?
You can use “device_tracker.see” in order to create a device_tracker entity in an automation.
Or you could use a MQTT device_tracker:
Just landed here looking to do the same with my Sure Petcare flap - would like to have the cats show as person badges (showing home / away as relevant)
Did you find a way to do it?
Both version above still work for creating a device_tracker of a binary_sensor.
There is a third one, composite device tracker:
(you can use it with a single binary_sensor also)
In advance to device_tracker.see it survives a restart of homeassistant.
Not sure if you found the solution (it’s been almost 3 years) but here is what I did for my cat Zorro (it is in a file called cats.yaml in the automations directory in the configuration folder):
---
- alias: "20102 - Update device tracker for Zorro"
mode: queued
trigger:
- platform: state
entity_id: binary_sensor.zorro
from: "off"
to: "on"
- platform: state
entity_id: binary_sensor.zorro
from: "on"
to: "off"
condition: []
action:
- service: device_tracker.see
data:
dev_id: "zorro"
location_name: "{{ 'home' if is_state(trigger.entity_id, 'on') else 'not_home' }}"
source_type: "router"
Recently I added the following trigger because at HA startup, the deice_tracker would only be created when the binary_sensor would toggle:
- platform: homeassistant
event: start
(and yes, I know the line condition: []
can be omitted)