Add the concept of floors #1021
-
ContextToday we have the notion of areas, devices and entities. Areas represents spaces in your house. We didn't call them rooms on purpose, as rooms imply that there is a physical wall, but a kitchen and living room can be a continuing space yet be each their own. Devices can have an area, and this area is then inherited by each linked entity. Users can choose to override the area on a per-entity level if needed (some devices can control devices in other rooms, like extension cords). Areas are also used for other things. Users might have a "Junk" area, a "system" area or an area per person. In the physical world there is another level of organisation in a house: floors. A house can be multuple floors, and a floor consists of 1 or more areas. Being able to reason at a floor level is useful in different scenarios:
One approach for floors could be to allow nested areas. I think that this would result in a very messy situation as it would allow anything to be done today with an area, to be done with a floor. But a device and entity should be tied to areas, not floors. DecisionWe introduce a new "Floor Registry". Each floor has a name. Areas will be updated to be able to reference the floor that they are part of. Consequences
|
Beta Was this translation helpful? Give feedback.
Replies: 17 comments 87 replies
-
Allowing nested areas was my initial thought reading this. You mention that it could be messy because it would allow anything that can be done with an area to be done with a floor. What kind of tasks can be done to an area that we wouldn't necessarily want possible with a floor? |
Beta Was this translation helpful? Give feedback.
-
I have areas for Frontyard, Backyard, Parking etc. Obviously, there's no floor definition (in the literal sense) which could support that. These are prime material for nested areas, if you ask me, particularly for voice (e.g. I have a voice satellite assigned to the "upstairs" area, one in the "kitchen" area and one in the "yard" = "frontyard"+"backyard" area). I do realize a lot of complexity comes with nesting an entity in itself, but given even the generic name "area", I think fits like a glove to nesting and solves a lot of problems. |
Beta Was this translation helpful? Give feedback.
-
Also agree that nested areas is the most desirable approach, but if creating a single nest possibility like this is far more achievable, so be it. It would still cover many use cases. However, I'd strongly advise against using the term "floors". It implies a style of home that certainly not everyone has (e.g. eliminates most apartments, ranch/bungalow houses, etc.). It would also confuse common use cases like grouping, for example, porch, driveway, and backyard into an outside umbrella area. BTW, the topic of nested areas is also a largely voted for and discussed request: |
Beta Was this translation helpful? Give feedback.
-
How does this proposal address the thermostat-per-floor use case if devices and entities are not allowed in floors? Side note: I'm also in the nested areas rather than floors camp |
Beta Was this translation helpful? Give feedback.
-
I fail to understand the contrast between the intentional vagueness of the term If devices are assigned to areas, why do we restrict users to only mass-targeting devices/entities which are physically at the same altitude? Also, this is in the proposal:
I haven't seen the use case, but I don't have any visibility to the telemetry data, so I will take that fact for granted. If so, the question is: to which floor should one assign the areas "Junk" or "System"? The beauty of areas is precisely that you can have a grouping of devices/entities based on topology without defining what that topology is, as each home has its particularities (e.g. open space living/dining areas, outside areas, open areas etc.). The introduction of floors (as an optional container for areas, but specifically connected to altitude) seems limiting at the very least. Not to mention, every single user can use nested areas, but only those with multi-story homes can use floors, which I imagine is only a fraction of the userbase. I'll try to list a few cases where nested areas would be far more useful than the current concept proposal of floors. 1Imagine a common, open-space living room and dining room, with an array of spotlights running the whole length, controlled by a single switch. One can't say that the lights are either in the living space or in the dining space. HA knows of the 2 areas (living space and dining space) as there is a "living room TV", "dining table light" etc. 2A frontyard and a backyard, tied together by a narrow corridor outside, plus a "patio" area next to the backyard. Lamp posts in both areas and a light on the patio. A patio heater (
3A house with 2 floors, a groud floor and a first floor. The master bedroom is on the ground floor and kids' bedrooms are on the upper floor. A user goes to bed in the master bedroom to do some reading before sleep and wants to "turn off the lights downstairs" (i.e. in the rest of the groud floor). Obviously floors won't help, whereas a parent area named "downstairs" which includes all ares except the master bedroom would be helpful. |
Beta Was this translation helpful? Give feedback.
-
FWIW, five years ago, I switched from home automation software created 23 years ago (Premise) to Home Assistant. Premise allowed for nested locations (areas). In addition, it allowed for an
The concept of nested areas (plus Regarding this:
Nested areas, where an area can have an
|
Beta Was this translation helpful? Give feedback.
-
@balloob,what exactly is the question here? Is it meant to gather opinions about this concept from the community? Personally, I think nested areas is a much better solution, since I have areas that are part of other areas, and devices that span multiple areas, as well as devices that span multiple floors. The concept of floors would be a sort of nice to have thing in Ha, since my house does have floors, but it would be unnecessary if we had nested areas, which in my view are necessary anyway. |
Beta Was this translation helpful? Give feedback.
-
I find "floor" to be a bad name and definition for this, it would make more sense for most users to call this an "area group". Groups are already understood by the users and also avoids the whole nested area deal. Otherwise, great idea! |
Beta Was this translation helpful? Give feedback.
-
I like the idea of a rigid well defined model. Inevitably not everything will fit. That is just abstractions. But if we weaken the abstraction too much, it makes the abstraction much less capable. Eg I think the proposed information architecture unlocks a lot of potential for the default dashboards. A looser architecture doesn't necessarily rule that out, but I think it does make it harder. Floors are useful within a house. But what is the expected usage for spaces that aren't on a floor in the house? I wouldn't want the shed, garage, drive or back garden to be in the same floor as my living room. From an implementation point of view, I can see why nested areas would be a problem. I wonder what are the use cases for doing it anyway, is nesting the only solution? The only use case I have for nesting doesn't need infinite nesting - I want to treat my living room and dining room as a single space in some situations (mainly heating). |
Beta Was this translation helpful? Give feedback.
-
With area class, and allowing things to belong to multiple area classes, that mostly solves the most idea no? |
Beta Was this translation helpful? Give feedback.
-
This is a really disappointing step for me. I don't know how many of Home assistants users that actually have more then one floor at home at all, but this is really a change that will only cater to a specific type of home. Excludes almost all users in apartments (except the few that has two floor apartments). I am really disappointed, when the change could be more generic and cater to almost all users instead (with some other kind of area grouping). I will most probably try to use the floor feature for something in my one floor apartment, but it will be ugly and not as intended. I realize not all changes will be usable to all users, but this could, with not a lot of design changes, give so much more functionality to a broader user base. |
Beta Was this translation helpful? Give feedback.
-
I think a floor with areas connected to a specific floor is a bit too rigid to be honest. It semi-works for those of us who actually live in a building with several stories, but probably makes less sense for apartments. I think that some kind of nesting is needed - perhaps not nesting per se but in some way make an area more... aware. One part of my house is very open (Dining room, TV room and an entrance hall are connected) - areas is somewhat limited as I sometimes want to use them as one room (for instance, turning off all lights if someone sleeps on the sofa and lowering all blinds), and sometimes I just want to control the devices in the TV room part. I like the area_class idea mentioned earlier, and towards that I think that annotating devices would be awesome! For instance, to be able to classify a light as ceiling light - wouldn´t it be awesome to be able to instruct HA to turn off all ceiling lights in all bedrooms on the 2nd floor? An alternative would be to be able to give an area multiple annotations, for instance (floor 1, kitchen), (floor 1, TV room, open space) and (floor 2, bedroom). This also solves problems with multiple buildings on a property - for example a garage, a guest house and shed). Then one can assign a label "unpopulated" to those areas, and have automations target all motion sensors in those "unpopulated areas" for instance. And the best thing; It has a lot of flexibility built into it! By limiting it to "just" floors I think users would need to "shoe horne" their homes to fit the HA model. TL;DR: I think the initial problem can be solved without introducing another concept, altering an existing one is probably enough (without me knowing a single bit of the actual implementation mind you - the devil is in the details so there might be technical reasons that I am not aware of) |
Beta Was this translation helpful? Give feedback.
-
To set things clear, I'm the corner Nested-areas/group's of areas or something different... I live in a three level house. However, immediately I see several troubles with the idea.
These are a few use cases that leaves me to wonder: How should I use the "floor" concept? 🤷♂️Im afraid that the concept description by @balloob there are some real-world examples that are missing from actual use-cases and the notion of "floor" is not perfect. The suggestion about area_classes might interesting that would be even more flexible and useful (but a complex concept for beginners, yes). Continuing on that thought and adjusting "area_class" to become "tags" instead would be an even more flexible way of organising your devices, entities and areas, but I think I get ahead of myself here❓ With this message, I hope to express that the concept of "floors" does not seem well thought through and is not covering all intended use cases. I hope and wish that it'll be brought up for discussion again taking all above comments in mind. |
Beta Was this translation helpful? Give feedback.
-
Ok, my response was requested; let me write up my thoughts and start with a quick TL;DR, as this story became bigger and more extensive than I initially thought it would be. Let me be clear: This post reflects my personal opinion and vision. I tried to write it in an extensive, serious, but also a little fun way, which I hope can be appreciated; but I also realize this is quite a long brain dump. Anyways... here it goes.
Now you've read that (and maybe even feel jumpy to respond to that negatively), let's dive deeper... Type of organizationWhen it comes to categorization/organization of your smart home, we could roughly distinguish two types:
The physical representation reflects the actual physical location of your home where the device resides. A non-physical representation could be anything you can think of, maybe some kind of categorization of the type of battery a device uses, or the "sort of lighting" the light fixtures in your home provide. Another critical difference between those two is that an object can only be physically in a single location at the time (yeah, science!). At the same time, a non-physical representation isn't bound to such limits (well, except for those of your imagination). With this in mind, let's look at the current situation of Home Assistant before we dive into these subjects further. The current situationWhen looking at our current organizational/categorization structure of Home Assistant (as part of the larger information architecture), boils down to the following things:
"Frenck, you forgot about integrations and groups!" Oh, yes, I did. I'll return to that later, but let's forget about those momentarily. Home Assistant represents your physical house, which has physical areas where your physical devices are in that provide one or more sensors/controls for physical devices in the form of entities. Are you catching a theme there? Let's dive deeper into each of them, keeping areas for last (as that is the hot item here 😅). The homeThe biggest, top-level category Home Assistant provides is your actual home, and it does so by being there. Everything in Home Assistant represents "stuff" in and around your house. Your house is physical; it is in a location somewhere on this planet. One exception might be an RV you drive around (but hey, we even support that!) Sure, you could create an imaginary castle in the skies, but let's be honest, for the general use case, Home Assistant represents your physical house (and its surroundings) digitally. Well, to a certain extent, of course, as it is limited to your smart devices and services. DevicesDevices represent the physical smart home devices you have in your home. This can be your AC, HAVC installation systems, solar panels, covers, lights, and many more. These devices are all pretty much real. You can hold them and place them around your house. They are thus a physical representation. "But, Frenck, what about the weather? The sun? Or the garbage collection schedule services" You are right; this is an oddity in Home Assistant. Hence, we call it "Devices and services". Internally, those are the same things for Home Assistant. Weather service is internally considered just as much a device as your Hue blub; Home Assistant does, however, represent it as a "service" (which is an internal flag on the device to represent it as such). Yet, these still provide information and data bound to your physical home. Remember, I wrote above Home Assistant represents "stuff" in and around your house. The sun data is tailored to your actual home location, the garbage collection is bound to the schedule when they pick things up from your home, and the weather is aimed at providing information about a physical location as well. EntitiesA device provides one or more entities. Entities are the most detailed/smallest/finest representation in Home Assistant. You could see them as the actual data point. Entities provide the information and controls for the different properties of a device. This can be the sensor entity that tells you your home's temperature or the switch that turns on your TV. They represent the devices' properties and controls in your home. AreaOK, ready? Time for areas. Areas represent the physical spaces in and around your home and are groupings of the devices within your house (and thus also your entities). Areas represent the physical location of physical devices. As these are physical representations, it means a device can only be in a single area at a time. Entities, by default, inherit the area the device is in. But, we do allow overriding those on an entity level. The reason for this is that some devices extend to different areas. For example, a wall switch could provide a switch entity that controls a light in a different area than the switch device itself is actually in. Fun fact: most other systems out there call these "Rooms". When introducing areas, the term "rooms" was very much considered. But we didn't go for "room" as a term, as not all homes have clear spaces that are rooms. For example, if you ever watched me live on YT, you might have noticed I have my office in my living room. I also have an open kitchen, making my kitchen, office, and living room basically one big single open room. That is why we called them "areas" and not "rooms". (Please note, this wasn't modeled after my home; I didn't even have this house at the time). But, no matter if they are rooms, spaces, or areas, they represent the same physical spaces. I can already hear you think by now: "Frenck, I use areas to group persons", "Frenck, I have an area for my system-related entities and devices", or "So, what has this to do with nesting or floors?". Hold on, this story/writing isn't done yet 😉 What about integrations?So, integrations integrate Home Assistant with devices and services and bring them into Home Assistant. For example, a Philips Hue hub brings in multiple devices (and their entities). Each of those can be in different areas within your home. Integrations, while bringing in multiple physical devices, are a non-physical categorization. Primarily by brand, protocol, or whatever reason, there is to be a separate integration for those devices or services. An integration can provide multiple devices & entities, and multiple integration can also provide multiple entities for the same devices. Let's chat about groupsA group in Home Assistant (documentation), allows you to bundle different entities into a new entity you control and monitor as a whole. This can either be a replacement of multiple other entities (e.g., a light fixture with three bulbs you control as one), or an additional control to control a group while maintaining individual control as well. Groups work only on the entity level. You can't group devices. Groups can be either a physical or a non-physical representation. You decide how you use them. Maybe you have a group of lights called romantic lights or something? Things like that are fine. What is wrong with the current situation?Nothing! However, there is a bigger request/need for more ways to organize our systems. Various forum topics and feature requests show this over and over again. The biggest example of this might be the request for folders, categories, maps, directories, or labels to categorize one's automation. This is about the highest vote request out there right now. Looking at the current situation, Home Assistant mostly tries to represent your physical home. While there is a clear need for non-physical as well. As a workaround, most of us have started to use areas to work around the problem (I admit, I have areas for persons, systems, unused stuff, and other things myself as well). Honestly, I think if "areas" were to be called "rooms" from the start, it would have been more clear in its purpose, but I honestly also think the intention of calling it "areas" still make a lot of sense. FloorsSo, this discussion is about floors. Floors are also a physical representation of your home and represent a group of areas (or rooms) in your house. Floors are not areas; you cannot assign devices or entities to them. The devices or entities on a floor are inherited by the areas a floor has. It helps Home Assistant to know more about your physical home. For example, turn off the lights upstairs or in the future, being able to represent things like temperatures on floors as well. Let's face it: many homes have multiple floors. Sure, many are in apartments or bungalows and thus will have a single floor. For the latter, this feature/proposal will not have much benefit. But it is a more correct representation of the physical world. Having floors is a good and matching representation of reality that can help us in the future (A.I. stuff, maybe?), things like voice control, but also helping us improve things like automatically generating or suggestion dashboards to make. Additionally, floors are an excellent target for automations. For example, turn off all the downstairs lights as part of a bed routine. Anyways, floors provide additional information about your physical home. Area classificationsIt was mentioned short a few times in this discussion already. We need to learn more about what areas are useful for them. I fully agree! For example, an area outside, like a garden, might need different handling. Hence, Paulus mentioned the I fully support the idea of classifications of areas. I can think of "bedroom," "living space," "kitchen," "garage," "shed," "balcony," "garden," and many more as a nice way to give more intent/hint on how the space/areas are used. We could do a lot of smart things with those! Is the same as floors? No, not really. A floor could be a larger area with other areas in it, with a "floor" classification. This will quickly bring us to the topic of nesting, which I will dive into in a second. That said, assigning entities or devices to a floor instead of areas on a floor seems wrong to me. Nested areasAlright, still with me? Time for the hot topic! Wassup with nested areas? Honestly: I don't know. 😁 From a software perspective, in general, I think nesting is always tricky and prone to unexpected behavior or issues and should be avoided. But... that doesn't exclude them from being a viable option in the long run. I've really tried understanding why people want nested areas, and the main reason I've found was: Dividing rooms into even smaller areas. One of the best examples I've found was: Having a "desk" area in your "office" area. I think this example makes a lot of sense from just that perspective. But the question is: Why is that extra division needed? Is it for controlling just the lights around your desk as a way to group? Why not use a group in that case? or something else? What I do know is that this is a separate discussion from having floors. I don't think floors kill the option of having nested areas in the future (which is a different architectural proposal/discussion). I do question its validity, but again, different discussion 😉 More non-physical categorizationAs already shortly pointed out above, there is a clear, bigger need for more non-physical categorization. Organizing stuff the way you want, freely as you see fit. The biggest example of this might be the request for folders, categories, maps, directories, tags, oor labels to categorize one's automation. This is about the highest-voted request out there right now. There are plans to address those; the challenge is making the UX for stuff like these work well. That is being looked into! (Promise!) Personally, I would love to organize my automations, scripts, scenes, and even zones into some kind of folders or categories that I can use as a non-physical way to organize the way I see fit for my mind. I've also have a POC open for labels that could be put on basically any physical thing in the home (areas, devices, entities), which would give me a non-physical categorization/organization that is fully flexible and usable as a target even (turn off all the devices marked with the label "energy-inefficient" when the solar power is dropping below a certain value and things like that). All of this... still... doesn't make the concept of floors less viable (or any of the other many, many cool suggestions in this discussion). As a matter of fact, I think floors are a really good physical property of many homes in the world that will fit a Home Automation platform really well. It might not fit everybody and every use case, but it will definitely fit a larger group of users. ../Frenck PS: I spoiled it a little bit above a bit, but I will do it explicitly here now too: We are actively working on making categorization/folders and labeling happen (in a few releases it should become available). |
Beta Was this translation helpful? Give feedback.
-
Simple question: What floor is my staircase on? ;) I once worked on a smart buildings project, and I can tell you that dividing physical spaces logically and reliably takes a lot of careful thought. A "big picture" breakdown goes something like this:
That's off the top of my head. I'm pretty sure the actual map was much more complex. Of course, not all of this makes sense for a residential space, but more of it does than you might think. Everyone pictures their own house when they try to think about this problem, but people live in all kinds of arrangements and a simple "floor" abstraction is far short of what they actually use. |
Beta Was this translation helpful? Give feedback.
-
The basic concept for floors has been merged in: home-assistant/core#110741 Closing one for that reason. |
Beta Was this translation helpful? Give feedback.
-
Thank you, Frenck, for all of your work on this issue. I see that you have committed thousands of lines of code to this issue (as well as Labels and Categories). It seems that the biggest debate on Areas is whether or not they should be limited to purely physical lines. Clearly, the HA team has decided that Areas are physical and should remain physical. Many have provided examples (such as stairs) that span multiple Areas, but, by the definition provided above, these are not Areas (some may disagree with the definition, but it is the decided definition). If an Area is a physical delineation, then a staircase is not both upstairs and downstairs, it is in neither location. Yes, the staircase connects the two floors, but it is effectively floor 1.5 as it floats between the two. On the other hand, the need for groupings that are not delineated purely by physical lines is clearly a great desire in the community. An HVAC system is physically in the basement, as are the zone controllers, but the zones affected by the system are spread throughout the house. Some of the zones may fit neatly into an Area, while others may span multiple Areas or even an entire Floor. A kitchen island in an open concept is physically in the kitchen, but the lighting on the backside may be more fitting as part of the living room. While you could change the entity location for those lights, that would not be their physical location and therefore be inconsistent with the ideology of Areas. Lastly, as mentioned above, the goal of HA is to be an automation system, so it makes the most sense to have the setup of new devices be automated. The manual addition of entities to existing groups is inherently not automatic. In other words, we need to divide the concepts that Frenck mentioned earlier more clearly. Areas are meant to be physical, but there is no sufficient logical (non-physical) alternative. Perhaps this distinction warrants a new naming scheme. Areas become Rooms, and Spaces are introduced. Currently, Categories and Labels are both under development with registries for each. I suggest we all wait to see if these can be used to sufficiently achieve the logical delineations/groupings. |
Beta Was this translation helpful? Give feedback.
Ok, my response was requested; let me write up my thoughts and start with a quick TL;DR, as this story became bigger and more extensive than I initially thought it would be.
Let me be clear: This post reflects my personal opinion and vision.
I tried to write it in an extensive, serious, but also a little fun way, which I hope can be appreciated; but I also realize this is quite a long brain dump. Anyways... here it goes.