deCONZ thermostat support (#20586)

* Add support for thermostats in deCONZ by adding Climate platform
This commit is contained in:
Robert Svensson authored and GitHub committed 2019-02-18 17:43:22 +01:00
1 parent 3f9e6a7064
commit 9ce8f4737d
16 files changed
+347 -35

No files matched your search

+4 -4
View File
@@ -8,7 +8,8 @@ from homeassistant.helpers.dispatcher import (
from homeassistant.util import slugify
from .const import (
_LOGGER, DECONZ_REACHABLE, CONF_ALLOW_CLIP_SENSOR, SUPPORTED_PLATFORMS)
_LOGGER, DECONZ_REACHABLE, CONF_ALLOW_CLIP_SENSOR, NEW_DEVICE, NEW_SENSOR,
SUPPORTED_PLATFORMS)
class DeconzGateway:
@@ -44,7 +45,7 @@ class DeconzGateway:
self.listeners.append(
async_dispatcher_connect(
hass, 'deconz_new_sensor', self.async_add_remote))
hass, NEW_SENSOR, self.async_add_remote))
self.async_add_remote(self.api.sensors.values())
@@ -64,8 +65,7 @@ class DeconzGateway:
"""Handle event of new device creation in deCONZ."""
if not isinstance(device, list):
device = [device]
async_dispatcher_send(
self.hass, 'deconz_new_{}'.format(device_type), device)
async_dispatcher_send(self.hass, NEW_DEVICE[device_type], device)
@callback
def async_add_remote(self, sensors):