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
79 changes: 0 additions & 79 deletions homeassistant/components/dweet/__init__.py

This file was deleted.

10 changes: 0 additions & 10 deletions homeassistant/components/dweet/manifest.json

This file was deleted.

124 changes: 0 additions & 124 deletions homeassistant/components/dweet/sensor.py

This file was deleted.

2 changes: 1 addition & 1 deletion homeassistant/components/honeywell/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"documentation": "https://www.home-assistant.io/integrations/honeywell",
"iot_class": "cloud_polling",
"loggers": ["somecomfort"],
"requirements": ["AIOSomecomfort==0.0.32"]
"requirements": ["AIOSomecomfort==0.0.33"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/husqvarna_automower/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"iot_class": "cloud_push",
"loggers": ["aioautomower"],
"quality_scale": "silver",
"requirements": ["aioautomower==2025.6.0"]
"requirements": ["aioautomower==1.0.0"]
}
2 changes: 1 addition & 1 deletion homeassistant/components/thermopro/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"entity": {
"button": {
"set_datetime": {
"name": "Set Date&Time"
"name": "Set date & time"
}
}
}
Expand Down
68 changes: 22 additions & 46 deletions homeassistant/components/unifiprotect/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
from aiohttp.client_exceptions import ServerDisconnectedError
from uiprotect.api import DEVICE_UPDATE_INTERVAL
from uiprotect.data import Bootstrap
from uiprotect.data.types import FirmwareReleaseChannel
from uiprotect.exceptions import ClientError, NotAuthorized

# Import the test_util.anonymize module from the uiprotect package
# in __init__ to ensure it gets imported in the executor since the
# diagnostics module will not be imported in the executor.
from uiprotect.test_util.anonymize import anonymize_data # noqa: F401

from homeassistant.config_entries import ConfigEntry
from homeassistant.const import EVENT_HOMEASSISTANT_STOP
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
Expand Down Expand Up @@ -58,10 +58,6 @@

CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)

EARLY_ACCESS_URL = (
"https://www.home-assistant.io/integrations/unifiprotect#software-support"
)


async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the UniFi Protect."""
Expand Down Expand Up @@ -123,47 +119,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: UFPConfigEntry) -> bool:
hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, data_service.async_stop)
)

if not entry.options.get(CONF_ALLOW_EA, False) and (
await nvr_info.get_is_prerelease()
or nvr_info.release_channel != FirmwareReleaseChannel.RELEASE
):
ir.async_create_issue(
hass,
DOMAIN,
"ea_channel_warning",
is_fixable=True,
is_persistent=False,
learn_more_url=EARLY_ACCESS_URL,
severity=IssueSeverity.WARNING,
translation_key="ea_channel_warning",
translation_placeholders={"version": str(nvr_info.version)},
data={"entry_id": entry.entry_id},
)

try:
await _async_setup_entry(hass, entry, data_service, bootstrap)
except Exception as err:
if await nvr_info.get_is_prerelease():
# If they are running a pre-release, its quite common for setup
# to fail so we want to create a repair issue for them so its
# obvious what the problem is.
ir.async_create_issue(
hass,
DOMAIN,
f"ea_setup_failed_{nvr_info.version}",
is_fixable=False,
is_persistent=False,
learn_more_url="https://www.home-assistant.io/integrations/unifiprotect#about-unifi-early-access",
severity=IssueSeverity.ERROR,
translation_key="ea_setup_failed",
translation_placeholders={
"error": str(err),
"version": str(nvr_info.version),
},
)
ir.async_delete_issue(hass, DOMAIN, "ea_channel_warning")
_LOGGER.exception("Error setting up UniFi Protect integration")
raise
await _async_setup_entry(hass, entry, data_service, bootstrap)

return True

Expand Down Expand Up @@ -211,3 +167,23 @@ async def async_remove_config_entry_device(
if device.is_adopted_by_us and device.mac in unifi_macs:
return False
return True


async def async_migrate_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
"""Migrate entry."""
_LOGGER.debug("Migrating configuration from version %s", entry.version)

if entry.version > 1:
return False

if entry.version == 1:
options = dict(entry.options)
if CONF_ALLOW_EA in options:
options.pop(CONF_ALLOW_EA)
hass.config_entries.async_update_entry(
entry, unique_id=str(entry.unique_id), version=2, options=options
)

_LOGGER.debug("Migration to configuration version %s successful", entry.version)

return True
6 changes: 0 additions & 6 deletions homeassistant/components/unifiprotect/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

from .const import (
CONF_ALL_UPDATES,
CONF_ALLOW_EA,
CONF_DISABLE_RTSP,
CONF_MAX_MEDIA,
CONF_OVERRIDE_CHOST,
Expand Down Expand Up @@ -238,7 +237,6 @@ def _async_create_entry(self, title: str, data: dict[str, Any]) -> ConfigFlowRes
CONF_ALL_UPDATES: False,
CONF_OVERRIDE_CHOST: False,
CONF_MAX_MEDIA: DEFAULT_MAX_MEDIA,
CONF_ALLOW_EA: False,
},
)

Expand Down Expand Up @@ -408,10 +406,6 @@ async def async_step_init(
CONF_MAX_MEDIA, DEFAULT_MAX_MEDIA
),
): vol.All(vol.Coerce(int), vol.Range(min=100, max=10000)),
vol.Optional(
CONF_ALLOW_EA,
default=self.config_entry.options.get(CONF_ALLOW_EA, False),
): bool,
}
),
)
Loading
Loading