Fix: 'HomeAssistant' object has no attribute 'helpers' - HA 2025.5+ compatibility#55
Open
f-is-h wants to merge 1 commit into
Open
Fix: 'HomeAssistant' object has no attribute 'helpers' - HA 2025.5+ compatibility#55f-is-h wants to merge 1 commit into
f-is-h wants to merge 1 commit into
Conversation
…tibility - Replaced deprecated hass.helpers.discovery.load_platform with async_load_platform - Updated synchronous setup() function to async_setup() with proper async support - Modernized platform loading in light.py and switch.py with async_setup_platform() - Enhanced error handling with async exception handling throughout - Updated manifest.json with modern HA requirements and version bump to 0.3.0 - Maintains backward compatibility with earlier Home Assistant versions - All original functionality preserved Resolves Home Assistant 2025.5+ compatibility issue where hass.helpers attribute was removed. Fixes: HomeAssistant object has no attribute helpers Compatible with: Home Assistant 2025.5+ and earlier versions
|
LGTM! Tested on HA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔧 Fix for Home Assistant 2025.5+ Compatibility
This PR resolves the critical compatibility issue that prevents the integration from loading in Home Assistant 2025.5 and later versions.
🐛 Problem
Starting with Home Assistant 2025.5, the
hass.helpersattribute has been completely removed, causing this error:✅ Solution
This PR modernizes the integration to use current Home Assistant APIs:
hass.helpers.discovery.load_platform→hass.helpers.discovery.async_load_platformsetup()function →async_setup()with proper async supportasync_setup_platform()in light.py and switch.py🏠 Home Assistant Compatibility
📋 Changes Made
__init__.py: Complete rewrite with async support and modern platform loadinglight.py: Updated toasync_setup_platform()with improved error handlingswitch.py: Updated toasync_setup_platform()with improved error handlingmanifest.json: Version bump and metadata updates🧪 Tested On
📖 For Users Experiencing This Issue
If you need this fix immediately, you can use our updated repository:
🚀 Quick Install
cd /config/custom_components/ git clone https://github.com/f-is-h/hass_cozylife_local_pull.git📝 Configuration (same as before)
🔄 After Installation
Repository with fix: https://github.com/f-is-h/hass_cozylife_local_pull
Compatible with: Home Assistant 2025.5+ and earlier versions
Closes #54