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
3 changed files with 4 additions and 5 deletions
|
@ -17,7 +17,7 @@ from homeassistant.helpers import discovery
|
|||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
from homeassistant.util.json import load_json, save_json
|
||||
|
||||
REQUIREMENTS = ['pydeconz==23']
|
||||
REQUIREMENTS = ['pydeconz==24']
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ from homeassistant.util import slugify
|
|||
DEPENDENCIES = ['deconz']
|
||||
|
||||
ATTR_EVENT_ID = 'event_id'
|
||||
ATTR_ZHASWITCH = 'ZHASwitch'
|
||||
|
||||
|
||||
@asyncio.coroutine
|
||||
|
@ -26,13 +25,13 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
|
|||
if discovery_info is None:
|
||||
return
|
||||
|
||||
from pydeconz.sensor import DECONZ_SENSOR
|
||||
from pydeconz.sensor import DECONZ_SENSOR, SWITCH as DECONZ_REMOTE
|
||||
sensors = hass.data[DECONZ_DATA].sensors
|
||||
entities = []
|
||||
|
||||
for sensor in sensors.values():
|
||||
if sensor.type in DECONZ_SENSOR:
|
||||
if sensor.type == ATTR_ZHASWITCH:
|
||||
if sensor.type in DECONZ_REMOTE:
|
||||
DeconzEvent(hass, sensor)
|
||||
if sensor.battery:
|
||||
entities.append(DeconzBattery(sensor))
|
||||
|
|
|
@ -678,7 +678,7 @@ pycsspeechtts==1.0.2
|
|||
pydaikin==0.4
|
||||
|
||||
# homeassistant.components.deconz
|
||||
pydeconz==23
|
||||
pydeconz==24
|
||||
|
||||
# homeassistant.components.zwave
|
||||
pydispatcher==2.0.5
|
||||
|
|
Loading…
Add table
Reference in a new issue