My use case is trying to assign one or more devices on/off scheduling at specific times WHEN and only when they are in specific areas like Den, Hallway, etc. So each area could presumably have different schedules assigned to them like outside lights separate from inside and the only reference then changed would be the “area” they reside.
I didn’t find this via the typical searches but I know HA lets you create areas with multiple “floors” and “rooms” even, so I don’t know why I couldn’t easily find this use case.
I am experimenting with appling “outside” as an “area” for example.
Entities are assigned an area, that is more or less static.
You would need to use some other kind of sensor to know when something moves around. That’s your first step.
It does not work like that. You would need something in each room to tell HA what devices are there. It could be via BT or by which AP the device is connected to for example.
Another example that occurs are smart plugs I use for indoor holiday lights. These devices can either be not used at all or reassigned to another task for the rest of the year.
When re-configuring the hardware each year, the smart plugs require a on-boarding process via their own mobile app. That process involves assigning a room name or “area” already. I’m hoping to use that tiny change as enough to associate entirely different on/off scheduling for connected lights.
I am hoping HA can assign a area like “hallway” for this purpose that is only used for holiday lights.
I know I can trigger entire scenes by a “area”. I am trying to figure out if a automation can be assigned to a “area” to likely even call up a scene or two. That way potentially it wouldn’t’ matter if it’s zero to a thousand devices, they would all get the same schedule without being called by a device name, only their shared assigned “areas”.
–
Another example:
The only reason I can think for why HA allows “areas” to be assigned
floors like first-floor versus second-floor would be to call them all by their assigned “areas” in the same way.
You keep using the term Automation when it sounds like you are talking about Actions…
Also, it might help if you think of Areas as “Rooms”.
Actions can be targeted on Areas, like @woody6402 showed in their post above.
It would be helpful if you would clarify what you are talking about here. Do you mean the new “intuitve triggers” that are in this months beta? Or, do mean to say that you can target the scene.turn_on action on an Area? The term “trigger” has a specific meaning in HA automations, if you use it out of place it makes it difficult for us to understand what you are trying to say without extra details and context.
All Automations are entities. So, yes they can be assigned to an Area… but it is not clear what you mean. Without using extensive templating, assigning an automation to an Area has no effect on its action sequence.
Again, it is unclear what you are trying to say here.What do you mean by “call”? Areas and Floor have a built-in hierarchy. Areas are sub-units of Floors.They don’t have to map exactly to specific real-world rooms, but an Area can only be part of a Floor, not the other way around.
If you target an action on a Floor it will affect every entity it can, in every Area on the Floor. So if you set “First Floor” as the target the of the light.turn_on action:
… it will turn on everylight entity, in all the Areas assigned to that floor.
You may want to take a look at Labels. Like Floors and Areas, Labels can be used as the target of actions, but they do not have a built-in hierarchy and entities can have multiple Labels.
So, for your holiday light example, your switch could be labelled “Holiday” and your holiday light automation schedule would just target that Label. Whether you add and remove the Labels throughout the year or build your automations with logic to determine which label gets priority is up to you.
I see it as simply abstracting or tagging and calling the functions inside each blindly, not having to know exactly which devices are present. It’s also about wanting to retain on/off scheduling in areas / rooms so as to not have to go through, what are otherwise extensive HA onboarding, since every device would otherwise have to be manually configured for schedules and each room can have different on/off schedules and multiple times each are called. If it’s possible with Areas, I can’t find it.
If it’s as simple as calling a action under a automation, I would think Areas and the customized Area names would appear under Then Do in my automation. I am not seeing that.
Scene turn on is probably adequate for what I’m considering. It’s just a blind group of devices being turned on and off on a precise schedule. – I am tired have doing that on a per device basis and really hoped Areas might abstract that for me!
An example for how I want to call the first-floor second-floor example is like a emergency lights on/off. So every light that is tagged for the first-floor area tag turns on to 100%, no matter what they typically use for brightness.
I actually haven’t used Labels much, so I will have to check it out for certain. Again, I am hoping to retain what can be complex on/off scheduling per Area. It gets over-the-top when I have to do that from scratch for every single device.
That is actually being tested in the current beta:
Are you using Device actions? If so, that is likely partly to blame for this confusion. Device actions (as well as Device triggers and Device conditions) may be a convenient way to start out, but they are actually pretty limiting. There’s a whole article on it in the Community Cookbook:
If you use the other types of action available in the Action block (aka Then Do) you will find nearly all of them allow you to target not just by Device, but also by specific Entity ID, as well as Area and Floor… and all four target types can be used in the same action if you want.
Very do-able… as long as you don’t use an action dedicated to acting on devices
There is actually a special target keyword all that can be used for this kind of thing if you want every single light entity to turn on with a single action:
# Your trigger and conditions
# ...
actions:
- action: light.turn_on
metadata: {}
target:
entity_id: all
data:
brightness_pct: 100