State of presence group is "Unknown" even when group member´s state is known?

This is strange indeed. I hope someone kan help me past this issue, though.
I am using the A better presence Add-on, which shows correct presence state (Hjemme = Home).

Then I have this group.adults

  name: Presence Voksne
  icon: mdi:human-male-female
    - device_tracker.eva_presence
    - device_tracker.pal_presence

The group, however only shows state “unknown”, even though the individual state is correct (see screenshot below).
What is the catch here?

Probably because of the capitalisation of the state. Home is not the same as home.

The group logic is looking for these particular states:

STATE_HOME = "home"
STATE_NOT_HOME = "not_home"

You need to configure the addon to use lower case states.

You’re thinking of these?

Home->Just left->Away->Zone
Home->Just left->Home
Away->Just arrived->Home

They are capitalized as per default, but I have translated them to Norwegian in the config…

  home_state: Hjemme
  just_left_state: Dro nettopp
  just_arrived_state: Ankom nettopp
  away_state: Borte

Here are the default configuration

  home_state: Home
  just_left_state: Just left
  just_arrived_state: Just arrived
  away_state: Away

Then that is why the group is unknown. The group can only interpret entity member states of home or not_home to determine the group’s state.

The default should not work either.

You are right, but I don’t get the logics.
Changed the add-on to this:

  home_state: home
  just_left_state: Dro nettopp
  just_arrived_state: Ankom nettopp
  away_state: not_home

… and now the group reports correctly. Why is that? I would think a group would report “what-ever-the states” for the identities in the group…

Nope. It only looks for these particular states:

from homeassistant.const import (

Which are defied here:

# #### STATES ####
STATE_ON = "on"
STATE_OFF = "off"
STATE_HOME = "home"
STATE_NOT_HOME = "not_home"
STATE_UNKNOWN = "unknown"
STATE_OPEN = "open"
STATE_OPENING = "opening"
STATE_CLOSED = "closed"
STATE_CLOSING = "closing"
STATE_PLAYING = "playing"
STATE_PAUSED = "paused"
STATE_IDLE = "idle"
STATE_STANDBY = "standby"
STATE_ALARM_ARMED_CUSTOM_BYPASS = "armed_custom_bypass"
STATE_LOCKED = "locked"
STATE_UNLOCKED = "unlocked"
STATE_UNAVAILABLE = "unavailable"
STATE_OK = "ok"
STATE_PROBLEM = "problem"

Anything else will be unknown.

1 Like

Thank you for explaining this.
Is there a way to work around this? Because it seems we cannot use the default setting for the A better presence Add-on in a group, then:

home_state: Home
just_left_state: Just left
just_arrived_state: Just arrived
away_state: Away

I would also like to translate the add-on states

You need to ask the addon developer to support home assistant translations (and probably home assistant built in states as well).

1 Like

I just did:

I have tried this add-on and removed it again.
Unfortunately the entities are still there and cannot be deleted (write protected and not selectable for deletion in the UI).
Is there any option to remove them manually?
Any hint would be greatly appreciated,

Never mind - I have reinstalled it and stopped it properly before removing it again.
Now the entities are gone as well.