Fixup service/actions and deprecate old#237
Merged
sveinse merged 2 commits intocustom-components:masterfrom Jul 24, 2025
Merged
Fixup service/actions and deprecate old#237sveinse merged 2 commits intocustom-components:masterfrom
sveinse merged 2 commits intocustom-components:masterfrom
Conversation
* Fixup sevice/action calls which didn't work * Mark commands which have button entities as deprecated
steinmn
reviewed
Jul 24, 2025
custom_components/zaptec/services.py
Outdated
| _LOGGER.debug("Called stop charging") | ||
| _LOGGER.warning( | ||
| "The 'stop_charging' action is deprecated and will be removed in a future release. " | ||
| "Use the 'stop_charging' botton entity instead" |
Contributor
There was a problem hiding this comment.
misspelled 'button', and all the case for the button names in the warnings should be consistent
Suggested change
| "Use the 'stop_charging' botton entity instead" | |
| "Use the 'Stop charging' button entity instead" |
custom_components/zaptec/services.py
Outdated
| _LOGGER.debug("Called resume charging") | ||
| _LOGGER.warning( | ||
| "The 'resume_charging' action is deprecated and will be removed in a future release. " | ||
| "Use the 'Resume Charging' button entity instead" |
Contributor
There was a problem hiding this comment.
Suggested change
| "Use the 'Resume Charging' button entity instead" | |
| "Use the 'Resume charging' button entity instead" |
| await coordinator.trigger_poll() | ||
|
|
||
| async def service_handle_send_command(service_call: ServiceCall) -> None: | ||
| _LOGGER.debug("Called send command") |
Contributor
There was a problem hiding this comment.
Should we include an is_command_valid-check on this?̃
Contributor
There was a problem hiding this comment.
🤦 Sorry, just realized we built that into the command-function, nevermind
Collaborator
Author
There was a problem hiding this comment.
Yeah I was looking at that iter_objects() function yesterday and was going WTF. It definitely can be made simpler. Its hard to understand as it it, but at this point I don't want to open that box of worms. Goal now is to get v0.8 out.
Collaborator
Author
|
Everything should be fixed now. |
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.
Fixes #229