Skip to content

Commit

Permalink
Add Deconz support for Zigbee green power devices like Hue Tap (#11455)
Browse files Browse the repository at this point in the history
* Add support for Zigbee green power devices such as the Hue Tap

* Clarify that imported SWITCH is a DECONZ_REMOTE
  • Loading branch information
Kane610 authored and MartinHjelmare committed Jan 15, 2018
1 parent f86b645 commit 3979387
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/deconz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
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__)

Expand Down
5 changes: 2 additions & 3 deletions homeassistant/components/sensor/deconz.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
DEPENDENCIES = ['deconz']

ATTR_EVENT_ID = 'event_id'
ATTR_ZHASWITCH = 'ZHASwitch'


@asyncio.coroutine
Expand All @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3979387

Please sign in to comment.