fix webhook update (#21048)

This commit is contained in:
Fredrik Erlandsson 2019-02-14 05:27:17 +01:00 committed by Paulus Schoutsen
parent f1f3074612
commit 1faf2f49d0
3 changed files with 4 additions and 3 deletions

View file

@ -25,7 +25,7 @@ from .const import (
CONF_WEBHOOK_URL, DOMAIN, EVENT_RECEIVED, POINT_DISCOVERY_NEW, CONF_WEBHOOK_URL, DOMAIN, EVENT_RECEIVED, POINT_DISCOVERY_NEW,
SCAN_INTERVAL, SIGNAL_UPDATE_ENTITY, SIGNAL_WEBHOOK) SCAN_INTERVAL, SIGNAL_UPDATE_ENTITY, SIGNAL_WEBHOOK)
REQUIREMENTS = ['pypoint==1.0.7'] REQUIREMENTS = ['pypoint==1.0.8']
DEPENDENCIES = ['webhook'] DEPENDENCIES = ['webhook']
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)

View file

@ -91,7 +91,8 @@ class MinutPointBinarySensor(MinutPointEntity, BinarySensorDevice):
if self.device.webhook != webhook: if self.device.webhook != webhook:
return return
_type = data.get('event', {}).get('type') _type = data.get('event', {}).get('type')
if _type not in self._events: _device_id = data.get('event', {}).get('device_id')
if _type not in self._events or _device_id != self.device.device_id:
return return
_LOGGER.debug("Recieved webhook: %s", _type) _LOGGER.debug("Recieved webhook: %s", _type)
if _type == self._events[0]: if _type == self._events[0]:

View file

@ -1196,7 +1196,7 @@ pypck==0.5.9
pypjlink2==1.2.0 pypjlink2==1.2.0
# homeassistant.components.point # homeassistant.components.point
pypoint==1.0.7 pypoint==1.0.8
# homeassistant.components.sensor.pollen # homeassistant.components.sensor.pollen
pypollencom==2.2.2 pypollencom==2.2.2