mirror of
https://github.com/home-assistant/core
synced 2024-09-25 00:41:32 +02:00
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:
parent
13144af65e
commit
cccc41c23e
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user