1 """Representation of an EnOcean device."""
3 from enocean.protocol.packet
import Packet
4 from enocean.utils
import combine_hex
9 from .const
import SIGNAL_RECEIVE_MESSAGE, SIGNAL_SEND_MESSAGE
13 """Parent class for all entities associated with the EnOcean component."""
16 """Initialize the device."""
20 """Register callbacks."""
28 """Handle incoming packets."""
30 if packet.sender_int == combine_hex(self.
dev_iddev_id):
34 """Update the internal state of the device when a packet arrives."""
37 """Send a command via the EnOcean dongle."""
39 packet = Packet(packet_type, data=data, optional=optional)
None __init__(self, list[int] dev_id)
def value_changed(self, packet)
def async_added_to_hass(self)
def _message_received_callback(self, packet)
def send_command(self, data, optional, packet_type)
None async_on_remove(self, CALLBACK_TYPE func)
Callable[[], None] async_dispatcher_connect(HomeAssistant hass, str signal, Callable[..., Any] target)
None dispatcher_send(HomeAssistant hass, str signal, *Any args)