1 """Support for binary sensors using Tellstick Net."""
10 from .const
import DOMAIN, TELLDUS_DISCOVERY_NEW
11 from .entity
import TelldusLiveEntity
16 config_entry: ConfigEntry,
17 async_add_entities: AddEntitiesCallback,
19 """Set up tellduslive sensors dynamically."""
21 async
def async_discover_binary_sensor(device_id):
22 """Discover and add a discovered sensor."""
23 client = hass.data[DOMAIN]
28 TELLDUS_DISCOVERY_NEW.format(binary_sensor.DOMAIN, DOMAIN),
29 async_discover_binary_sensor,
34 """Representation of a Tellstick sensor."""
40 """Return true if switch is on."""
41 return self.
devicedevice.is_on
None async_setup_entry(HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)
Callable[[], None] async_dispatcher_connect(HomeAssistant hass, str signal, Callable[..., Any] target)