Skip to content

Commit 36c53d9

Browse files
committed
Fix support migration on old Hass
1 parent b6c122b commit 36c53d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

custom_components/xiaomi_gateway3/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ async def async_migrate_entry(hass: HomeAssistant, config_entry: ConfigEntry):
135135
hass_utils.migrate_legacy_entitites_unique_id(hass)
136136
hass_utils.migrate_devices_store()
137137

138-
hass.config_entries.async_update_entry(config_entry, version=4)
138+
try:
139+
# fix support Hass 2023.12 and earlier - no version arg
140+
hass.config_entries.async_update_entry(config_entry, version=4)
141+
except TypeError:
142+
pass
139143
return True
140144

141145

0 commit comments

Comments
 (0)