diff --git a/homeassistant/components/vizio/config_flow.py b/homeassistant/components/vizio/config_flow.py index cde84a6a9e2..969d387a26b 100644 --- a/homeassistant/components/vizio/config_flow.py +++ b/homeassistant/components/vizio/config_flow.py @@ -180,11 +180,8 @@ class VizioConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): if entry.data[CONF_NAME] != import_config[CONF_NAME]: updated_name[CONF_NAME] = import_config[CONF_NAME] - import_volume_step = import_config.get( - CONF_VOLUME_STEP, DEFAULT_VOLUME_STEP - ) - if entry.data.get(CONF_VOLUME_STEP) != import_volume_step: - updated_options[CONF_VOLUME_STEP] = import_volume_step + if entry.data.get(CONF_VOLUME_STEP) != import_config[CONF_VOLUME_STEP]: + updated_options[CONF_VOLUME_STEP] = import_config[CONF_VOLUME_STEP] if updated_options or updated_name: new_data = entry.data.copy() diff --git a/homeassistant/components/vizio/media_player.py b/homeassistant/components/vizio/media_player.py index 13554ab8f36..6b62d6bafd0 100644 --- a/homeassistant/components/vizio/media_player.py +++ b/homeassistant/components/vizio/media_player.py @@ -56,10 +56,18 @@ async def async_setup_entry( volume_step = config_entry.options.get( CONF_VOLUME_STEP, config_entry.data.get(CONF_VOLUME_STEP, DEFAULT_VOLUME_STEP), ) + + params = {} if not config_entry.options: - hass.config_entries.async_update_entry( - config_entry, options={CONF_VOLUME_STEP: volume_step} - ) + params["options"] = {CONF_VOLUME_STEP: volume_step} + + if not config_entry.data.get(CONF_VOLUME_STEP): + new_data = config_entry.data.copy() + new_data.update({CONF_VOLUME_STEP: volume_step}) + params["data"] = new_data + + if params: + hass.config_entries.async_update_entry(config_entry, **params) device = VizioAsync( DEVICE_ID,