1 """Support for INSTEON dimmers via PowerLinc Modem."""
3 from pyinsteon.groups
import (
18 BinarySensorDeviceClass,
27 from .const
import SIGNAL_ADD_ENTITIES
28 from .entity
import InsteonEntity
29 from .utils
import async_add_insteon_devices, async_add_insteon_entities
32 OPEN_CLOSE_SENSOR: BinarySensorDeviceClass.OPENING,
33 MOTION_SENSOR: BinarySensorDeviceClass.MOTION,
34 DOOR_SENSOR: BinarySensorDeviceClass.DOOR,
35 LEAK_SENSOR_WET: BinarySensorDeviceClass.MOISTURE,
36 LIGHT_SENSOR: BinarySensorDeviceClass.LIGHT,
37 LOW_BATTERY: BinarySensorDeviceClass.BATTERY,
38 CO_SENSOR: BinarySensorDeviceClass.GAS,
39 SMOKE_SENSOR: BinarySensorDeviceClass.SMOKE,
40 TEST_SENSOR: BinarySensorDeviceClass.SAFETY,
41 SENSOR_MALFUNCTION: BinarySensorDeviceClass.PROBLEM,
42 HEARTBEAT: BinarySensorDeviceClass.PROBLEM,
48 config_entry: ConfigEntry,
49 async_add_entities: AddEntitiesCallback,
51 """Set up the Insteon binary sensors from a config entry."""
54 def async_add_insteon_binary_sensor_entities(discovery_info=None):
55 """Add the Insteon entities for the platform."""
58 Platform.BINARY_SENSOR,
59 InsteonBinarySensorEntity,
64 signal = f
"{SIGNAL_ADD_ENTITIES}_{Platform.BINARY_SENSOR}"
68 Platform.BINARY_SENSOR,
69 InsteonBinarySensorEntity,
75 """A Class for an Insteon binary sensor entity."""
78 """Initialize the INSTEON binary sensor."""
84 """Return the boolean response if the node is on."""
def __init__(self, device, group)
None async_setup_entry(HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)
None async_add_insteon_devices(HomeAssistant hass, Platform platform, type[InsteonEntity] entity_type, AddEntitiesCallback async_add_entities)
None async_add_insteon_entities(HomeAssistant hass, Platform platform, type[InsteonEntity] entity_type, AddEntitiesCallback async_add_entities, dict[str, Any] discovery_info)
Callable[[], None] async_dispatcher_connect(HomeAssistant hass, str signal, Callable[..., Any] target)