mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Use read-only options in onkyo options flow (#129929)
This commit is contained in:
parent
29ba140816
commit
7ce74cb5ec
@ -343,7 +343,9 @@ class OnkyoOptionsFlowHandler(OptionsFlow):
|
|||||||
|
|
||||||
return self.async_create_entry(
|
return self.async_create_entry(
|
||||||
data={
|
data={
|
||||||
OPTION_VOLUME_RESOLUTION: self.options[OPTION_VOLUME_RESOLUTION],
|
OPTION_VOLUME_RESOLUTION: self.config_entry.options[
|
||||||
|
OPTION_VOLUME_RESOLUTION
|
||||||
|
],
|
||||||
OPTION_MAX_VOLUME: user_input[OPTION_MAX_VOLUME],
|
OPTION_MAX_VOLUME: user_input[OPTION_MAX_VOLUME],
|
||||||
OPTION_INPUT_SOURCES: sources_store,
|
OPTION_INPUT_SOURCES: sources_store,
|
||||||
}
|
}
|
||||||
@ -351,7 +353,7 @@ class OnkyoOptionsFlowHandler(OptionsFlow):
|
|||||||
|
|
||||||
schema_dict: dict[Any, Selector] = {}
|
schema_dict: dict[Any, Selector] = {}
|
||||||
|
|
||||||
max_volume: float = self.options[OPTION_MAX_VOLUME]
|
max_volume: float = self.config_entry.options[OPTION_MAX_VOLUME]
|
||||||
schema_dict[vol.Required(OPTION_MAX_VOLUME, default=max_volume)] = (
|
schema_dict[vol.Required(OPTION_MAX_VOLUME, default=max_volume)] = (
|
||||||
NumberSelector(
|
NumberSelector(
|
||||||
NumberSelectorConfig(min=1, max=100, mode=NumberSelectorMode.BOX)
|
NumberSelectorConfig(min=1, max=100, mode=NumberSelectorMode.BOX)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user