Skip to content

Commit

Permalink
fix: update options data only if new
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Sep 6, 2020
1 parent 45b0306 commit e7840f5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions custom_components/alexa_media/__init__.py
Expand Up @@ -1022,10 +1022,9 @@ async def update_listener(hass, config_entry):
for key, old_value in hass.data[DATA_ALEXAMEDIA]["accounts"][email][
"options"
].items():
hass.data[DATA_ALEXAMEDIA]["accounts"][email]["options"][
key
] = new_value = config_entry.options.get(key)
new_value = config_entry.options.get(key)
if new_value is not None and new_value != old_value:
hass.data[DATA_ALEXAMEDIA]["accounts"][email]["options"][key] = new_value
_LOGGER.debug(
"Changing option %s from %s to %s",
key,
Expand Down

0 comments on commit e7840f5

Please sign in to comment.