mirror of
https://github.com/home-assistant/core.git
synced 2025-12-25 05:26:47 +00:00
deCONZ thermostat support (#20586)
* Add support for thermostats in deCONZ by adding Climate platform
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
"""Support for deCONZ scenes."""
|
||||
from homeassistant.components.deconz import DOMAIN as DECONZ_DOMAIN
|
||||
from homeassistant.components.scene import Scene
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||
|
||||
from .const import DOMAIN as DECONZ_DOMAIN, NEW_SCENE
|
||||
|
||||
DEPENDENCIES = ['deconz']
|
||||
|
||||
|
||||
@@ -25,7 +26,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
entities.append(DeconzScene(scene, gateway))
|
||||
async_add_entities(entities)
|
||||
gateway.listeners.append(
|
||||
async_dispatcher_connect(hass, 'deconz_new_scene', async_add_scene))
|
||||
async_dispatcher_connect(hass, NEW_SCENE, async_add_scene))
|
||||
|
||||
async_add_scene(gateway.api.scenes.values())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user