Code Monkey home page Code Monkey logo

ha-area-manager's Introduction

Area Manager

Monitor and control HA at scale

Integration to represent each Area as device, define parent area, set custom attributes and entities.

Use cases

  • 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...

Changelog

How to

Installation

  1. 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

  2. Install integration via HACS

    In HACS, look for "Area Manager" and install and restart

  3. Setup HA integration

    Settings > Devices & Services (Lower Right) > Add Integration > Area Manager

Devices & Components

Per area

  • Device: Name after the area name
  • SELECT Entity: Area {Area Name} Parent

Custom Attributes

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.

Custom Entities

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

Services

Set attribute

Sets custom attribute for an area and reload the area_manager integration, Name is unique identifier of the entity

Example

service: area_manager.set_attribute
data:
  name: "Location"
  attribute: "device_class"
  values:
    - Indoor
    - Outdoor

Remove attribute

Removes custom attribute for an area and reload the area_manager integration

Example

service: area_manager.remove_attribute
data:
  name: "Location"

Set entity

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

Example

service: area_manager.set_entity
data:
  name: "Security Status"
  attribute: "device_class"
  nested: False
  values:
    - motion
    - sound

Remove entity

Removes custom entity rule for an area and reload the area_manager integration.

Example

service: area_manager.remove_entity
data:
  name: "Security Status"

Debugging

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

ha-area-manager's People

Contributors

elad-bar avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

khzd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.