Skip to content

Commit

Permalink
Fixed minor issue with config flow
Browse files Browse the repository at this point in the history
	ändrad:        README.md
	ändrad:        custom_components/skodaconnect/__init__.py
	ändrad:        custom_components/skodaconnect/manifest.json
	ändrad:        requirements.txt
  • Loading branch information
Farfar committed Aug 27, 2021
1 parent 7c0dac3 commit fdba02f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Skoda Connect - A Home Assistant custom component for Skoda Connect/MyŠKODA

# v1.0.47
# v1.0.48
Starting from this release the configuration changed from yaml to config flow. Because of how the data is stored and handled there will be one integration per vehicle.
Import data from configuration.yaml is also limited to one vehicle.
Setup multiple vehicles by adding the integration multiple times.
Expand Down
5 changes: 1 addition & 4 deletions custom_components/skodaconnect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,13 @@ def is_enabled(attr):
if len(new_instruments) > 0:
update = {CONF_INSTRUMENTS: {}, CONF_RESOURCES: []}
conf_instruments.update(new_instruments)
#updates[CONF_INSTRUMENTS] = conf_instruments.sort
updates[CONF_INSTRUMENTS] = dict(sorted(conf_instruments.items(), key=lambda item: item[1]))
update[CONF_INSTRUMENTS] = dict(sorted(conf_instruments.items(), key=lambda item: item[1]))

# Enable instruments if "disable new entities" is false
if not entry.pref_disable_new_entities:
_LOGGER.debug(f"Enabling new instruments {new_instruments}")
for item in new_instruments:
update[CONF_RESOURCES].append(new_instruments[item])
#_LOGGER.debug(f"Saving list {enabled_instruments}")
#updates[CONF_RESOURCES] = enabled_instruments #.sort()

_LOGGER.debug("Updating config entry with new instruments")
hass.config_entries.async_update_entry(
Expand Down
4 changes: 2 additions & 2 deletions custom_components/skodaconnect/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@lendik007",
"@Farfar"
],
"requirements": ["skodaconnect==1.0.47"],
"version": "v1.0.47",
"requirements": ["skodaconnect==1.0.48"],
"version": "v1.0.48",
"iot_class": "cloud_polling"
}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
skodaconnect==1.0.47
skodaconnect==1.0.48

0 comments on commit fdba02f

Please sign in to comment.