1 """Demo platform that has two fake binary sensors."""
3 from __future__
import annotations
6 BinarySensorDeviceClass,
19 config_entry: ConfigEntry,
20 async_add_entities: AddEntitiesCallback,
22 """Set up the demo binary sensor platform."""
29 BinarySensorDeviceClass.MOISTURE,
32 "binary_2",
"Movement Backyard",
True, BinarySensorDeviceClass.MOTION
39 """representation of a Demo binary sensor."""
41 _attr_has_entity_name =
True
43 _attr_should_poll =
False
50 device_class: BinarySensorDeviceClass,
52 """Initialize the demo sensor."""
66 """Return the unique id."""
71 """Return true if the binary sensor is on."""
None __init__(self, str unique_id, str device_name, bool state, BinarySensorDeviceClass device_class)
None async_setup_entry(HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)