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
25 changes: 24 additions & 1 deletion custom_components/hive/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,39 @@
from homeassistant.const import CONF_SCAN_INTERVAL
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
from homeassistant.helpers import aiohttp_client, device_registry as dr
from homeassistant.helpers import (
aiohttp_client,
config_validation as cv,
device_registry as dr,
)
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.typing import ConfigType

from .const import DOMAIN, PLATFORM_LOOKUP, PLATFORMS
from .entity import HiveEntity

try:
# Home Assistant 2026.11 moved the boost_* entity services out of the
# climate / water_heater platforms (which this component re-exports) into
# hive/services.py, registered from core's async_setup. This component
# replaces the hive domain, so core's async_setup never runs: call it here.
from homeassistant.components.hive.services import async_setup_services
except ImportError: # Home Assistant < 2026.11: the platforms register them.
async_setup_services = None

_LOGGER = logging.getLogger(__name__)

type HiveConfigEntry = ConfigEntry[Hive]

CONFIG_SCHEMA = cv.config_entry_only_config_schema(DOMAIN)


async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the Hive integration."""
if async_setup_services is not None:
async_setup_services(hass)
return True


async def async_setup_entry(hass: HomeAssistant, entry: HiveConfigEntry) -> bool:
"""Set up Hive from a config entry."""
Expand Down Expand Up @@ -89,7 +112,7 @@
return True


def refresh_system[_HiveEntityT: HiveEntity, **_P](

Check failure on line 115 in custom_components/hive/__init__.py

View workflow job for this annotation

GitHub Actions / Lint

ruff (UP049)

custom_components/hive/__init__.py:115:48: UP049 Generic function uses private type parameters help: Rename type parameter to remove leading underscores

Check failure on line 115 in custom_components/hive/__init__.py

View workflow job for this annotation

GitHub Actions / Lint

ruff (UP049)

custom_components/hive/__init__.py:115:20: UP049 Generic function uses private type parameters help: Rename type parameter to remove leading underscores
func: Callable[Concatenate[_HiveEntityT, _P], Awaitable[Any]],
) -> Callable[Concatenate[_HiveEntityT, _P], Coroutine[Any, Any, None]]:
"""Force update all entities after state change."""
Expand Down
2 changes: 1 addition & 1 deletion custom_components/hive/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"issue_tracker": "https://github.com/Pyhass/Hive-Custom-Component/issues",
"loggers": ["apyhiveapi"],
"requirements": ["pyhive-integration==1.0.10"],
"version": "2026.10.1b2"
"version": "2026.11.0"
}
Loading