Hi,
I currently have a group called “people” which lists the status of Owntracks location data. There are 2 people who live in my house so it will state something like:
Dan: home
Bex: not home
I also have FIND set up which uses WiFi signal strength to determine where your phone is within the house. I have this data listed under the “people” group as well, so the entire group on the dash will say something like:
Dan: home
Bex: not home
Dan: office
Bex: none
I was wondering if it was possible to run an IF statement on this group that says:
if $person is home then display room name
else display not home
Here is one I use as an example. The state of the sensor is on but I want it to display yes. Not exactly what you’re doing but hopefully will point you in the right direction.
- platform: template
sensors:
mike_in_bed:
value_template: '{% if is_state("binary_sensor.sleepnumber_ile_mike_is_in_bed", "on") %}Yes{% else %}No{% endif %}'
friendly_name: "Mike is in bed"
This doesn’t work because the value that should display if I am “home” (device_tracker.dan_find_location), doesn’t. It just displays “device_tracker.dan_find_location” as text rather than the value of device_tracker.dan_find_location. Any idea how to get that to work?
If I am “home” then my location could be Office / Kitchen / Living Room etc. This value is stored in the entity “device_tracker.dan_find_location”.
The If statement is supposed to look at “device_tracker.dans_dans_phone”, and if it is “home”, then display the value of “device_tracker.dan_find_location”
Well I think we’re both going to learn something new here. I’m not exactly sure how to do that and unfortunately I’m at work so I can’t dive into the research. I will look around as I can but hopefully someone jumps in here with a quick answer.