freitdav / BDRthermostatHA

BDR (Baxi, De Dietrich, Remeha) thermostat custom component integration for Home Assistant
GNU General Public License v3.0
48 stars 21 forks source link

Update HA #44

Open PaPe3 opened 1 year ago

PaPe3 commented 1 year ago

2023-05-05 15:47:51.357 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration bdr_thermostat which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2023-05-05 15:54:07.759 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry BDR Thermostat for bdr_thermostat File "/config/custom_components/bdr_thermostat/init.py", line 62, in async_setup_entry 2023-05-05 15:54:38.397 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry BDR Thermostat for bdr_thermostat File "/config/custom_components/bdr_thermostat/init.py", line 62, in async_setup_entry

schinddo commented 1 year ago

See pull request #43

Marck commented 1 year ago

I have fix #43, #40 and some other small changes in my fork. You can use that if you want (or fork that): https://github.com/Marck/BDRthermostatHA At the time being a few sensors are not working so those are disabled

mmoerdijk commented 1 year ago

For me those sensors are working fine, so you can probably re-enable them ๐Ÿ™‚

mmoerdijk commented 1 year ago

@Marck any reason why you did not open a PR for the changes you made?

schinddo commented 1 year ago

For me those sensors are working fine, so you can probably re-enable them ๐Ÿ™‚

The Sensors are working fine for me too. (Remeha eTwist)

alessandrobenevelli commented 1 year ago

Hi, after the update to HA 2023.5.2 and the integration update with the latest one proposed by HACS, the values โ€‹โ€‹are no longer updated automatically (outside temperature, water temperature, water pressure, etc...). They only update if I manually reload the integration but then they don't update anymore.

schinddo commented 1 year ago

Indeed. Since an HA update the sensors are not updated any more.

@alessandrobenevelli as the manual refresh is working and the values are right, it looks like it is an issue with the integration and not with the API itself.

alessandrobenevelli commented 1 year ago

Indeed. Since an HA update the sensors are not updated any more.

@alessandrobenevelli as the manual refresh is working and the values are right, it looks like it is an issue with the integration and not with the API itself.

Hi, I have now updated HA to the latest version 2023.5.4 but the integration still does not update the values โ€‹โ€‹from the sensors (which work correctly even using the BAXI app). This trace appears in the HA log, I don't know if it can affect the updates:

2023-05-25 06:49:20.758 ERROR (MainThread) [homeassistant.components.sensor] Error adding entities for domain sensor with platform bdr_thermostat Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 581, in state numerical_value = float(value) # type:ignore[arg-type] ValueError: could not convert string to float: 'no-error' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state state = self._stringify_state(available) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state if (state := self.state) is None: File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 583, in state raise ValueError( ValueError: Sensor sensor.bdr_thermostat_errors has device class None, state class measurement unit None and suggested precision None thus indicating it has a numeric value; however, it has the non-numeric value: no-error (<class 'str'>)

schinddo commented 1 year ago

As I can remember this was only a WARNING in older HA versions. Now it looks like it is an ERROR and so the other sensors are not updated because of the exception.

I've temporarily set the availabilty of the Error and Status sensor to False in sensors.py an now the other sensors are updated.

alessandrobenevelli commented 1 year ago

As I can remember this was only a WARNING in older HA versions. Now it looks like it is an ERROR and so the other sensors are not updated because of the exception.

I've temporarily set the availabilty of the Error and Status sensor to False in sensors.py an now the other sensors are updated.

@schinddo could you post the fix you put and the full path to the fixed file? THX

schinddo commented 1 year ago

I have just fixed the issue. Just comment out the self._attr_state_class = SensorStateClass.MEASUREMENT line of the ErrorSensor and HeatingSensor class in constructor __init__ at line 115 and 306 (can be some lines below or above for you) in sensors.py.

phoxy84 commented 1 year ago

Great fix, thanks. Status and errors sensors are back now.

Temperature sensors are updating as well.

alessandrobenevelli commented 1 year ago

I have just fixed the issue. Just comment out the self._attr_state_class = SensorStateClass.MEASUREMENT line of the ErrorSensor and HeatingSensor class in constructor __init__ at line 115 and 306 (can be some lines below or above for you) in sensors.py.

perfect the fix works! Thank you very much