diff --git a/custom_components/hive/__init__.py b/custom_components/hive/__init__.py index 5c2527a..83ec9ef 100755 --- a/custom_components/hive/__init__.py +++ b/custom_components/hive/__init__.py @@ -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.""" diff --git a/custom_components/hive/manifest.json b/custom_components/hive/manifest.json index ac3c013..c1c317c 100755 --- a/custom_components/hive/manifest.json +++ b/custom_components/hive/manifest.json @@ -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" }