As an automation.
Be aware, that since the last update the operation modes changed!
You can find an example of my window automation in one of my posts above.
Latly I often face the issue that my netatmo component(s) does not intialisize at start up of home assistant.
Some times both climate and sensor data are affected. Sometimes only one of both. And I already have the new component (no netatmo2 any more).
Do you guys face the same issue?
Only thing that solves my issue for now is to restart it until both components are connected. This usally takes 2-3 tries.
Will you update here when it’s merged into DEV branch ? So I can delete the files you provided it to me check if it’s still working.
Regards,
Laurent
Sure. All submitted, all checks passed. But since it is marked as “breaking change”, I think it may take longer to merge.
Unfortunately I missed this. realized today that my automations stopped working. So if you are using an automation that turns back to schedule
you have to change it to auto
.
Working example:
- alias: Window open
initial_state: 'on'
trigger:
platform: state
entity_id: binary_sensor.wz
to: 'on'
action:
service: climate.set_temperature
data:
entity_id: climate.netatmo_wz
temperature: 12
- alias: window closed
initial_state: 'on'
trigger:
platform: state
entity_id: binary_sensor.wz
to: 'off'
action:
- service: climate.set_operation_mode
data:
entity_id: climate.netatmo_wz
operation_mode: auto
Do you have any advice on sensors to detect opened windows ?
When I bought the valve, netatmo advertised this feature but it seems to take a long time before being implemented … They even have a doc page : https://www.netatmo.com/en-gb/helpcenter/energy/3/how-does-the-open-window-sensor-work/340
I also found some people here detecting opened windows from the change of temperature but having a sensor sounds fun to me as it’s something else to add to my HA setup
Depending on how much time you want to spend tinkering I would recommend aqara door sensors with two options:
Option 1A) If you just want it to work and don’t mind that your data goes threw chinese servers, you could use aqara door sensors with their gateway.
Sensor:
Gateway:
They also have a homekit (more expensive; apple) variant now out of the box, but with home assistant you don’t need this because of the homekit component.
Option 1B) Else** you can spent some more time setting up zigbee2mqtt and add those aqara sensors to your local-only zigbee network (and many more zigbee devices).
https://koenkk.github.io/zigbee2mqtt/
Option 2) You could also use gigaset elements door sensors (not zigbee; siemens alarm system) if you use this project.
Option 3) other options that I don’t know/use
Thank you very much ! I will have a look at the tinkering option
I also want to mention that I find it ridiculous from netatmo that they did not implement that promised window feature yet.
We found our own solution here now thanks to @Baosong_Shan, but yeah they promise this to be released “soon” since the devices came out last year. Also contacted the support about this several times. But now I’m not interested in this any more. Their temperature sensor based feature will note beat the window sensor.
Hopefully the implementation of netatmo (in future) will not interfer with the home assistant automation. Hopefully we will be able to turn off that feature.
Hi,
In case that i’m using home assistant in docker where i can find this file to update?
because just making these changes:
i have these errors in log:
2018-12-23 17:06:57 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up platform netatmo
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/components/binary_sensor/netatmo.py", line 73, in setup_platform
if not data.get_camera_names():
File "/usr/src/app/homeassistant/components/netatmo.py", line 82, in get_camera_names
self.update()
File "/usr/src/app/homeassistant/util/__init__.py", line 324, in wrapper
result = method(*args, **kwargs)
File "/usr/src/app/homeassistant/components/netatmo.py", line 113, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
File "/config/deps/lib/python3.6/site-packages/smart_home/Camera.py", line 81, in __init__
self.default_camera = list(self.cameras[self.default_home].values())[0]
AttributeError: 'CameraData' object has no attribute 'default_home'
2018-12-23 17:06:58 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform netatmo
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/app/homeassistant/components/camera/netatmo.py", line 40, in setup_platform
for camera_name in data.get_camera_names():
File "/usr/src/app/homeassistant/components/netatmo.py", line 82, in get_camera_names
self.update()
File "/usr/src/app/homeassistant/util/__init__.py", line 324, in wrapper
result = method(*args, **kwargs)
File "/usr/src/app/homeassistant/components/netatmo.py", line 113, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
File "/config/deps/lib/python3.6/site-packages/smart_home/Camera.py", line 81, in __init__
self.default_camera = list(self.cameras[self.default_home].values())[0]
AttributeError: 'CameraData' object has no attribute 'default_home'
thanks
After restarting, and added in my climate.yaml file this:
- platform: netatmo
now works!
Sorry and thanks!
I had some troubles to bring this to work. Which files should be changed now?
I changed the netatmo.py in the components and climate folder. Is a change of Thermostats.py also required?
Hi,
In my case yesterday i updated files, and only changed the 2 github files:
And changed the climate.yaml file, and after restart twice, worked perfect!
It may be helpful if you can attach your error messages.
2018-12-27 09:04:31 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform netatmo
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 124, in _async_setup_platform
task = async_create_setup_task()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 89, in async_create_setup_task
None, platform.setup_platform, hass, platform_config,
AttributeError: module 'homeassistant.components.climate.netatmo' has no attribute 'setup_platform'
2018-12-27 09:04:31 ERROR (MainThread) [homeassistant.components.device_tracker] Unable to load /home/homeassistant/.homeassistant/known_devices.yaml: Config file not found: /home/homeassistant/.homeassistant/known_devices.yaml
2018-12-27 09:04:32 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform netatmo
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
return fut.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/camera/netatmo.py", line 40, in setup_platform
for camera_name in data.get_camera_names():
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 82, in get_camera_names
self.update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 324, in wrapper
result = method(*args, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 113, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
File "/srv/homeassistant/lib/python3.5/site-packages/smart_home/Camera.py", line 81, in __init__
self.default_camera = list(self.cameras[self.default_home].values())[0]
AttributeError: 'CameraData' object has no attribute 'default_home'
2018-12-27 09:04:32 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up platform netatmo
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
return fut.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/binary_sensor/netatmo.py", line 73, in setup_platform
if not data.get_camera_names():
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 82, in get_camera_names
self.update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 324, in wrapper
result = method(*args, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 113, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
File "/srv/homeassistant/lib/python3.5/site-packages/smart_home/Camera.py", line 81, in __init__
self.default_camera = list(self.cameras[self.default_home].values())[0]
AttributeError: 'CameraData' object has no attribute 'default_home'
2018-12-27 09:04:32 ERROR (Thread-5) [homeassistant.components.notify.ios] The notify.ios platform was loaded but no devices exist! Please check the documentation at https://home-assistant.io/ecosystem/ios/notifications/ for more information
Hi, here are the ERROR Messages. I changed the two netatmo.py files in components and components/climate and the Thermostat.py file.
In the configuration.yaml I wrote both ids and my login credentials.
Where is the problem here? Sorry, but I am new to Home Assistant.
Apparently you don’t have the correct file at least for custom_components/climate/netatmo.py
, where there should be a function called setup_platform
.
I copied your files now in the folder custom_components
and custom_components/climate
But still some errors:
2018-12-27 18:34:39 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up platform netatmo
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
return fut.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/binary_sensor/netatmo.py", line 73, in setup_platform
if not data.get_camera_names():
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 82, in get_camera_names
self.update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 324, in wrapper
result = method(*args, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 113, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
File "/srv/homeassistant/lib/python3.5/site-packages/smart_home/Camera.py", line 81, in __init__
self.default_camera = list(self.cameras[self.default_home].values())[0]
AttributeError: 'CameraData' object has no attribute 'default_home'
2018-12-27 18:34:39 ERROR (MainThread) [homeassistant.components.camera] Error while setting up platform netatmo
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/lib/python3.5/asyncio/tasks.py", line 400, in wait_for
return fut.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/camera/netatmo.py", line 40, in setup_platform
for camera_name in data.get_camera_names():
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 82, in get_camera_names
self.update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/util/__init__.py", line 324, in wrapper
result = method(*args, **kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/netatmo.py", line 113, in update
self.camera_data = pyatmo.CameraData(self.auth, size=100)
File "/srv/homeassistant/lib/python3.5/site-packages/smart_home/Camera.py", line 81, in __init__
self.default_camera = list(self.cameras[self.default_home].values())[0]
AttributeError: 'CameraData' object has no attribute 'default_home'
I think it is strange that the errors occur in the camera and binary sensor section. I have no binary netatmo sensors and also no netatmo cameras.
It seems that the climate error has gone. Any climate device found?