jheling / freeathome

Free@Home component for Home Assistant
114 stars 41 forks source link

Non-critical errors in HA log #40

Closed SuperMaximus1984 closed 2 years ago

SuperMaximus1984 commented 4 years ago

Dear @jheling ,

I always get the following messages in HA logs. Looks like they are not preventing F@H system from functioning, but I wonder what's the cause?

Error doing job: Task exception was never retrieved
17:40:35 – custom_components/freeathome/climate.py (ERROR) 
Using slower stringprep, consider compiling the faster cython/libidn one.
17:40:30 – custom_components/freeathome/pfreeathome.py (WARNING)

in details:

2020-04-02 17:40:10 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for freeathome 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.
2020-04-02 17:40:30 WARNING (MainThread) [slixmpp.stringprep] Using slower stringprep, consider compiling the faster cython/libidn one.
2020-04-02 17:40:35 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 434, in _async_add_entity
    await entity.async_update_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 284, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 327, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 213, in state_attributes
    self.current_temperature,
  File "/config/custom_components/freeathome/climate.py", line 85, in current_temperature
    return float(self.thermostat_device.current_temperature)
TypeError: float() argument must be a string or a number, not 'NoneType'
2020-04-02 17:40:35 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 434, in _async_add_entity
    await entity.async_update_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 284, in async_update_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 327, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 213, in state_attributes
    self.current_temperature,
  File "/config/custom_components/freeathome/climate.py", line 85, in current_temperature
    return float(self.thermostat_device.current_temperature)
TypeError: float() argument must be a string or a number, not 'NoneType'
jheling commented 4 years ago

The warning shows up every time, but is not serious. the second is a indication that the current temperature of a thermostat is not updated. In the source pfreeathome.py, the function add_thermostat is looking for a channel in the mastermessage.py. But it is probably not available in the message and then you get the nonetype error. Can you figure out what the thermostats in your system are and if they have channels? I do not have any thermostats in my system.