home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.54k stars 30.35k forks source link

Netatmo entities are duplicated (valve mainly) #28937

Closed Dulcow closed 4 years ago

Dulcow commented 4 years ago

Home Assistant release with the issue:

0.102.0

Last working Home Assistant release (if known): N/A

Operating environment (Hass.io/Docker/Windows/etc.):

Hass.io on RaspBerry PI 3b+

Integration:

https://www.home-assistant.io/integrations/netatmo/

Description of problem: Temperatures seem to be in synced between the two copies of thermostats. There is sometimes a bit of lag between the two instances but it looks the same to me after a few minutes.

Screenshot_1

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

climate:
  - platform: netatmo

Traceback (if applicable):

2019-11-21 17:25:52 DEBUG (SyncWorker_3) [homeassistant.components.netatmo.climate] Following is the debugging output for homestatus: 2019-11-21 17:25:52 DEBUG (SyncWorker_3) [homeassistant.components.netatmo.climate] {'id': '5dd40491273f77ea2854adbb', 'modules': [{'id': '70:ee:50:0f:4a:34', 'type': 'NAPlug', 'firmware_revision': 210, 'rf_strength': 100, 'wifi_strength': 45}, {'id': '09:00:00:04:9f:a4', 'reachable': True, 'type': 'NRV', 'firmware_revision': 81, 'rf_strength': 52, 'battery_level': 3167, 'bridge': '70:ee:50:0f:4a:34', 'battery_state': 'full'}, {'id': '09:00:00:04:9f:32', 'reachable': True, 'type': 'NRV', 'firmware_revision': 81, 'rf_strength': 48, 'battery_level': 3191, 'bridge': '70:ee:50:0f:4a:34', 'battery_state': 'full'}], 'rooms': [{'id': '1286473915', 'reachable': True, 'therm_measured_temperature': 19, 'heating_power_request': 0, 'therm_setpoint_temperature': 18, 'therm_setpoint_mode': 'schedule', 'therm_setpoint_start_time': 1574319603, 'therm_setpoint_end_time': 0, 'anticipating': False, 'open_window': False}, {'id': '1488998979', 'reachable': True, 'therm_measured_temperature': 20.5, 'heating_power_request': 0, 'therm_setpoint_temperature': 18, 'therm_setpoint_mode': 'schedule', 'therm_setpoint_start_time': 1574319603, 'therm_setpoint_end_time': 0, 'anticipating': False, 'open_window': False}]} 2019-11-21 17:25:52 DEBUG (SyncWorker_3) [homeassistant.components.netatmo.climate] Setting up Parents Bedroom (1286473915) ... 2019-11-21 17:25:52 DEBUG (SyncWorker_3) [homeassistant.components.netatmo.climate] Adding devices for room Parents Bedroom (1286473915) ... 2019-11-21 17:25:52 DEBUG (SyncWorker_3) [homeassistant.components.netatmo.climate] Setting up Bathroom (1488998979) ... 2019-11-21 17:25:52 DEBUG (SyncWorker_3) [homeassistant.components.netatmo.climate] Adding devices for room Bathroom (1488998979) ...
2019-11-21 17:25:54 DEBUG (SyncWorker_13) [homeassistant.components.netatmo.climate] Following is the debugging output for homestatus: 2019-11-21 17:25:54 DEBUG (SyncWorker_13) [homeassistant.components.netatmo.climate] {'id': '5dd40491273f77ea2854adbb', 'modules': [{'id': '70:ee:50:0f:4a:34', 'type': 'NAPlug', 'firmware_revision': 210, 'rf_strength': 100, 'wifi_strength': 45}, {'id': '09:00:00:04:9f:a4', 'reachable': True, 'type': 'NRV', 'firmware_revision': 81, 'rf_strength': 52, 'battery_level': 3167, 'bridge': '70:ee:50:0f:4a:34', 'battery_state': 'full'}, {'id': '09:00:00:04:9f:32', 'reachable': True, 'type': 'NRV', 'firmware_revision': 81, 'rf_strength': 48, 'battery_level': 3191, 'bridge': '70:ee:50:0f:4a:34', 'battery_state': 'full'}], 'rooms': [{'id': '1286473915', 'reachable': True, 'therm_measured_temperature': 19, 'heating_power_request': 0, 'therm_setpoint_temperature': 18, 'therm_setpoint_mode': 'schedule', 'therm_setpoint_start_time': 1574319603, 'therm_setpoint_end_time': 0, 'anticipating': False, 'open_window': False}, {'id': '1488998979', 'reachable': True, 'therm_measured_temperature': 20.5, 'heating_power_request': 0, 'therm_setpoint_temperature': 18, 'therm_setpoint_mode': 'schedule', 'therm_setpoint_start_time': 1574319603, 'therm_setpoint_end_time': 0, 'anticipating': False, 'open_window': False}]} 2019-11-21 17:25:54 DEBUG (SyncWorker_13) [homeassistant.components.netatmo.climate] Setting up Parents Bedroom (1286473915) ... 2019-11-21 17:25:54 DEBUG (SyncWorker_13) [homeassistant.components.netatmo.climate] Adding devices for room Parents Bedroom (1286473915) ... 2019-11-21 17:25:54 DEBUG (SyncWorker_13) [homeassistant.components.netatmo.climate] Setting up Bathroom (1488998979) ... 2019-11-21 17:25:54 DEBUG (SyncWorker_13) [homeassistant.components.netatmo.climate] Adding devices for room Bathroom (1488998979) ...

Additional information: I can still see the following message popping up in the logs:

homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.netatmo_bathroom_battery. Platform netatmo does not generate unique IDs

cgtobi commented 4 years ago

This most likely happens because the config looks somewhat like

netatmo:
  api_key: !secret netatmo_api_key
  secret_key: !secret netatmo_secret_key
  username: !secret netatmo_username
  password: !secret netatmo_password

climate:
  - platform: netatmo

Actually only the following part is needed if auto discovery is used (default), otherwise discovery has to be deactivated.

netatmo:
  api_key: !secret netatmo_api_key
  secret_key: !secret netatmo_secret_key
  username: !secret netatmo_username
  password: !secret netatmo_password
Dulcow commented 4 years ago

I will close the bug. It was due to some faulty configuration on my side.