1 """mütesync binary sensor entities."""
10 from .const
import DOMAIN
20 config_entry: ConfigEntry,
21 async_add_entities: AddEntitiesCallback,
23 """Set up the mütesync button."""
24 coordinator = hass.data[DOMAIN][config_entry.entry_id]
26 [
MuteStatus(coordinator, sensor_type)
for sensor_type
in SENSORS],
True
31 """Mütesync binary sensors."""
33 _attr_has_entity_name =
True
36 """Initialize our sensor."""
40 user_id = coordinator.data[
"user-id"]
43 entry_type=DeviceEntryType.SERVICE,
44 identifiers={(DOMAIN, user_id)},
45 manufacturer=
"mütesync",
52 """Return the state of the sensor."""
53 return self.coordinator.data[self.
_sensor_type_sensor_type]
def __init__(self, coordinator, sensor_type)
None async_setup_entry(HomeAssistant hass, ConfigEntry config_entry, AddEntitiesCallback async_add_entities)