1 """Support for Tellstick covers."""
3 from __future__
import annotations
14 ATTR_DISCOVER_DEVICES,
16 DEFAULT_SIGNAL_REPETITIONS,
18 from .entity
import TellstickDevice
24 add_entities: AddEntitiesCallback,
25 discovery_info: DiscoveryInfoType |
None =
None,
27 """Set up the Tellstick covers."""
28 if discovery_info
is None or discovery_info[ATTR_DISCOVER_DEVICES]
is None:
31 signal_repetitions = discovery_info.get(
32 ATTR_DISCOVER_CONFIG, DEFAULT_SIGNAL_REPETITIONS
37 TellstickCover(hass.data[DATA_TELLSTICK][tellcore_id], signal_repetitions)
38 for tellcore_id
in discovery_info[ATTR_DISCOVER_DEVICES]
45 """Representation of a Tellstick cover."""
49 """Return the current position of the cover is not possible."""
54 """Return True if unable to access real state of the entity."""
58 """Close the cover."""
70 """Turn the value received from tellcore into something useful."""
73 """Turn the value from HA into something useful."""
76 """Update the device entity state to match the arguments."""
None open_cover(self, **Any kwargs)
None stop_cover(self, **Any kwargs)
def _parse_tellcore_data(self, tellcore_data)
def _parse_ha_data(self, kwargs)
None close_cover(self, **Any kwargs)
def _update_model(self, new_state, data)
None add_entities(AsusWrtRouter router, AddEntitiesCallback async_add_entities, set[str] tracked)
None setup_platform(HomeAssistant hass, ConfigType config, AddEntitiesCallback add_entities, DiscoveryInfoType|None discovery_info=None)