[X] I have filled out the issue template to the best of my ability.
[X] This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
[X] This issue is not a duplicate issue of currently previous issues..
Describe the issue
Once I have configured my Lux sensor, the integration works as intended until I restart Home Assistant.
The integration probably starts faster than the sensor (Z2MQTT) is ready and an error occurs during initialization:
Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Logger: custom_components.adaptive_cover
Quelle: helpers/update_coordinator.py:312
Integration: Adaptive Cover (Dokumentation, Probleme)
Erstmals aufgetreten: 10:28:40 (14 Vorkommnisse)
Zuletzt protokolliert: 10:29:53
Unexpected error fetching adaptive_cover data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/adaptive_cover/coordinator.py", line 225, in _async_update_data
self.climate_mode_data(options, cover_data)
File "/config/custom_components/adaptive_cover/coordinator.py", line 557, in climate_mode_data
self.climate_state = round(ClimateCoverState(cover_data, climate).get_state())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/adaptive_cover/calculation.py", line 388, in get_state
result = self.normal_type_cover()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/adaptive_cover/calculation.py", line 316, in normal_type_cover
return self.normal_with_presence()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/adaptive_cover/calculation.py", line 325, in normal_with_presence
self.climate_data.lux
File "/config/custom_components/adaptive_cover/calculation.py", line 293, in lux
return float(value) <= self.lux_threshold
^^^^^^^^^^^^
TypeError: float() argument must be a string or a real number, not 'NoneType'
After that, the Lux function is not available. Only when I manually reload the integration does everything work as intended.
What version of Adaptive Cover are you using?
1.3.2
What version of Home Assistant are you using?
2024.6.4
Checklist
Describe the issue
Once I have configured my Lux sensor, the integration works as intended until I restart Home Assistant. The integration probably starts faster than the sensor (Z2MQTT) is ready and an error occurs during initialization:
After that, the Lux function is not available. Only when I manually reload the integration does everything work as intended.
Reproduction steps
Diagnostics dump
No response