From 9f790325bb6732528941f4547d59a6702cd7c5de Mon Sep 17 00:00:00 2001 From: Fredrik Erlandsson Date: Thu, 13 Dec 2018 16:40:56 +0100 Subject: [PATCH] Fix point sensor discovery (#19245) --- homeassistant/components/binary_sensor/point.py | 5 ++--- homeassistant/components/sensor/point.py | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/binary_sensor/point.py b/homeassistant/components/binary_sensor/point.py index 29488d08130..1bd97ce2747 100644 --- a/homeassistant/components/binary_sensor/point.py +++ b/homeassistant/components/binary_sensor/point.py @@ -7,8 +7,7 @@ https://home-assistant.io/components/binary_sensor.point/ import logging -from homeassistant.components.binary_sensor import ( - DOMAIN as PARENT_DOMAIN, BinarySensorDevice) +from homeassistant.components.binary_sensor import DOMAIN, BinarySensorDevice from homeassistant.components.point import MinutPointEntity from homeassistant.components.point.const import ( DOMAIN as POINT_DOMAIN, POINT_DISCOVERY_NEW, SIGNAL_WEBHOOK) @@ -49,7 +48,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities): for device_class in EVENTS), True) async_dispatcher_connect( - hass, POINT_DISCOVERY_NEW.format(PARENT_DOMAIN, POINT_DOMAIN), + hass, POINT_DISCOVERY_NEW.format(DOMAIN, POINT_DOMAIN), async_discover_sensor) diff --git a/homeassistant/components/sensor/point.py b/homeassistant/components/sensor/point.py index 1bb46827602..9413cf163d9 100644 --- a/homeassistant/components/sensor/point.py +++ b/homeassistant/components/sensor/point.py @@ -6,10 +6,10 @@ https://home-assistant.io/components/sensor.point/ """ import logging -from homeassistant.components.point import ( - DOMAIN as PARENT_DOMAIN, MinutPointEntity) +from homeassistant.components.point import MinutPointEntity from homeassistant.components.point.const import ( DOMAIN as POINT_DOMAIN, POINT_DISCOVERY_NEW) +from homeassistant.components.sensor import DOMAIN from homeassistant.const import ( DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_PRESSURE, DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS) @@ -38,7 +38,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities): for sensor_type in SENSOR_TYPES), True) async_dispatcher_connect( - hass, POINT_DISCOVERY_NEW.format(PARENT_DOMAIN, POINT_DOMAIN), + hass, POINT_DISCOVERY_NEW.format(DOMAIN, POINT_DOMAIN), async_discover_sensor)