Hi,
I have an API that return me datas for thermostats, including the power that this thermostat consumes.
I am able to update my thermostat and everything, but I would also like to update a power sensor entity at the same time I update my climate entity.
For now, my update function in my Climate Entity class looks like this:
def update(self):
self._h.update_device(self.index)
self._d = self._h.d[self.index]
if self._d.Heating == 0:
self._def_hvac_mode = HVAC_MODE_OFF
else:
self._def_hvac_mode = HVAC_MODE_HEAT
self._target_temperature = self._d.TargetTemperature
self._current_temperature = self._d.CurrentTemperature