Updated webhook_register, version bump pypoint (#18635)

* Updated webhook_register, version bump pypoint

* A binary_sensor should be a BinarySensorDevice
This commit is contained in:
Fredrik Erlandsson 2018-11-22 16:43:10 +01:00 committed by Paulus Schoutsen
parent 13144af65e
commit cccc41c23e
3 changed files with 6 additions and 5 deletions

View File

@ -7,6 +7,7 @@ https://home-assistant.io/components/binary_sensor.point/
import logging
from homeassistant.components.binary_sensor import BinarySensorDevice
from homeassistant.components.point import MinutPointEntity
from homeassistant.components.point.const import (
DOMAIN as POINT_DOMAIN, NEW_DEVICE, SIGNAL_WEBHOOK)
@ -45,7 +46,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
for device_class in EVENTS), True)
class MinutPointBinarySensor(MinutPointEntity):
class MinutPointBinarySensor(MinutPointEntity, BinarySensorDevice):
"""The platform class required by Home Assistant."""
def __init__(self, point_client, device_id, device_class):

View File

@ -25,7 +25,7 @@ from .const import (
CONF_WEBHOOK_URL, DOMAIN, EVENT_RECEIVED, NEW_DEVICE, SCAN_INTERVAL,
SIGNAL_UPDATE_ENTITY, SIGNAL_WEBHOOK)
REQUIREMENTS = ['pypoint==1.0.5']
REQUIREMENTS = ['pypoint==1.0.6']
DEPENDENCIES = ['webhook']
_LOGGER = logging.getLogger(__name__)
@ -113,8 +113,8 @@ async def async_setup_webhook(hass: HomeAssistantType, entry: ConfigEntry,
session.update_webhook(entry.data[CONF_WEBHOOK_URL],
entry.data[CONF_WEBHOOK_ID])
hass.components.webhook.async_register(entry.data[CONF_WEBHOOK_ID],
handle_webhook)
hass.components.webhook.async_register(
DOMAIN, 'Point', entry.data[CONF_WEBHOOK_ID], handle_webhook)
async def async_unload_entry(hass: HomeAssistantType, entry: ConfigEntry):

View File

@ -1099,7 +1099,7 @@ pyowm==2.9.0
pypjlink2==1.2.0
# homeassistant.components.point
pypoint==1.0.5
pypoint==1.0.6
# homeassistant.components.sensor.pollen
pypollencom==2.2.2