-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
Support for Matter EVSE (button entities version) #133662
Closed
Closed
Changes from 58 commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
23eea49
EnergyEvse.Attributes.MinimumChargeCurrent
lboue 6988103
EnergyEvse.Attributes.MaximumChargeCurrent
lboue 493d486
EnergyEvse.Attributes.UserMaximumChargeCurrent
lboue e367ff6
EnergyEvse.Enums.StateEnum
lboue 0ecdeb0
Update sensor.py
lboue 297e6e6
EnergyEvse.Attributes.CircuitCapacity
lboue 8780ed9
ruff-format
lboue 43ab4e3
ruff-format
lboue 5c782a1
EnergyEvse.Attributes.SupplyState
lboue ad881d2
EnergyEvse.Enums.SupplyStateEnum
lboue d440e13
EnergyEvse.Commands.EnableCharging
lboue f5c5a82
EnergyEvse.Commands.Disable
lboue afee080
Create evse_charging.json
lboue 80a20da
EnergyEvse.Enums.FaultStateEnum
lboue d03959a
EnergyEvse.Attributes.FaultState
lboue 8c409fe
ruff-format
lboue f1eaa06
EnergyEvse.Enums.SupplyStateEnum.kEnabled Only with Matter 1.4
lboue b91fb0c
Custom class for requests with `timed_request_timeout_ms`
lboue 8e78a21
Generic `MatterCommandButton` class
lboue 8027a8e
Update icons.json
lboue 5525f00
Update strings.json
lboue ba9a4f5
Update icons.json
lboue d39bc5e
Update strings.json
lboue bf7cdd8
Update strings.json
lboue cd1afcf
Test evse sensor
lboue 90b0118
Update test_sensor.py
lboue cf0d433
Update test_sensor.py
lboue 113bcc7
Update evse_charging.json
lboue bd87769
Update test_sensor.py
lboue 7cc6765
Update evse_charging.json
lboue aebaa3e
Update sensor.py
lboue 2fdbba9
Update test_sensor.py
lboue 26e9363
Update strings.json
lboue 5128238
EnergyEvse.Attributes.State
lboue 03933cd
EnergyEvse.Attributes.SupplyState
lboue 7b3905e
EnergyEvse.Attributes.FaultState
lboue 1108486
Update sensor.py
lboue c379aea
EnergyEvse.Attributes.CircuitCapacity
lboue c118b1f
EnergyEvse.Attributes.MinimumChargeCurrent
lboue 45f0f40
EnergyEvse.Attributes.MaximumChargeCurrent
lboue 4f3dc0a
EnergyEvse.Attributes.UserMaximumChargeCurrent
lboue 257c12e
Buttons
lboue c579194
Icons
lboue f6a7cf8
Strings
lboue 21fcad3
Update test_sensor.py
lboue 670803b
Merge branch 'EnergyEvse' into Matter_EVSE
lboue 8b14c41
Merge branch 'dev' into Matter_EVSE
lboue a8179b2
Update sensor.py
lboue 96f55c4
Translate maps into camelcase strings
lboue 8b0e93b
Add states strings for EVSE maps
lboue 6a9f74d
Update tests for state maps
lboue 822994e
Merge branch 'Matter_EVSE' of https://github.com/lboue/ha_core into M…
lboue a6e7734
Fix tests
lboue 71e4110
Add the evse_charging fixture to the list of fixtures
lboue 9e7a6db
Merge branch 'dev' into Matter_EVSE
lboue 8260389
Update icons.json
lboue f00a1cf
Update snapshots for EVSE
lboue f1ba30e
EnableCharging has arguments
lboue 0555296
Merge branch 'dev' into Matter_EVSE
lboue b4a213b
Test EVSE buttons
lboue 6fcbf0f
Test EnableCharging command
lboue e6147c6
Resolv conflicts
lboue 8b3244e
Merge branch 'dev' into Matter_EVSE
lboue 5e4e9a3
Update snapshots
lboue File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So one question arose here for me is: Do we have a state for this? Because if we do, wouldn't this be a switch?
Note: I am not up to date on any matter specs, so you might know more here, but please enlighten me :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there is a State attribute in the specs: 24-27350-005_Matter-1.4-Application-Cluster-Specification.pdf page 661
It's implemented here:
core/homeassistant/components/matter/sensor.py
Lines 74 to 82 in f1ba30e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure exposing this as a switch will be the best way of doing this.
clusters.EnergyEvse.Attributes.SupplyState
is an enum attribute. So we would have to:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Matter switch platform recently got a new variant to base the switch on enum/int values so we have some plumbing present to do this. Also the state is mandatory so there always be a state present. Worst case you can set it None which will be handled by HA (and just show both options).
I would also keep the enum string sensor with the more detailed state.
So yeah I agree with Joost here that the 2 buttons to enable/disable charging should be a single switch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we need to define a new EntityDescription capable of receiving Matter on and off commands and their arguments as arguments. Like this: