[Feature-Request] Automation on the Room-Scale

I have an idea of room based automations. It is partly inspired by the energy dashboard, the zone-settings and the “area” you can put devices into.

This is the general Idea:

You can add Sensors, that “generate” presence for a specific time. When the time reaches zero, the presence for that room is deactivated. When a presence is detected it can add time to the timer or set it to a specific time, if specified.

Based on the presence it activates lights. The brightness and color is selected based on the time-frame. When presence stays on it will transition the the next time-frame, if the current one is no longer valid.

Here are some interesting new entities you could get out of it:
room.bathroom_occupied
room.bathroom_last_presence
switch.bathroom_auto-light
switch.bathroom_auto-heating
service.room.bathroom.light = off

I don’t have much knowledge of how this could be implemented, but I think this conveys the general idea, of what I had in mind. Feel free to take the idea and improve upon it. I have not thought it through completely. :slight_smile:

I noticed, that there is already https://www.room-assistant.io/. Maybe it would make sense to integrate it natively into Home Assistant. Although I think it should be more simplified, like the energy dashboard.