I have a group of entities that are managed as a group (or individually). What I need to do is set some value/condition to a subset of this group, on individual basis, if there is no presence/motion detected after x minutes. While the group is turned on, this subset of entities needs to be individually turned off after x minutes, based on no presence/motion or on again with presence/motion This behaviour should be valid while the group has been turned on, so the ‘values/conditions’ should be reset when the group is turned off.
I have no idea where to start with this. I can automate each entity individually based on presence/motion but the complication comes in as part of the subset of the group.
Yes - you understand correctly , but let me explain better.
I have a group of lamps throughout the house that are grouped and managed together (on/off).
A subset of this group is in the front of the house. At evening, we turn on the group, all lamps comes on, but when we are watching TV (in a different part of the house) I want this front part of lamps to be turned off and on, depending if there are any movement/present in that area - all while the group is on.
So if there is no movement in this front part of the house for 10minutes after the group has been turned on, I want to turn these subset(s) of lamps off. But when movement is again detected, these front lamps should be able to turn on for the duration of the movement and off again 10minutes later when the movement has stopped.
So it is basically a subset (or subsets as each lamp in the front will have its own presence sensor) of this group that needs to be managed individually while the group is turned on.
O just make the automation-action to turn off the individual entities , If the “subset” is i.e 2-3 device, no point in extra group, even thou as Pieter says, i see a point in having an “outside-lights” group, as you obviously also seems to have a need for
If I do this. the subset of entities will always turn on/off with presence/motion and not only when they are contained in the bigger group that is active. That is what I want. I do not want to make these subset of lights react to the presence/motion during the day, but only when the main-group is active.
Do I not somehow need to set a ‘value / trigger’ for each of these subset entities to determine if the main group is on, or not? If that is the case, then make them presence/motion aware.
Or did I just answer my own question? i.e. Make these subset of lights always aware with presence, but only turn them off and on when the main group is active?
The outside motion detection can be used during the day also, i.e if everyone is to a ballgame with the “Local Town Heroes” , perfect time for uninvited guests , but ofcause main-group will only be active if someone forgot to turn-of a light, or are the indoor presence-sensor also in maingroup ?
I think we added more complication to this with “indoor /outdoor” (actually it confuses me as I now have to figure out where indoor/outdoor fit into the layout). Everything is indoor.
I have a group of 9 lamps - five (1-5) in the main living area/tv//kitchen/dining room area, two in the hallway(lamps 6&7), one at the front door (lamp8) and another between to secondary bedrooms (lamp9) all in the front of the house.
All these lamps get turned on with the group “evening” on demand (lamps1-9).
When we watch TV, we want to leave on lamps 1-5 - no automation here (yet) but we want to turn off lamps 6-9 after 10 minutes that “evening” has been turned on and only if there are no movement/presence in this area. If there are movement is this area of the house, and any of these lamps (6-9) has been turned off before (due to a good change of no movement/presence) we want to turn this lamp on where the movement is (again, only while “evening” is actve).
When evening is not active, no automation is required for any of these lamps. (I have different rules for when I’m away from home - so no need to get this into the picture - only ‘evening’ is relevant.)
This presence/movement action that triggers the lamps 6-9 off/on, can happen multiple times while evening is on.
When it is bedtime and we turn off evening, all 9 lamps gets turned off.
So to me it looks that I need some trigger/condition to know if ‘evening’ is on or not, to be able to turn lamps (6-9) off with no procense or on with presence. Although I have defined helpers to each of these swithes for the lamps and defined them all in the group evening, I cannot seem to get the status for the group evening to setup a condition for the lamps based on presence/motion.
I think a big problem here is the “way” he present his “use-cases”, and as he mention, he even him self get confused bc the way he thinks/write.
@bert269
Best wold be if you specify your various “Scenarios” in i.e p1 1, pt2, and go on from there specify in an easy “overview” it would help you
I.e
When "evening group " turned on by “Demand” (whatever that is) “turn on all lights 1-9”
when “evening group " turned on by “Demand” turnoff 6-9 after 10min”
When motion detected in “area 6-9” turn-on light 6-9 , if not “on”
when no_motion detected in “area 6-9” turnoff light 6-9
etc.etc, take it in peaces, to understand the whole picture
What is “on demand”, another automation a click on a button ?
The other “area” of the House , is that 1 area for 6-9, controlled by 1 motion/presence device-sensor ? are this/these sensors battery driven(meaning always on, waiting for motion/no motion, i know i can’t “turn-of” mine, it’s just “reacts” and send it’s states to ha, automation/scripts decide what to do about that, and when) ? .
You also have above " Condition" " Turn on 6-9 “for 10min(or off after 10min)” , Does that goes for the no-motion-detected “turn-off” as well, or are you specifying if no motion-detected, somehow else, somewhere ?
I would definitely make 2 groups, 1-5 + 6-9 turned on/ by “demand” or both group included in “evening-group” , if your scenarios is somehow as i described
If you have multiple motion/presence sensor in multiple place, controlling each(or subsets) of 6-9 , you should also specify this in an easy “overview” as above
@ boheme61
Thanks for the info. I finally have time to respond.
By “on demand” I mean it is by voice and not scheduled - we tell Alexa or Google to 'Turn on Evening"
Yes, there are two areas of the house - the main living area (1-5) where we spend most of the evening at - those lights should stay on until we “turn Evening off”.
Area 2 is at the front of the house - that is not constantly visited during the time that “Evening” is on, but sometimes. These are lights 6-9. There will be two sensors to control these lights that is closest to each of the two sensors.
When evening is turn on, all nine lights should turn on. Inside this “evening time” (the time from when we turn it on to when we turn it off) lights in Area 2 should turn off after 10minutes with no movement. If there is movement (during evning) they must turn on, stay on for 10minutes and turn off again - all the time while evening is active.
When we turn evening off, all 9 lights should turn off, no matter if 6-9 was turn off or on by movement. The movement action for 6-9 should only be active while evening is active. Other times of the day, these lights do not need any automation.
I have assembled ESP32 devices with an mmWave detector and powered via USB. They work great and the nice thing is it very cheap and easy to assemble and works great, The sensitivity of the radar can be adjusted on the distance from the sensor, the strenght of the radar as well as how long to wait before registeingin movement and how long to register movement.
I think I should go the condition route with an OR inside and AND. Let me think about this a little as I have never done any condition coding yet.