Hi everybody,
I’ve set a binary sensor as explained in the docs: Template - Home Assistant (DEVICE TRACKER SENSOR WITH LATITUDE AND LONGITUDE ATTRIBUTES) but I’m stuck with a couple of issues:
the binary sensor is not seen as device tracker, therefore I can’t insert into the person/user panel. How can I add it?
the attributes piece of code rise an error as it is. I was unable to fix it.
I’m going to state the obvious here but the reason it’s not seen as a device_tracker entity is because it’s a binary_sensor entity. There is no Template Device Tracker integration:
Thank! I thought that much, still the title kinda misled me with the DEVICE TRACKER SENSOR starting title.
So I can set up a MQTT device tracker from a binary sensor?
You don’t need the Template Binary Sensor you created, just the information you used to create it. That information would be published, by an automation, to the MQTT Device Tracker’s topic.
The MQTT Device Tracker’s configuration is trivial. Basically it needs to know the MQTT topic representing the device’s state (home or away). If the device doesn’t use home or away to represent its states, then you can use two other options to specify what it uses.
I overlooked to point out that it’s all fairly trivial to create (including the automation) provided you are already using MQTT. Otherwise, you will first need to install an MQTT broker and the MQTT integration (and configure both of them). It’s not difficult but more than a few people have had trouble getting all the “plumbing” working properly.
Yeah, if I hadn’t had a working MQTT broker I would have mentioned it.
And in that case I would have probably chosen a different path, like avoiding to use the person entity all together in favour of the binary sensors I implemented and move all the automations on them.