I’m confused about adding a “binary_sensor.carhome” to set the person to home?
The person.xx only accepts devices. Not even sure I’m clear what a device is defined as.
Do I need to make a binary_sensor inside of my esphome device a into it’s own device?
Do I need to make a beacon out of my binary_sensor.carhome ?
I don’t get it?
I’m pretty sure that you can only add presence trackers to a person. So yes, if you want your car to be attached to a person, it needs to be a presence tracker. If you’re already using the ble_presence platform, it seems like you should be able to put that into the device_tracker area instead of binary_sensor. Hopefully that’s enough to get you started. I use presence tracking, but via an outside program using MQTT where the presence tracker is setup for me, so I’m not going to be much help with a manual YAML config.
After over an hour of trying to figure out what thing is being set to home or not_home I still don’t get it.
I get this error when trying to save the code as is:
“Message malformed: template value should be a string for dictionary value @ data[‘action’][0][‘data’]”
in /config/known_devices.yaml
But were would I put it in the code?
Is this code changing the attributes of the binary_sensor from on/off to home/not_home? If so will the person.me accept the binary_sensor if it now has home/not_home attribute?
Hi, the example code is for an automation. You can create a new one via Settings → Automations and Scenes → Add automation (empty)
Then if you click on the three dots … (top right) you can switch to YAML and paste the code provided.
What the code does, is reading each change of the binary sensors, and update a device tracker accordingly. These device trackers then can be used for the person.