And also an automation e.g. to turn the heating to eco mode:
- id: '############'
alias: Heizung aus, wenn Mona+Rainer weg
description: ''
trigger:
- platform: state
entity_id: group.eltern
from: home
to: not_home
enabled: true
condition: []
action:
- service: climate.set_preset_mode
data:
preset_mode: eco
target:
entity_id:
- climate.heizung_esszimmer
- climate.heizung_badezimmer
- climate.heizung_kuche
- climate.heizung_wohnzimmer_2
mode: single
Before, only when both of us left home, the groups state went to “not_home”. But now, it goes to “not_home” already when even only one of us leaves. That makes the automations fire and the one staying at home sits in the dark and cold as all lights are automatically turned off, heating is reduced to eco mode and the main door gets locked
Are you certain both person entities are in the right state? HA has a bad habit of adding my laptop to my person entity every time I have to log in again on the mac app. Whenever it does I notice eventually because my person entity gets off. It starts using the location of my laptop randomly which is not on my person at all times and I have to remove that device tracker to fix it. Perhaps something similar happened to you with a laptop or tablet?
Otherwise not sure. That shouldn’t happen, sounds like a bug.
Is this a real use case? If so, kind of hilarious.
I thought home was equivalent to on for device trackers and person entities in old-style groups. Isn’t that the opposite of what they want? They want the group to be on (i.e. home) when any of the person entities are home and off (i.e. not_home) only when all of them are not home.
If that’s what they want then that’s how it works by default (all: false → if just one group member is home then the group’s state is home).
My impression is they want the group to report off only when all members leave (all: true → all group members must be home, or not home, for the group’s state to be home/not_home).
Yes, I was sitting in the living room watching the states in HA developer tools just as my wife left home. person.her went to “not_home” while person.me stayed “home”. At this very moment the state of group.eltern went to “not_home”.
Well, not for me:
Our children mostly reside in their own rooms (they are 15 and 17 and only leave theis room for bathroom visits or family meals
My wife and me are using living room and kitchen most of the time.
e.g. on school holidays, wife an I still leave for work while the children stay at their rooms.
in such situations, I want the living room lights to turn off and the living room heating to got on eco mode.
Ah I see. Its not turning off the lights and heat in the house to get them out of the house and/or annoy them. Its because teenagers hole up in their rooms and you want to leave that zone on but save energy in the rest of the house. Yep that makes more sense haha
I then set the state of device_tracker.wifessmartphone also to “not_home”
the state of person.wife followed accordingly
an then BAAM! - even before I could check, the lights went off, which means the state of group.eltern changed to “not_home” as well and the automation trigger had fired.
It does default to false when all is not explicitly specified.
The documentation explains the option’s default setting is false.
all boolean (optional; default: false).
Explicitly specifying all: false or omitting the all option produces the same behavior.
Whatever you did that made it work had nothing to do with explicitly specifying all: false. All of my groups omit specifying the all option and they behave like all: false.
I had the same issue when I have me and my wife members of 2 groups. All option kills the logical operation of the group, at list as per @rkl70’s intention (and my self). What worked for me (partially) was to split the groups (me and my wife as one group and the rest of my kids as a second group).
Now there is a new issue that really looks like a bug.
Although both members of the group are away (not home or in a defined place), the groups changes by its own to home state and than after about 15 minutes return to not_home. I have checked all the relevant entities (device_trackers, person etc.) and none were at home at this time. I have also checked my security cameras and the house was empty.
I think this calls for a bug report.