1 """The Z-Wave-Me WS integration."""
3 from zwave_me_ws
import ZWaveMeData
10 from .const
import DOMAIN
14 """Representation of a ZWaveMe device."""
17 """Initialize the device."""
21 self._attr_unique_id: str = (
22 f
"{self.controller.config.unique_id}-{self.device.id}"
28 """Return device specific attributes."""
30 identifiers={(DOMAIN, self.
devicedevice.deviceIdentifier)},
32 manufacturer=self.
devicedevice.manufacturer,
33 sw_version=self.
devicedevice.firmware,
34 suggested_area=self.
devicedevice.locationName,
38 """Connect to an updater."""
41 self.
hasshass, f
"ZWAVE_ME_INFO_{self.device.id}", self.
get_new_dataget_new_data
47 f
"ZWAVE_ME_UNAVAILABLE_{self.device.id}",
53 self.
hasshass, f
"ZWAVE_ME_DESTROY_{self.device.id}", self.
delete_entitydelete_entity
59 """Update info in the HAss."""
60 self.
devicedevice = new_data
66 """Update status in the HAss."""
72 """Remove this entity."""
73 self.
hasshass.async_create_task(self.
async_removeasync_remove(force_remove=
True))
def __init__(self, controller, device)
None get_new_data(self, ZWaveMeData new_data)
None async_added_to_hass(self)
DeviceInfo device_info(self)
def set_unavailable_status(self)
None async_write_ha_state(self)
None async_on_remove(self, CALLBACK_TYPE func)
None async_remove(self, *bool force_remove=False)
Callable[[], None] async_dispatcher_connect(HomeAssistant hass, str signal, Callable[..., Any] target)