Add support for adding standalone chargers#250
Merged
sveinse merged 3 commits intocustom-components:masterfrom Jul 27, 2025
Merged
Add support for adding standalone chargers#250sveinse merged 3 commits intocustom-components:masterfrom
sveinse merged 3 commits intocustom-components:masterfrom
Conversation
* This is needed when user doesn't have aceess to the installation
steinmn
approved these changes
Jul 27, 2025
Contributor
steinmn
left a comment
There was a problem hiding this comment.
LGTM, minor suggestion to distinguish debug messages from the installation-associated charger messages
custom_components/zaptec/api.py
Outdated
| 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"]) |
Contributor
There was a problem hiding this comment.
Suggested change
| _LOGGER.debug(" Charger %s (existing)", charger_item["Id"]) | |
| _LOGGER.debug(" Standalone Charger %s (existing)", charger_item["Id"]) |
Collaborator
Author
There was a problem hiding this comment.
Both fixed. Thanks.
custom_components/zaptec/api.py
Outdated
| charger: Charger = self[charger_item["Id"]] | ||
| charger.set_attributes(charger_item) | ||
| else: | ||
| _LOGGER.debug(" Charger %s (adding)", charger_item["Id"]) |
Contributor
There was a problem hiding this comment.
Suggested change
| _LOGGER.debug(" Charger %s (adding)", charger_item["Id"]) | |
| _LOGGER.debug(" Standalone Charger %s (adding)", charger_item["Id"]) |
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 #241