Adding support for Netatmo Thermostat

This is the logger I have. I made a search with NETATMO in my log and only the above parts comes. I need to change the logger: code?

 logger:
      default: warning
      logs:
        homeassistant.components.switch.broadlink: info
        homeassistant.components.automation: info
        homeassistant.components.script: info
    #    homeassistant.components.device_tracker: info
    #    homeassistant.components.http: info
        homeassistant.components.rfxtrx: info
    #    homeassistant.components.sensor.miflora: debug
        custom_components.xiaomi: debug
        custom_components.sensor.xiaomi: debug
        custom_components.switch.xiaomi: debug
        custom_components.binary_sensor: debug
        custom_components.light.xiaomi: debug
        miflora.miflora_poller: debug
        homeassistant.components.sensor.miflora: debug

climate group is not showing

And in the “about” screen in developer tools?

Any update?

Maybe you can give me previous code (I didn’t save it).
I need the temperature values for some automation, that now don’t work

@anon35356645
You can always use history in github


And then use browse the repository at this point in the history

Can you find it?

But I think you were not giving me the whole error.

Normally behind this comes the real error, something like this:

AttributeError: 'ThermostatData' object has no attribute 'setpoints'

And when you post errors, can you post the like this

tripple `
paste the error
tripple `

I looked for
thermo
netat
climate
setpoint

only log is this

7-02-16 17:53:58 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 151, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/hass/.homeassistant/custom_components/climate/netatmo.py", line 66, in setup_platform
    for relay_name in data.get_relay_names():
  File "/home/hass/.homeassistant/custom_components/climate/netatmo.py", line 253, in get_relay_names
    for relay in self.thermostatdata.relays.values():
AttributeError: 'ThermostatData' object has no attribute 'relays'
1

@anon35356645
Did you also replace the Thermostat.py file? In deps/smart_home/

I was missing this line

Hi, any update?

I put the one of 21 days ago … and the card does not show …

climate disappeared … arrrggghhhh

17-02-17 14:31:27 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 151, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/hass/.homeassistant/custom_components/climate/netatmo.py", line 47, in setup_platform
    for module_name in data.get_module_names():
  File "/home/hass/.homeassistant/custom_components/climate/netatmo.py", line 182, in get_module_names
    for device in self.thermostatdata.modules:
AttributeError: 'ThermostatData' object has no attribute 'modules'

You always have to download netatmo.py and Thermostat.py from the same commit,
so when you download Thermostat.py from the commit “another try”, you also have to download netatmo.py from the commit “another try”.

Did you already tried the final commit “please test”? netatmo.py and Thermostat.py?

“please test” files result.:

17-02-17 16:14:37 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo
Traceback (most recent call last):
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 151, in _async_setup_platform
    entity_platform.add_entities, discovery_info
  File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup
    value = future.result()
  File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result
    raise self._exception
  File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/hass/.homeassistant/custom_components/climate/netatmo.py", line 76, in setup_platform
    add_devices([NetatmoThermostat(data, module_name, relay_name)])
  File "/home/hass/.homeassistant/custom_components/climate/netatmo.py", line 91, in __init__
    relay=relay_name)['_id']
TypeError: 'NoneType' object is not subscriptable

If you have time? I’ve pushed a new commit…

Do you have them back when u use the history?

Nope , wil try now new one

have you tried the ones from “update custom_components” and “Create custom climate component netatmo”?

Those are the ones from the last commit “test again”
any errors?

Those others are for getting your temperature values back in the mean while.

only one thermostat is showing.

I have a pretty big log, which item shall I look for?

https://raw.githubusercontent.com/gieljnssns/My_Home-Assistant/8c184e6f15d73b92ebb4b05ece3c817db526cac2/homeassistant/custom_components/climate/netatmo.py

https://raw.githubusercontent.com/gieljnssns/My_Home-Assistant/8c184e6f15d73b92ebb4b05ece3c817db526cac2/homeassistant/deps/smart_home/Thermostat.py

Can you download those 2 and try them, I hope you have your temperature values back.