Wim_L
(Wim L)
June 15, 2019, 9:05am
1
Its not possible to use room-assistant with the “mqtt room presence” sensor on the new “Persons” tracking system.
The mqtt device tracker cannot be used b/c of how room-assistant formats the mqtt message.
I’ve got room presence set up with room-assistant on a bunch of pi’s pushing to mqtt. This is great using template sensors to track my location but is it possible to turn this in to a device tracker too?
I’ve tried the MQTT device tracker but nothing seems to show, I’m not sure is this is suitable when the topics are bedroom, living room etc and not home/away.
It is ofcourse a “sensor”, not a “device tracker”. Is this an issue that pops up now b/c of the new system?
Or does this need to be changed into a device tracker?
I am also looking for a way to turn my mqtt room sensors into device trackers… I tried to use customize.yaml to change the device_class but no effect
Maybe the composite tracker could help translate
Thanks. But i think this component can use binary sensors, but not sensors… Still looking for a solution
You could add a template binary sensor in between again. Adding another layer…
Sensor > template binary sensor > composite > person
Should work but it gets a bit convoluted
Thanks for this idea ! I didn’t know about template binary sensor, i will give it a try
Wim_L
(Wim L)
October 3, 2019, 12:40pm
7
For anyone still searching for an answer, you can also use device_Tracker.see service (bottom of the page) and use a simple automation to create a device tracker. Its not really well documented but works quite well
mikeage
(Mike Miller)
March 1, 2020, 11:11am
8
@Wim_L , would you mind posting your solution?
Wim_L
(Wim L)
March 1, 2020, 11:25am
9
With the device_tracker.see service, you just make an automation. It takes a sensor and converts it to a device tracker.
Made a templated example in :
So it’s what I feared. Ty.
Solved it by simplification :
- alias: any ble tracker state
trigger:
- platform: state
entity_id:
- sensor.rtagme
- sensor.rtaghoney
- sensor.rtag3
action:
- service: device_tracker.see
data_template:
dev_id: "{{ trigger.from_state.name }}"
location_name: "{{ trigger.to_state.state }}"
1 Like
mikeage
(Mike Miller)
March 1, 2020, 11:38am
10
Thanks a lot!
FWIW, I went with trigger.from_state.object_id
instead of .name
as the name had spaces, quotes, etc.