IHas anyone else experiance that the person.xyz state is not home or not_home. but instead Home and Not_home?
I have been using frigate and the "Frigate Camera Notificatons" and been having issues getting many notifications even tho we were home.
I had am a programmer so i dove in to the code of the blue print it self and it as line like this:
initial_home: '{{ presence_entity != '''' and presence_entity|expand|selectattr(''state'',''eq'',''home')|list|length
that aparently is the cause.
after further investigations i notice that sometimes it has this state see image (this image is a recreation as i had to chance it manually to test to code i made:)
{%
set pe = [
states.person.jenilyn,
states.person.fanno
] %}
jenilyn: {{ states.person.jenilyn.state}}
fanno : {{ states.person.fanno.state}}
test {{ pe |expand|selectattr("state", "eq", "home")|list| length != 0 }}
test2: {{ pe|expand|selectattr("state", "match", "^home$", ignorecase=true) | list | length != 0 }}
resulting in :
jenilyn: Home
fanno : not_home
test False
test2: True
so the "fix" may be to just make the test incasesensetive some how.
However given i am a programmer it seems odd to me that the "state" used for "coding" and functions would not be "universal"
i am not sure where the Differance comes from. but i suspect it may have something to do with wife and i not using same language on the phones and accounts ? she is english and i am danish.
In the app it also shows "Home" and Ude/Hjemme(danish for nothome/home)
It seems to be the wifes state that is often wrong ?
Where should i start looking.
Thanks
-> States to see the real state string