New Netatmo climate component supporting multiple thermostats/valves

Ok, so I tried your, but the sensor stays unknown when I use it like this. Also I cannot use it in the dev-template section.

- platform: template
  sensors:
    netatmo_thermostat_mode:
      value_template: >-
        {% set devices = [  states.climate.netatmo_1,
                            states.climate.netatmo_2,
                            states.climate.netatmo_3 ] %}
        {% set auto_amount = devices | selectattr('attributes.operation_mode','eq','auto') | length %}
        {{ 'auto' if auto_amount == devices | length else 'manual' }}

Or do I need to set up an entity_id list for this too (did not have to do this with my version above).

I was just talking with someone about this. I believe list is needed between selectattr and length

{% set auto_amount = devices | selectattr('attributes.operation_mode','eq','auto') | list | length %}

Ok, so the output I get know is:

manual # # manual #

when at least one valve is in ā€œmanualā€ mode. And:

auto # # auto #

if all are in auto mode.

Hi everyone,

I used to use the Netatmo custom component to override the default 2hours of the manual boost on the thermostat.
Now Iā€™ve updated to 0.89 and updated the custom component files, but I canā€™t seem to identify on the code where the 2 hours default value is set, so that I can override it with another value.

Any hint?

Thanks!

You can set that value direclty in the netatmo thermostat App

My menu is in german so I donā€™t know the exact button names. Must be something like
Settings > Mode > Set manual setpoint

Thanks h4nc.
That works when you set the target temp using the netatmo thermostat App. If you set the target temp using HA, the manual boost will always be set for 2 hours regardless the value set on the official Netatmo appā€¦

I see sorry that I didnā€™t get that. @Baosong_Shan will be able to tell you the right answer.

In the meantime you could set up an automation that turn climate.xxx-entities back to ā€˜autoā€™ when they were ā€˜manualā€™ for ā€˜your desired valueā€™.

Hi. I have cleaned up everything in custom components and running version 0.91.0.dev0. But Iā€™m now getting the following error:

Error while setting up platform netatmo
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=hass.loop)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 87, in setup_platform
    homes = home_data.get_home_names()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 301, in get_home_names
    self.setup()
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/netatmo/climate.py", line 314, in setup
    self.homedata = pyatmo.HomeData(self.auth)
  File "/config/deps/lib/python3.7/site-packages/smart_home/Thermostat.py", line 40, in __init__
    nameHome = self.rawData[i]["name"]
KeyError: 'name'

This is my config:

netatmo:
  api_key: xyzxyzxyzxyz
  secret_key: xyzxyzyxyzyxyz
  username: [email protected]
  password: Password

The same config used to work before using custo, component.

@petro any idea why the output looks like this?

FYI,

Renamed custom_component directory, updated the docker container to 0.90 and everything is working as expected (I have thermostat, valves, cameras and weather station from Netatmo)

Edit, I celebrated too early, all netatmo devices works expect thermostat and valves ā€¦

Thank you very much for the time you have put into this @Baosong_Shan !!!

we just need to rename the netatmo directory to (for example) netatmoOLD, correct?

Sorry but after another restart and probably a refresh on my side, it was clear itā€™s not working anymoreā€¦

you have to post your whole yaml, Iā€™m guessing you are looping when you shouldnā€™t be. Did you try the template I provided with nothing else?

Finally I continue using custom component with 0.90 and it works as expected.

I found the issue. I had my commented out code from before directly under yours, so it somehow took the # from there.

Removing my old code fixed it. Thanks @petro

Hmm might this new climate component have something to do with the error I am getting?

I donā€™t have any thermostats or anything from Netatmo, but it tries to use the climate component and fails any way it seems.

how can I delete climate.netatmo double entities? they are not present in core.entity_registry. where do they sell stored?

Maybe in the device_registry

Hi, I have the camera netatmo and it has stopped working in version 0.91, it is not clear to me what files I have to enter in custom_components. Can someone explain to me how to configure it now?

This component is now a full part of HA so you shouldnā€™t need any custom component setup.

Do your logs give any error related to the camera?