mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add Deconz support for Zigbee green power devices like Hue Tap (#11455)
* Add support for Zigbee green power devices such as the Hue Tap * Clarify that imported SWITCH is a DECONZ_REMOTE
This commit is contained in:
parent
f86b645417
commit
3979387c80
@ -17,7 +17,7 @@ from homeassistant.helpers import discovery
|
|||||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||||
from homeassistant.util.json import load_json, save_json
|
from homeassistant.util.json import load_json, save_json
|
||||||
|
|
||||||
REQUIREMENTS = ['pydeconz==23']
|
REQUIREMENTS = ['pydeconz==24']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@ from homeassistant.util import slugify
|
|||||||
DEPENDENCIES = ['deconz']
|
DEPENDENCIES = ['deconz']
|
||||||
|
|
||||||
ATTR_EVENT_ID = 'event_id'
|
ATTR_EVENT_ID = 'event_id'
|
||||||
ATTR_ZHASWITCH = 'ZHASwitch'
|
|
||||||
|
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
@ -26,13 +25,13 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
|||||||
if discovery_info is None:
|
if discovery_info is None:
|
||||||
return
|
return
|
||||||
|
|
||||||
from pydeconz.sensor import DECONZ_SENSOR
|
from pydeconz.sensor import DECONZ_SENSOR, SWITCH as DECONZ_REMOTE
|
||||||
sensors = hass.data[DECONZ_DATA].sensors
|
sensors = hass.data[DECONZ_DATA].sensors
|
||||||
entities = []
|
entities = []
|
||||||
|
|
||||||
for sensor in sensors.values():
|
for sensor in sensors.values():
|
||||||
if sensor.type in DECONZ_SENSOR:
|
if sensor.type in DECONZ_SENSOR:
|
||||||
if sensor.type == ATTR_ZHASWITCH:
|
if sensor.type in DECONZ_REMOTE:
|
||||||
DeconzEvent(hass, sensor)
|
DeconzEvent(hass, sensor)
|
||||||
if sensor.battery:
|
if sensor.battery:
|
||||||
entities.append(DeconzBattery(sensor))
|
entities.append(DeconzBattery(sensor))
|
||||||
|
@ -678,7 +678,7 @@ pycsspeechtts==1.0.2
|
|||||||
pydaikin==0.4
|
pydaikin==0.4
|
||||||
|
|
||||||
# homeassistant.components.deconz
|
# homeassistant.components.deconz
|
||||||
pydeconz==23
|
pydeconz==24
|
||||||
|
|
||||||
# homeassistant.components.zwave
|
# homeassistant.components.zwave
|
||||||
pydispatcher==2.0.5
|
pydispatcher==2.0.5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user