Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions homeassistant/components/netatmo/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,13 @@ async def async_setup_entry(
for home_id in climate_topology.home_ids:
signal_name = f"{CLIMATE_STATE_CLASS_NAME}-{home_id}"

try:
await data_handler.register_data_class(
CLIMATE_STATE_CLASS_NAME, signal_name, None, home_id=home_id
)
except KeyError:
await data_handler.register_data_class(
CLIMATE_STATE_CLASS_NAME, signal_name, None, home_id=home_id
)

if (climate_state := data_handler.data[signal_name]) is None:
continue

climate_state = data_handler.data[signal_name]
climate_topology.register_handler(home_id, climate_state.process_topology)

for room in climate_state.homes[home_id].rooms.values():
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/netatmo/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Netatmo",
"documentation": "https://www.home-assistant.io/integrations/netatmo",
"requirements": [
"pyatmo==6.2.0"
"pyatmo==6.2.1"
],
"after_dependencies": [
"cloud",
Expand Down
12 changes: 4 additions & 8 deletions homeassistant/components/netatmo/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,13 @@ async def async_setup_entry(
for home_id in climate_topology.home_ids:
signal_name = f"{CLIMATE_STATE_CLASS_NAME}-{home_id}"

try:
await data_handler.register_data_class(
CLIMATE_STATE_CLASS_NAME, signal_name, None, home_id=home_id
)
except KeyError:
continue

await data_handler.register_data_class(
CLIMATE_STATE_CLASS_NAME, signal_name, None, home_id=home_id
)
climate_state = data_handler.data.get(signal_name)

if (climate_state := data_handler.data[signal_name]) is None:
continue

climate_topology.register_handler(home_id, climate_state.process_topology)

hass.data[DOMAIN][DATA_SCHEDULES][home_id] = climate_state.homes[
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ pyarlo==0.2.4
pyatag==0.3.5.3

# homeassistant.components.netatmo
pyatmo==6.2.0
pyatmo==6.2.1

# homeassistant.components.atome
pyatome==0.1.1
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ pyarlo==0.2.4
pyatag==0.3.5.3

# homeassistant.components.netatmo
pyatmo==6.2.0
pyatmo==6.2.1

# homeassistant.components.apple_tv
pyatv==0.9.8
Expand Down