Fix serialization of Xiaomi BLE reauth flow (#76095)

* Use data instead of context to fix serialisation bug

* Test change to async_start_reauth
This commit is contained in:
Jc2k
2022-08-02 21:38:38 +01:00
committed by GitHub
parent a628be4db8
commit a0adfb9e62
5 changed files with 18 additions and 8 deletions

View File

@@ -641,7 +641,10 @@ class ConfigEntry:
@callback
def async_start_reauth(
self, hass: HomeAssistant, context: dict[str, Any] | None = None
self,
hass: HomeAssistant,
context: dict[str, Any] | None = None,
data: dict[str, Any] | None = None,
) -> None:
"""Start a reauth flow."""
flow_context = {
@@ -662,7 +665,7 @@ class ConfigEntry:
hass.config_entries.flow.async_init(
self.domain,
context=flow_context,
data=self.data,
data=self.data | (data or {}),
)
)