diff --git a/README.md b/README.md index 7f0f6b1..9b13390 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,18 @@ As of Home Assistant 2025.1, there is now an [Ohme integration](https://www.home The core version of the integration is effectively a ground-up rewrite to follow all the Home Assistant conventions and generally try to maintain a better quality user experience. Because of the amount of work this involves, there is currently a feature gap between custom and core versions, but I'm working to shrink this and am contributing new features to the core gradually. Some things are done differently in the core version (such as different sensor names and having a few of the binary sensors collapsed into an enum sensor), so moving to it may be disruptive if you have working automations. -For the core version of the integration, please raise any issues and pull requests in the [Home Assistant Core](https://github.com/home-assistant/core) repository. The API library is seperate from Home Assistant and can be found in the [ohmepy](https://github.com/dan-r/ohmepy) repository. +For the core version of the integration, please raise any issues and pull requests in the [Home Assistant Core](https://github.com/home-assistant/core) repository. The API library is separate from Home Assistant and can be found in the [ohmepy](https://github.com/dan-r/ohmepy) repository. Thank you to the community that has formed around this integration, and I hope you can appreciate this important and necessary evolution of the integration. +### Migrating +To migrate from the custom component to the core integration: +1. Ensure you are running an up to date version of Home Assistant +2. Delete your Ohme account from the Home Assistant Devices & services page +3. Uninstall the custom component. If you installed through HACS, you can do this through the UI +4. Restart Home Assistant +5. Configure the core Ohme integration +

# Ohme EV Charger for Home Assistant diff --git a/custom_components/ohme/__init__.py b/custom_components/ohme/__init__.py index 38e2867..e6dabc7 100644 --- a/custom_components/ohme/__init__.py +++ b/custom_components/ohme/__init__.py @@ -6,6 +6,7 @@ from .api_client import OhmeApiClient from .coordinator import OhmeChargeSessionsCoordinator, OhmeAccountInfoCoordinator, OhmeAdvancedSettingsCoordinator, OhmeChargeSchedulesCoordinator from homeassistant.exceptions import ConfigEntryNotReady +from homeassistant.helpers.issue_registry import async_create_issue _LOGGER = logging.getLogger(__name__) @@ -93,8 +94,18 @@ def _update_unique_id(entry: RegistryEntry) -> dict[str, str] | None: # Setup entities await hass.config_entries.async_forward_entry_setups(entry, ENTITY_TYPES) - entry.async_on_unload(entry.add_update_listener(async_update_listener)) - + # Add Core integration message + async_create_issue( + hass, + DOMAIN, + "ohme_core_integration", + is_fixable=False, + severity="warning", + translation_key="ohme_core_integration", + is_persistent=True, + learn_more_url="https://github.com/dan-r/HomeAssistant-ohme?tab=readme-ov-file#important-note" + ) + return True diff --git a/custom_components/ohme/const.py b/custom_components/ohme/const.py index 6667ae3..3db4dea 100644 --- a/custom_components/ohme/const.py +++ b/custom_components/ohme/const.py @@ -1,7 +1,7 @@ """Component constants""" DOMAIN = "ohme" USER_AGENT = "dan-r-homeassistant-ohme" -INTEGRATION_VERSION = "1.1.0" +INTEGRATION_VERSION = "1.1.1" CONFIG_VERSION = 1 ENTITY_TYPES = ["sensor", "binary_sensor", "switch", "button", "number", "time"] diff --git a/custom_components/ohme/translations/en.json b/custom_components/ohme/translations/en.json index 2da6fea..663cd3c 100644 --- a/custom_components/ohme/translations/en.json +++ b/custom_components/ohme/translations/en.json @@ -42,7 +42,12 @@ }, "abort": {} }, - "issues": {}, + "issues": { + "ohme_core_integration": { + "title": "Ohme integration available in Home Assistant Core", + "description": "The Ohme integration is now available in Home Assistant Core from 2025.1.0 onwards. Click Learn More to find more about the changes and how to migrate." + } + }, "entity": { "binary_sensor": { "car_connected": {