Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions homeassistant/components/bauknecht/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Bauknecht virtual integration."""
6 changes: 6 additions & 0 deletions homeassistant/components/bauknecht/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"domain": "bauknecht",
"name": "Bauknecht",
"integration_type": "virtual",
"supported_by": "whirlpool"
}
9 changes: 0 additions & 9 deletions homeassistant/components/forecast_solar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ async def async_setup_entry(

await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

entry.async_on_unload(entry.add_update_listener(async_update_options))

return True


Expand All @@ -57,10 +55,3 @@ async def async_unload_entry(
) -> bool:
"""Unload a config entry."""
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)


async def async_update_options(
hass: HomeAssistant, entry: ForecastSolarConfigEntry
) -> None:
"""Update options."""
await hass.config_entries.async_reload(entry.entry_id)
4 changes: 2 additions & 2 deletions homeassistant/components/forecast_solar/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
ConfigEntry,
ConfigFlow,
ConfigFlowResult,
OptionsFlow,
OptionsFlowWithReload,
)
from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME
from homeassistant.core import callback
Expand Down Expand Up @@ -88,7 +88,7 @@ async def async_step_user(
)


class ForecastSolarOptionFlowHandler(OptionsFlow):
class ForecastSolarOptionFlowHandler(OptionsFlowWithReload):
"""Handle options."""

async def async_step_init(
Expand Down
7 changes: 0 additions & 7 deletions homeassistant/components/jewish_calendar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,6 @@ async def async_setup_entry(

await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)

async def update_listener(
hass: HomeAssistant, config_entry: JewishCalendarConfigEntry
) -> None:
# Trigger update of states for all platforms
await hass.config_entries.async_reload(config_entry.entry_id)

config_entry.async_on_unload(config_entry.add_update_listener(update_listener))
return True


Expand Down
8 changes: 6 additions & 2 deletions homeassistant/components/jewish_calendar/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
from hdate.translator import Language
import voluptuous as vol

from homeassistant.config_entries import ConfigFlow, ConfigFlowResult, OptionsFlow
from homeassistant.config_entries import (
ConfigFlow,
ConfigFlowResult,
OptionsFlowWithReload,
)
from homeassistant.const import (
CONF_ELEVATION,
CONF_LANGUAGE,
Expand Down Expand Up @@ -124,7 +128,7 @@ async def async_step_reconfigure(
return self.async_update_reload_and_abort(reconfigure_entry, data=user_input)


class JewishCalendarOptionsFlowHandler(OptionsFlow):
class JewishCalendarOptionsFlowHandler(OptionsFlowWithReload):
"""Handle Jewish Calendar options."""

async def async_step_init(
Expand Down
7 changes: 0 additions & 7 deletions homeassistant/components/lamarzocco/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: LaMarzoccoConfigEntry) -

await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)

async def update_listener(
hass: HomeAssistant, entry: LaMarzoccoConfigEntry
) -> None:
await hass.config_entries.async_reload(entry.entry_id)

entry.async_on_unload(entry.add_update_listener(update_listener))

return True


Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/lamarzocco/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
SOURCE_RECONFIGURE,
ConfigFlow,
ConfigFlowResult,
OptionsFlow,
OptionsFlowWithReload,
)
from homeassistant.const import (
CONF_ADDRESS,
Expand Down Expand Up @@ -363,7 +363,7 @@ def async_get_options_flow(
return LmOptionsFlowHandler()


class LmOptionsFlowHandler(OptionsFlow):
class LmOptionsFlowHandler(OptionsFlowWithReload):
"""Handles options flow for the component."""

async def async_step_init(
Expand Down
6 changes: 0 additions & 6 deletions homeassistant/components/lastfm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: LastFMConfigEntry) -> bo
entry.runtime_data = coordinator

await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
entry.async_on_unload(entry.add_update_listener(update_listener))

return True


async def async_unload_entry(hass: HomeAssistant, entry: LastFMConfigEntry) -> bool:
"""Unload lastfm config entry."""
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)


async def update_listener(hass: HomeAssistant, entry: LastFMConfigEntry) -> None:
"""Handle options update."""
await hass.config_entries.async_reload(entry.entry_id)
8 changes: 6 additions & 2 deletions homeassistant/components/lastfm/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
from pylast import LastFMNetwork, PyLastError, User, WSError
import voluptuous as vol

from homeassistant.config_entries import ConfigFlow, ConfigFlowResult, OptionsFlow
from homeassistant.config_entries import (
ConfigFlow,
ConfigFlowResult,
OptionsFlowWithReload,
)
from homeassistant.const import CONF_API_KEY
from homeassistant.core import callback
from homeassistant.helpers.selector import (
Expand Down Expand Up @@ -155,7 +159,7 @@ async def async_step_friends(
)


class LastFmOptionsFlowHandler(OptionsFlow):
class LastFmOptionsFlowHandler(OptionsFlowWithReload):
"""LastFm Options flow handler."""

config_entry: LastFMConfigEntry
Expand Down
6 changes: 0 additions & 6 deletions homeassistant/components/met/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ async def async_setup_entry(

config_entry.runtime_data = coordinator

config_entry.async_on_unload(config_entry.add_update_listener(async_update_entry))
config_entry.async_on_unload(coordinator.untrack_home)

await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
Expand All @@ -64,11 +63,6 @@ async def async_unload_entry(
return await hass.config_entries.async_unload_platforms(config_entry, PLATFORMS)


async def async_update_entry(hass: HomeAssistant, config_entry: MetWeatherConfigEntry):
"""Reload Met component when options changed."""
await hass.config_entries.async_reload(config_entry.entry_id)


async def cleanup_old_device(hass: HomeAssistant) -> None:
"""Cleanup device without proper device identifier."""
device_reg = dr.async_get(hass)
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/components/met/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
ConfigEntry,
ConfigFlow,
ConfigFlowResult,
OptionsFlow,
OptionsFlowWithReload,
)
from homeassistant.const import (
CONF_ELEVATION,
Expand Down Expand Up @@ -147,7 +147,7 @@ def async_get_options_flow(
return MetOptionsFlowHandler()


class MetOptionsFlowHandler(OptionsFlow):
class MetOptionsFlowHandler(OptionsFlowWithReload):
"""Options flow for Met component."""

async def async_step_init(
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/mqtt/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@
},
"data_description": {
"discovery_topic": "The [discovery topic]({url}#discovery-topic) to publish the discovery payload, used to trigger MQTT discovery. An empty payload published to this topic will remove the device and discovered entities.",
"discovery_payload": "The JSON [discovery payload]({url}#discovery-discovery-payload) that contains information about the MQTT device."
"discovery_payload": "The JSON [discovery payload]({url}#device-discovery-payload) that contains information about the MQTT device."
}
}
},
Expand Down
6 changes: 0 additions & 6 deletions homeassistant/components/nut/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ async def async_update_data() -> dict[str, str]:

_LOGGER.debug("NUT Sensors Available: %s", status if status else None)

entry.async_on_unload(entry.add_update_listener(_async_update_listener))
unique_id = _unique_id_from_status(status)
if unique_id is None:
unique_id = entry.entry_id
Expand Down Expand Up @@ -199,11 +198,6 @@ async def async_remove_config_entry_device(
)


async def _async_update_listener(hass: HomeAssistant, entry: NutConfigEntry) -> None:
"""Handle options update."""
await hass.config_entries.async_reload(entry.entry_id)


def _manufacturer_from_status(status: dict[str, str]) -> str | None:
"""Find the best manufacturer value from the status."""
return (
Expand Down
7 changes: 6 additions & 1 deletion homeassistant/components/reolink/icons.json
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,12 @@
"default": "mdi:thermometer"
},
"battery_state": {
"default": "mdi:battery-charging"
"default": "mdi:battery-unknown",
"state": {
"discharging": "mdi:battery-minus-variant",
"charging": "mdi:battery-charging",
"chargecomplete": "mdi:battery-check"
}
},
"day_night_state": {
"default": "mdi:theme-light-dark"
Expand Down
8 changes: 0 additions & 8 deletions homeassistant/components/roborock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
async def async_setup_entry(hass: HomeAssistant, entry: RoborockConfigEntry) -> bool:
"""Set up roborock from a config entry."""

entry.async_on_unload(entry.add_update_listener(update_listener))

user_data = UserData.from_dict(entry.data[CONF_USER_DATA])
api_client = RoborockApiClient(
entry.data[CONF_USERNAME],
Expand Down Expand Up @@ -336,12 +334,6 @@ async def async_unload_entry(hass: HomeAssistant, entry: RoborockConfigEntry) ->
return await hass.config_entries.async_unload_platforms(entry, PLATFORMS)


async def update_listener(hass: HomeAssistant, entry: RoborockConfigEntry) -> None:
"""Handle options update."""
# Reload entry to update data
await hass.config_entries.async_reload(entry.entry_id)


async def async_remove_entry(hass: HomeAssistant, entry: RoborockConfigEntry) -> None:
"""Handle removal of an entry."""
await async_remove_map_storage(hass, entry.entry_id)
13 changes: 4 additions & 9 deletions homeassistant/components/roborock/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
SOURCE_REAUTH,
ConfigFlow,
ConfigFlowResult,
OptionsFlow,
OptionsFlowWithReload,
)
from homeassistant.const import CONF_USERNAME
from homeassistant.core import callback
Expand Down Expand Up @@ -124,14 +124,9 @@ async def async_step_code(
if self.source == SOURCE_REAUTH:
self._abort_if_unique_id_mismatch(reason="wrong_account")
reauth_entry = self._get_reauth_entry()
self.hass.config_entries.async_update_entry(
reauth_entry,
data={
**reauth_entry.data,
CONF_USER_DATA: user_data.as_dict(),
},
return self.async_update_reload_and_abort(
reauth_entry, data_updates={CONF_USER_DATA: user_data.as_dict()}
)
return self.async_abort(reason="reauth_successful")
self._abort_if_unique_id_configured(error="already_configured_account")
return self._create_entry(self._client, self._username, user_data)

Expand Down Expand Up @@ -202,7 +197,7 @@ def async_get_options_flow(
return RoborockOptionsFlowHandler(config_entry)


class RoborockOptionsFlowHandler(OptionsFlow):
class RoborockOptionsFlowHandler(OptionsFlowWithReload):
"""Handle an option flow for Roborock."""

def __init__(self, config_entry: RoborockConfigEntry) -> None:
Expand Down
8 changes: 0 additions & 8 deletions homeassistant/components/speedtestdotnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ async def _async_finish_startup(hass: HomeAssistant) -> None:
async_at_started(hass, _async_finish_startup)

await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
config_entry.async_on_unload(config_entry.add_update_listener(update_listener))

return True

Expand All @@ -52,10 +51,3 @@ async def async_unload_entry(
) -> bool:
"""Unload SpeedTest Entry from config_entry."""
return await hass.config_entries.async_unload_platforms(config_entry, PLATFORMS)


async def update_listener(
hass: HomeAssistant, config_entry: SpeedTestConfigEntry
) -> None:
"""Handle options update."""
await hass.config_entries.async_reload(config_entry.entry_id)
8 changes: 6 additions & 2 deletions homeassistant/components/speedtestdotnet/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

import voluptuous as vol

from homeassistant.config_entries import ConfigFlow, ConfigFlowResult, OptionsFlow
from homeassistant.config_entries import (
ConfigFlow,
ConfigFlowResult,
OptionsFlowWithReload,
)
from homeassistant.core import callback

from .const import (
Expand Down Expand Up @@ -45,7 +49,7 @@ async def async_step_user(
return self.async_create_entry(title=DEFAULT_NAME, data=user_input)


class SpeedTestOptionsFlowHandler(OptionsFlow):
class SpeedTestOptionsFlowHandler(OptionsFlowWithReload):
"""Handle SpeedTest options."""

def __init__(self) -> None:
Expand Down
5 changes: 5 additions & 0 deletions homeassistant/generated/integrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,11 @@
"config_flow": true,
"iot_class": "local_push"
},
"bauknecht": {
"name": "Bauknecht",
"integration_type": "virtual",
"supported_by": "whirlpool"
},
"bbox": {
"name": "Bbox",
"integration_type": "hub",
Expand Down
Loading