Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 5dd3c86

Browse files
authored
Add notification to point to core integration (#107)
1 parent 3ea9562 commit 5dd3c86

File tree

4 files changed

+29
-5
lines changed

4 files changed

+29
-5
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ As of Home Assistant 2025.1, there is now an [Ohme integration](https://www.home
44

55
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.
66

7-
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.
7+
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.
88

99
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.
1010

11+
### Migrating
12+
To migrate from the custom component to the core integration:
13+
1. Ensure you are running an up to date version of Home Assistant
14+
2. Delete your Ohme account from the Home Assistant Devices & services page
15+
3. Uninstall the custom component. If you installed through HACS, you can do this through the UI
16+
4. Restart Home Assistant
17+
5. Configure the core Ohme integration
18+
1119
<br></br>
1220

1321
# Ohme EV Charger for Home Assistant

custom_components/ohme/__init__.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .api_client import OhmeApiClient
77
from .coordinator import OhmeChargeSessionsCoordinator, OhmeAccountInfoCoordinator, OhmeAdvancedSettingsCoordinator, OhmeChargeSchedulesCoordinator
88
from homeassistant.exceptions import ConfigEntryNotReady
9+
from homeassistant.helpers.issue_registry import async_create_issue
910

1011
_LOGGER = logging.getLogger(__name__)
1112

@@ -93,8 +94,18 @@ def _update_unique_id(entry: RegistryEntry) -> dict[str, str] | None:
9394
# Setup entities
9495
await hass.config_entries.async_forward_entry_setups(entry, ENTITY_TYPES)
9596

96-
entry.async_on_unload(entry.add_update_listener(async_update_listener))
97-
97+
# Add Core integration message
98+
async_create_issue(
99+
hass,
100+
DOMAIN,
101+
"ohme_core_integration",
102+
is_fixable=False,
103+
severity="warning",
104+
translation_key="ohme_core_integration",
105+
is_persistent=True,
106+
learn_more_url="https://github.com/dan-r/HomeAssistant-ohme?tab=readme-ov-file#important-note"
107+
)
108+
98109
return True
99110

100111

custom_components/ohme/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Component constants"""
22
DOMAIN = "ohme"
33
USER_AGENT = "dan-r-homeassistant-ohme"
4-
INTEGRATION_VERSION = "1.1.0"
4+
INTEGRATION_VERSION = "1.1.1"
55
CONFIG_VERSION = 1
66
ENTITY_TYPES = ["sensor", "binary_sensor", "switch", "button", "number", "time"]
77

custom_components/ohme/translations/en.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,12 @@
4242
},
4343
"abort": {}
4444
},
45-
"issues": {},
45+
"issues": {
46+
"ohme_core_integration": {
47+
"title": "Ohme integration available in Home Assistant Core",
48+
"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."
49+
}
50+
},
4651
"entity": {
4752
"binary_sensor": {
4853
"car_connected": {

0 commit comments

Comments
 (0)