All Projects → robmarkcole → Hue Sensors Hass

robmarkcole / Hue Sensors Hass

Support for Hue motion sensors and device tracker

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Hue Sensors Hass

Kelvin
Kelvin - The hue bot
Stars: ✭ 256 (-27.48%)
Mutual labels:  home-assistant, hue
Adaptive Lighting
Adaptive Lighting custom component for Home Assistant
Stars: ✭ 151 (-57.22%)
Mutual labels:  home-assistant, hue
Homeassistant
Example Home Assistant Configs
Stars: ✭ 846 (+139.66%)
Mutual labels:  home-assistant, hue
Homeassistant Config
Stars: ✭ 211 (-40.23%)
Mutual labels:  home-assistant, hue
hass-hue-icons
Additional vector icons for home assistant to model Philips Hue bulbs and fixtures.
Stars: ✭ 161 (-54.39%)
Mutual labels:  home-assistant, hue
homeassistant
Home Assistant Config
Stars: ✭ 50 (-85.84%)
Mutual labels:  home-assistant, hue
Homeassistant
Example Home Assistant Configs
Stars: ✭ 168 (-52.41%)
Mutual labels:  home-assistant, hue
jarvis
Jarvis Home Automation
Stars: ✭ 81 (-77.05%)
Mutual labels:  home-assistant, hue
Home Assistantconfig
🏠 Home Assistant configuration & Documentation for my Smart House. Write-ups, videos, part lists, and links throughout. Be sure to ⭐ it. Updated FREQUENTLY!
Stars: ✭ 3,687 (+944.48%)
Mutual labels:  home-assistant, hue
Kmansonoff
Firmware for ESP8266 based itead Sonoff switches for use with HomeAssistant / mqtt
Stars: ✭ 282 (-20.11%)
Mutual labels:  home-assistant
Hue
🎨 Hue is the all-in-one coloring utility that you'll ever need.
Stars: ✭ 3,306 (+836.54%)
Mutual labels:  hue
Ha Menu
A Mac OS Menu Bar app to perform common Home Assistant functions
Stars: ✭ 280 (-20.68%)
Mutual labels:  home-assistant
Awesome Home Assistant
A curated list of amazingly awesome Home Assistant resources.
Stars: ✭ 3,487 (+887.82%)
Mutual labels:  home-assistant
Coolhue
Coolest Gradient Hues and Swatches
Stars: ✭ 3,307 (+836.83%)
Mutual labels:  hue
Remote homeassistant
Links multiple home-assistant instances together
Stars: ✭ 277 (-21.53%)
Mutual labels:  home-assistant
Heatpump
Arduino library to control Mitsubishi Heat Pumps via connector cn105
Stars: ✭ 327 (-7.37%)
Mutual labels:  home-assistant
Lovelace Multiple Entity Row
Show multiple entity states and attributes on entity rows in Home Assistant's Lovelace UI
Stars: ✭ 273 (-22.66%)
Mutual labels:  home-assistant
Home assistant
My personal Home Assistant setup - Running on a HassOS VM.
Stars: ✭ 270 (-23.51%)
Mutual labels:  home-assistant
Harmony Api
🗼 A simple server allowing you to query/control multiple local Harmony Home Hubs over HTTP or MQTT
Stars: ✭ 345 (-2.27%)
Mutual labels:  home-assistant
Hass Circadian lighting
Circadian Lighting custom component for Home Assistant
Stars: ✭ 324 (-8.22%)
Mutual labels:  home-assistant

Code style: black

Hue-sensors-HASS

FOR COMMUNITY SUPPORT PLEASE USE THIS THREAD

For Hue & Friends of Hue remotes checkout Hue-remotes-HASS

PLEASE BE ADVISED: you are strongly encouraged to use the official Hue sensor integration, and cease using this custom integration.

Longer explanation: sensor support in the official hue integration is more feature-complete than this custom integration, and if you're already using Hue-remotes-HASS, then the refresh rate for sensors in the official integration will be automatically the fastest possible. Since we want to migrate users to the official integration, please do not open feature request issues or create PR adding new functionality to this custom integration, as they will not be considered. This custom integration will remain available until the next breaking change with Home Assistant, at which point this repo will be archived.

Overview

This custom integration provides support for the official Hue motion sensors and the Hue device tracker (allows tracking the mobile with the Hue app installed). Note that these sensors are officially integrated with Home Assistant, but a different approach is taken in this custom integration. In the official integration the Hue motion sensors are treated as three separate entities per device: one each for motion, light level, and temperature. The approach in this custom integration is to expose the light level and temperature values as attributes of a single binary_sensor entity. Also in this custom integration the device data is updated every second, whilst in the official integration data is only every 5 seconds updated.

Be advised that the increased update of this custom integration may cause connectivity problems which can result in errors in the official hue integration, please do not create any issue for this. If you can't live with these errors, do not use this custom integration.

Installation

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

Configuration

Once installed add to your configuration:

binary_sensor:
  - platform: huesensor
device_tracker:
  - 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

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

Developers

  • Create venv -> $ python3 -m venv venv
  • Use venv -> $ source venv/bin/activate
  • Install requirements -> $ pip install -r requirements.txt & $ pip install -r requirements-dev.txt
  • Run tests -> $ venv/bin/py.test --cov=custom_components tests/ -vv -p no:warnings
  • Black format -> $ venv/bin/black custom_components/* (or setup VScode for format on save)

About GitHub Actions

This repo has GitHub Actions. It tests HACS, Hassfest, and flake8. It automatically pushes formatting with isort and black. See a bit more info here.

Contributors

Please format code usign Black before opening a pull request.

A big thanks to Atsuko Ito and Eugenio Panadero for their many contributions to this work!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].