Skip to content

Add support for adding standalone chargers#250

Merged
sveinse merged 3 commits intocustom-components:masterfrom
sveinse:feature-fix-standalone
Jul 27, 2025
Merged

Add support for adding standalone chargers#250
sveinse merged 3 commits intocustom-components:masterfrom
sveinse:feature-fix-standalone

Conversation

@sveinse
Copy link
Collaborator

@sveinse sveinse commented Jul 27, 2025

  • This is needed when user doesn't have access to the installation

Fix #241

* This is needed when user doesn't have aceess to the installation
@sveinse sveinse added this to the v0.8 milestone Jul 27, 2025
Copy link
Contributor

@steinmn steinmn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minor suggestion to distinguish debug messages from the installation-associated charger messages

if charger_item["Id"] in installation_chargers:
continue # Skip the chargers which have already been found in installations
if charger_item["Id"] in self:
_LOGGER.debug(" Charger %s (existing)", charger_item["Id"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_LOGGER.debug(" Charger %s (existing)", charger_item["Id"])
_LOGGER.debug(" Standalone Charger %s (existing)", charger_item["Id"])

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both fixed. Thanks.

charger: Charger = self[charger_item["Id"]]
charger.set_attributes(charger_item)
else:
_LOGGER.debug(" Charger %s (adding)", charger_item["Id"])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_LOGGER.debug(" Charger %s (adding)", charger_item["Id"])
_LOGGER.debug(" Standalone Charger %s (adding)", charger_item["Id"])

@sveinse sveinse merged commit c84b053 into custom-components:master Jul 27, 2025
3 checks passed
@sveinse sveinse deleted the feature-fix-standalone branch July 27, 2025 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fails to add chargers when access denied to installation

2 participants