Closed siegelpeter closed 1 week ago
Hello, yes this is something I also have seen. I will fix that. The bug is, when the production is 0 or undefined, the calculation stops but forget to turn off all device.
Thank you
Tried to fix this by deactivating the devices like this:
power_production = get_safe_float(self.hass, self._power_production_entity_id)
if not power_production:
_LOGGER.warning(
"Power production is not valued. Solar Optimizer will be disabled"
)
for _, device in enumerate(self._devices):
await device.deactivate()
return None
But i get the following error in the logs: Logger: homeassistant.helpers.service Quelle: helpers/service.py:301
Referenced entities light.bad_eg are missing or not currently available
As im new to python and ha development i do not know why this is happening. Can you point me in the right direction?
would it make sense to simply return 0 if the power is not valued instead of aborting ?
Tried to fix this by deactivating the devices like this:
power_production = get_safe_float(self.hass, self._power_production_entity_id) if not power_production: _LOGGER.warning( "Power production is not valued. Solar Optimizer will be disabled" ) for _, device in enumerate(self._devices): await device.deactivate() return None
But i get the following error in the logs: Logger: homeassistant.helpers.service Quelle: helpers/service.py:301
Referenced entities light.bad_eg are missing or not currently available
As im new to python and ha development i do not know why this is happening. Can you point me in the right direction?
would it make sense to simply return 0 if the power is not valued instead of aborting ?
Thank you I will test that.
Version of the custom_component
1.7 la
Configuration
Active Power:![grafik](https://github.com/user-attachments/assets/d4111ef4-30d2-43ae-886b-72b71f17e45e)
net Consumption:
Is negative when power is exported (most of the day)
Describe the bug
the device is turned on as soon as there is enough power. This works well. But in the evening there is not enough power the device is not turned off. The Logs say that power production is not valued. but according to homeassistant it has the value 0. What can i do?
Debug log