mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Fix point sensor discovery (#19245)
This commit is contained in:
parent
0fa7186296
commit
9f790325bb
@ -7,8 +7,7 @@ https://home-assistant.io/components/binary_sensor.point/
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from homeassistant.components.binary_sensor import (
|
from homeassistant.components.binary_sensor import DOMAIN, BinarySensorDevice
|
||||||
DOMAIN as PARENT_DOMAIN, BinarySensorDevice)
|
|
||||||
from homeassistant.components.point import MinutPointEntity
|
from homeassistant.components.point import MinutPointEntity
|
||||||
from homeassistant.components.point.const import (
|
from homeassistant.components.point.const import (
|
||||||
DOMAIN as POINT_DOMAIN, POINT_DISCOVERY_NEW, SIGNAL_WEBHOOK)
|
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)
|
for device_class in EVENTS), True)
|
||||||
|
|
||||||
async_dispatcher_connect(
|
async_dispatcher_connect(
|
||||||
hass, POINT_DISCOVERY_NEW.format(PARENT_DOMAIN, POINT_DOMAIN),
|
hass, POINT_DISCOVERY_NEW.format(DOMAIN, POINT_DOMAIN),
|
||||||
async_discover_sensor)
|
async_discover_sensor)
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,10 +6,10 @@ https://home-assistant.io/components/sensor.point/
|
|||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from homeassistant.components.point import (
|
from homeassistant.components.point import MinutPointEntity
|
||||||
DOMAIN as PARENT_DOMAIN, MinutPointEntity)
|
|
||||||
from homeassistant.components.point.const import (
|
from homeassistant.components.point.const import (
|
||||||
DOMAIN as POINT_DOMAIN, POINT_DISCOVERY_NEW)
|
DOMAIN as POINT_DOMAIN, POINT_DISCOVERY_NEW)
|
||||||
|
from homeassistant.components.sensor import DOMAIN
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_PRESSURE, DEVICE_CLASS_TEMPERATURE,
|
DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_PRESSURE, DEVICE_CLASS_TEMPERATURE,
|
||||||
TEMP_CELSIUS)
|
TEMP_CELSIUS)
|
||||||
@ -38,7 +38,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||||||
for sensor_type in SENSOR_TYPES), True)
|
for sensor_type in SENSOR_TYPES), True)
|
||||||
|
|
||||||
async_dispatcher_connect(
|
async_dispatcher_connect(
|
||||||
hass, POINT_DISCOVERY_NEW.format(PARENT_DOMAIN, POINT_DOMAIN),
|
hass, POINT_DISCOVERY_NEW.format(DOMAIN, POINT_DOMAIN),
|
||||||
async_discover_sensor)
|
async_discover_sensor)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user