with a Tecalor/Stiebel Eltron heat pump, the program start and end times are received from one protocol in hexadecimal code.
This value can be split, and one entity can be created for the start time and another for the end time (each representing a clock time).
When the value of one entity changes, the other entity needs to be located and transmitted to the system via a protocol.
As far as I understand, all entities are stored in an entity list.
How can I search for the entity using Python code, e.g., by name or unique ID, and access its value?
Does anyone have any ideas?
@callback
def status_update(self, data: str) -> None:
"""Update entity."""
[calculate value from hex]
self._attr_native_value = value
self.async_write_ha_state()
When you then receive the data from your device call the dispatcher with your id, passing the hex value. Each entity can then work out its value from that, set the native value.