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

Integration keeps spamming errors #34

Closed Marck closed 1 year ago

Marck commented 1 year ago

Installed the integration with using a Remeha. After a day or two, it keeps spamming errors that don't have a clear message:

2023-02-12 12:16:27.206 ERROR (MainThread) [custom_components.bdr_thermostat.climate] {'mode': 'manual', 'fireplaceModeOn': False, 'roomTemperature': {'value': 21.0, 'unit': '°C', 'min': 0.0, 'max': 50.0}, 'roomTemperatureSetpoint': {'value': 12.0, 'unit': '°C', 'min': 0.0, 'max': 60.0, 'increment': 0.1}, 'zoneActivity': 'standby', 'timeProgram': 1}

After enabling debug logging, I get warnings that sensors have the wrong classes:

2023-02-12 12:16:26.986 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.bdr_thermostat_burning_hours (<class 'custom_components.bdr_thermostat.sensor.BurningHoursSensor'>) is using native unit of measurement 'hours' which is not a valid unit for the device class ('duration') it is using; expected one of ['h', 'd', 'min', 's']; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

2023-02-12 12:16:27.195 WARNING (MainThread) [homeassistant.components.sensor] Sensor sensor.bdr_thermostat_errors has device class None, state class measurement and unit None thus indicating it has a numeric value; however, it has the non-numeric value: no-error (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

2023-02-12 12:16:27.215 WARNING (MainThread) [homeassistant.components.sensor] Sensor sensor.bdr_thermostat_outside_temperature has device class temperature, state class measurement and unit thus indicating it has a numeric value; however, it has the non-numeric value: N/A (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

2023-02-12 12:16:27.220 WARNING (MainThread) [homeassistant.components.sensor] Sensor sensor.bdr_thermostat_status has device class None, state class measurement and unit None thus indicating it has a numeric value; however, it has the non-numeric value: standby (<class 'str'>); Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.

Any advice what could be the issue? The sensors keep updating so there isn't any issue, besides the spamming of the error.

I want to take a look at the code later to see if I can improve the messages and the class of the sensors

freitdav commented 1 year ago

Dear Marck, as pointed out in the disclaimer, the integration does not work for the new Remeha API and smartphone app due to its recent changes. I am not able to research and test new Remeha app, thus I am sorry but can not fix it. However please go through other issues and you will find links to working Remeha integration.

Marck commented 1 year ago

It's not that the integration doesn't work (it works for now), but I get loads of spam. I ignored it for now with:

logger:
  logs:
    custom_components.bdr_thermostat.climate: fatal

Also I would suggest making the disclaimer more clear and/or making this a public archive and adding the other repos for Remeha.

That said, if anyone encounters this issue and doesn't want to scroll to the other issues: these are some adjustments to this repo that might work for you. Feel free to add more repos if you find them.

Thomas99a commented 1 year ago

Hi,

I digged a little bit deeper into this since I also got the log messages while having/using the old Remeha API.

2023-02-12 12:16:27.206 ERROR (MainThread) [custom_components.bdr_thermostat.climate] {'mode': 'manual', 'fireplaceModeOn': False, 'roomTemperature': {'value': 21.0, 'unit': '°C', 'min': 0.0, 'max': 50.0}, 'roomTemperatureSetpoint': {'value': 12.0, 'unit': '°C', 'min': 0.0, 'max': 60.0, 'increment': 0.1}, 'zoneActivity': 'standby', 'timeProgram': 1} This originates from from line 106 in climate.py. It seems to be used for debugging but writes to the error logger.

Remeha eTwist provides for BurningHours the unit "hours" which is not known to HA. This can easily be fixed by setting it to "h", but I do not know if this would be compatible for the other brands.

Error and Status are marked with state_class.measurement and HA expects some unit information. Since this sensor provide no no measurements removing the state class for this sensor will resolve this issues.

The issue with receiving is not that simple because which value should be provided for the case the Integrations can't deliver it. I also observed this very rarely. This could be solved using an extra sensor in HA to filter such values, but than you can't see that something is wrong on the interface.