Error with Netatmo Climate

Hi everybody,

since yesterday, I’ve got the following error with the Netatmo thermostat…
I tried to reinstall the integration, reset the Netatmo credentials, reboot again and again…

Logger: homeassistant.components.climate
Source: components/netatmo/ 
Integration: Thermostat (documentation, issues) 
First occurred: 21:32:34 (1 occurrences) 
Last logged: 21:32:34

Error while setting up netatmo platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/", line 201, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/", line 310, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/", line 481, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/", line 522, in add_to_platform_finish
  File "/usr/src/homeassistant/homeassistant/helpers/", line 296, in async_write_ha_state
  File "/usr/src/homeassistant/homeassistant/helpers/", line 322, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/climate/", line 258, in state_attributes
    if self.hvac_action:
  File "/usr/src/homeassistant/homeassistant/components/netatmo/", line 319, in hvac_action
    return CURRENT_HVAC_MAP_NETATMO[self._boilerstatus]
KeyError: None

Could you help me ?

Thank you in advance !

This is a bug and needs to be fixed. If you’re happy to mess with your installation I can provide you a fix early (for testing). Otherwise you’d have to wait for the PR to get merged.

Hi cgtobi !

I could try your fix with pleasure if you wish !! :slight_smile:

It’s a very tiny change:

I never done this kind of modification, could you tell me where I have to change ?

Depending on how you’re running HA you have connect to that (e.g. core on a Raspberry Pi, use ssh) to open /usr/src/homeassistant/homeassistant/components/netatmo/ in an editor (e.g. nano or vi) and navigate to line 318.

If you tell me how you’re running HA I can give you more specific instructions.

My HA is running on a NUC, with a docker installed on Debian 10.
My /usr/src/ is empty… (tested with a ls -a)

I tried to create a /custom_component/netatmo/ and the modification you’ve done is working !
So I will wait for the deployment !

Thank you for your reactivity !!

Great. The PR is approved and will get merged soon. It should land in .116 I think.