Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notification to point to core integration #107

Merged
merged 4 commits into from
Jan 25, 2025
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
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

<br></br>

# Ohme EV Charger for Home Assistant
Expand Down
15 changes: 13 additions & 2 deletions custom_components/ohme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion custom_components/ohme/const.py
Original file line number Diff line number Diff line change
@@ -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"]

Expand Down
7 changes: 6 additions & 1 deletion custom_components/ohme/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down