Integration to represent each Area as device, define parent area, set custom attributes and entities.
- Define whether the area is Indoor or Outdoor for automation of turn all lights off / on
- Define security sensor per area whether there is motion and using automation send notification
- Define security sensor that identify risks in each area (including sub area) using entity rule of device class in [motion, sound, gas, smoke, door, window, etc...] to use with automation of alert
- Build dynamic UI that will work according to area and allow to draw automatically all custom entities, dive into specific sub area, etc...
-
Add Custom Integration Repository
Currently, integration is not officially available, please add the repo to HACS before trying to install it in HACS > Integrations > 3 dots menu > Custom repository Repository: elad-bar/ha-area-manager Category: Integration
-
Install integration via HACS
In HACS, look for "Area Manager" and install and restart
-
Setup HA integration
Settings > Devices & Services (Lower Right) > Add Integration > Area Manager
- Device: Name after the area name
- SELECT Entity: Area {Area Name} Parent
By adding attributes using Set attribute (area_manager.set_attribute) service, each area will include SELECT entity that will allow user to set the relevant attribute from available values, later it will allow to use in automation and UI.
By adding entity rules using Set entity (area_manager.set_entity) service, each area will include relevant entity that aggregates status of entities in the area, Service description is available below and allows to set whether to include just the entities directly connected to the area or include nested as well, Setting the entity rules requires setting domain, domain aggregation work according to the following flow:
- Binary Sensor, Light, Switch - If one of the component in the rule are on, custom entity will be on, otherwise - off
- Sensor - If numeric value, will perform average evaluation of relevant entities, otherwise, will take first
Sets custom attribute for an area and reload the area_manager
integration,
Name is unique identifier of the entity
service: area_manager.set_attribute
data:
name: "Location"
attribute: "device_class"
values:
- Indoor
- Outdoor
Removes custom attribute for an area and reload the area_manager
integration
service: area_manager.remove_attribute
data:
name: "Location"
Sets custom entity rule for an area and reload the area_manager
integration,
Name is unique identifier of the entity,
Supported domains:
- Binary Sensor
- Light
- Sensor
- Switch
service: area_manager.set_entity
data:
name: "Security Status"
attribute: "device_class"
nested: False
values:
- motion
- sound
Removes custom entity rule for an area and reload the area_manager
integration.
service: area_manager.remove_entity
data:
name: "Security Status"
To set the log level of the component to DEBUG, please set it from the options of the component if installed, otherwise, set it within configuration YAML of HA:
logger:
default: warning
logs:
custom_components.area_manager: debug