dolezsa / thermal_comfort

Thermal Comfort sensor for HA (absolute humidity, heat index, dew point, thermal perception)
Other
590 stars 110 forks source link

Error on log : Update for sensor.entree_frostrisk fails #91

Closed landaisbenj closed 2 years ago

landaisbenj commented 2 years ago

Hello, i always have this error on start :

``` 2022-01-19 22:22:22 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.entree_perception fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 487, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 691, in async_device_update raise exc File "/config/custom_components/thermal_comfort/sensor.py", line 300, in async_update setattr(self, property_name, template.async_render()) File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 396, in async_render if not parse_result or self.hass.config.legacy_templates: AttributeError: 'NoneType' object has no attribute 'config' 2022-01-19 22:22:22 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.entree_frostrisk fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 487, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 691, in async_device_update raise exc File "/config/custom_components/thermal_comfort/sensor.py", line 300, in async_update setattr(self, property_name, template.async_render()) File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 396, in async_render if not parse_result or self.hass.config.legacy_templates: AttributeError: 'NoneType' object has no attribute 'config' ```

I've this configuration :

  - platform: thermal_comfort
    sensors:
      entree:
        friendly_name: Risque de gel
        unique_id: 97a03fea-5983-44b1-a52b-bbbb12f7918a
        temperature_sensor: sensor.temperature_lumi_158d0002f9702d
        humidity_sensor: sensor.humidity_lumi_158d0002f9702d
        icon_template: mdi:snowflake-alert
        sensor_types:
          - perception
          - frostrisk
rautesamtr commented 2 years ago

Thanks for the report it should be fixed now