Template Sensor Group Update

I’m using room assistant to track room presence, using the mqtt_room sensor. I also created a template sensor to give me a home/away value to beef up my presence detection. However this never seems update the group it’s added to, even when it shows marked as home the group will still be marked as away.

Do I need to create a different type of sensor in order to update the group?

Blockquote

  • platform: template
    sensors:
    michael_mi:
    friendly_name: “Michael Mi”
    value_template: ‘{% if is_state(“sensor.michael_miband”, “not_home”) %} Away {% else %} Home {%- endif %}’

Blockquote

It’s not exactly clear what you’re doing, but I would suggest at least making the state of the template sensor either home or not_home, instead of Home and Away. If the group you’re adding this template sensor to contains device_tracker entities, then their states are home or not_home. The group component will look for those states, not Home and Away.

Ah, brilliant - thank you.

why not simply:

value_template: >
  {{states('sensor.michael_miband')}}

?