Skip to content

Custom component for Hue sensors in Home-Assistant, tested up to HA 0.81

Notifications You must be signed in to change notification settings

rymsha/Hue-sensors-HASS

 
 

Repository files navigation

Code style: black

Hue-sensors-HASS

FOR COMMUNITY SUPPORT PLEASE USE THIS THREAD

Place the custom_components folder in your configuration directory (or add its contents to an existing custom_components folder). You need to set up Hue bridge first.

Hue dimmer remotes can be used for a click and long press (hold button for 2 sec and see LED blink twice).

binary_sensor:
  - platform: huesensor
device_tracker:
  - platform: huesensor
sensor:
  - platform: huesensor

As per this issue it is recommended to use the default naming options in the Hue app in order to ensure sensible sensor names in HA.

Front end display

To add the following group to your HA frontend, add the following to groups.yaml (obviously editing to use your sensors):

default_view:
  view: yes
  entities:
    - group.Hue

Hue:
  entities:
    - binary_sensor.bedroom_motion_sensor
    - binary_sensor.hall_motion_sensor
    - binary_sensor.living_room_motion_sensor
    - sensor.living_room_temperature
    - sensor.living_room_light_level
    - sensor.living_room_lux
    - sensor.living_room_remote
    - sensor.remote_bedroom
    - device_tracker.robins_iphone

Temperature, light level and other data in the sensor attributes can be broken out into their own sensor using a template sensor, for example:

- platform: template
  sensors:

    living_room_temperature:
      friendly_name: 'Living room temperature'
      value_template: '{{state_attr("binary_sensor.living_room_motion_sensor", "temperature")}}'
      unit_of_measurement: °C

    living_room_light_level:
      friendly_name: 'Living room light level'
      value_template: '{{state_attr("binary_sensor.living_room_motion_sensor", "lx")}}'
      unit_of_measurement: lux

Track Updates

This custom component can be tracked with the help of custom-lovelace.

In your configuration.yaml

custom_updater:
component_urls:
  - https://raw.githubusercontent.com/robmarkcole/Hue-sensors-HASS/master/custom_updater.json

Debugging

If you get an error when using this component, the procedure for debugging is as follows.

  1. Open an issue here on Github. Include the error message, release number of the custom component.
  2. Download the Hue API response following the instructions here. Save into a .json file.
  3. Parse the json file using the hue_sensors package and report the device ID (e.g. RWL_06-02) that is causing your issue.

There are a couple of examples of this process in the debugging_issues folder.

About

Custom component for Hue sensors in Home-Assistant, tested up to HA 0.81

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Jupyter Notebook 80.2%
  • Python 19.8%