Skip to content

Commit

Permalink
revert config option
Browse files Browse the repository at this point in the history
  • Loading branch information
mrwogu committed Nov 28, 2022
1 parent e63acdb commit 8e6c9d5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
3 changes: 1 addition & 2 deletions homeassistant/components/xiaomi_miio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
CONF_DEVICE,
CONF_FLOW_TYPE,
CONF_GATEWAY,
CONF_LAZY_DISCOVER,
DOMAIN,
KEY_COORDINATOR,
KEY_DEVICE,
Expand Down Expand Up @@ -287,7 +286,7 @@ async def async_create_miio_device_and_coordinator(
name = entry.title
device: MiioDevice | None = None
migrate = False
lazy_discover = entry.options.get(CONF_LAZY_DISCOVER, False)
lazy_discover = False
update_method = _async_update_data_default
coordinator_class: type[DataUpdateCoordinator] = DataUpdateCoordinator

Expand Down
7 changes: 1 addition & 6 deletions homeassistant/components/xiaomi_miio/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
CONF_DEVICE,
CONF_FLOW_TYPE,
CONF_GATEWAY,
CONF_LAZY_DISCOVER,
CONF_MAC,
CONF_MANUAL,
DEFAULT_CLOUD_COUNTRY,
Expand Down Expand Up @@ -98,11 +97,7 @@ async def async_step_init(
vol.Optional(
CONF_CLOUD_SUBDEVICES,
default=self.config_entry.options.get(CONF_CLOUD_SUBDEVICES, False),
): bool,
vol.Optional(
CONF_LAZY_DISCOVER,
default=self.config_entry.options.get(CONF_LAZY_DISCOVER, False),
): bool,
): bool
}
)

Expand Down
3 changes: 1 addition & 2 deletions homeassistant/components/xiaomi_miio/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
"step": {
"init": {
"data": {
"cloud_subdevices": "Use cloud to get connected subdevices",
"lazy_discover": "Use lazy discover to optimize device connectivity"
"cloud_subdevices": "Use cloud to get connected subdevices"
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions tests/components/xiaomi_miio/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -895,14 +895,12 @@ async def test_options_flow(hass):
result["flow_id"],
user_input={
const.CONF_CLOUD_SUBDEVICES: True,
const.CONF_LAZY_DISCOVER: False,
},
)

assert result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY
assert config_entry.options == {
const.CONF_CLOUD_SUBDEVICES: True,
const.CONF_LAZY_DISCOVER: False,
}


Expand Down Expand Up @@ -936,7 +934,6 @@ async def test_options_flow_incomplete(hass):
result["flow_id"],
user_input={
const.CONF_CLOUD_SUBDEVICES: True,
const.CONF_LAZY_DISCOVER: False,
},
)

Expand Down

0 comments on commit 8e6c9d5

Please sign in to comment.