deCONZ thermostat support (#20586)

* Add support for thermostats in deCONZ by adding Climate platform
This commit is contained in:
Robert Svensson 2019-02-18 17:43:22 +01:00 committed by GitHub
parent 3f9e6a7064
commit 9ce8f4737d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 347 additions and 35 deletions

View file

@ -5,7 +5,8 @@ from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from .const import (
ATTR_DARK, ATTR_ON, CONF_ALLOW_CLIP_SENSOR, DOMAIN as DECONZ_DOMAIN)
ATTR_DARK, ATTR_ON, CONF_ALLOW_CLIP_SENSOR, DOMAIN as DECONZ_DOMAIN,
NEW_SENSOR)
from .deconz_device import DeconzDevice
DEPENDENCIES = ['deconz']
@ -34,7 +35,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
async_add_entities(entities, True)
gateway.listeners.append(
async_dispatcher_connect(hass, 'deconz_new_sensor', async_add_sensor))
async_dispatcher_connect(hass, NEW_SENSOR, async_add_sensor))
async_add_sensor(gateway.api.sensors.values())