Skip to content
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

Add basic controls to HADiscovery #97

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

saveriol
Copy link
Contributor

@saveriol saveriol commented Sep 26, 2024

Hello!
With this PR I added two basic controls to HADiscovery.py:

  • PowerState: this is now a switch, to turn on and off the device.
  • Program: these are now buttons, to start programs.

Of course this is an experiment but it should work.

P.s.: devices.json needs to be regenerated or manually edited to change:

 "539": {
                "name": "BSH.Common.Setting.PowerState",
        ...
                "discovery": {
                    "component_type": "binary_sensor",
                    "payload_values": {
                        "device_class": "power"
                    }
                }
            },

to

 "539": {
                "name": "BSH.Common.Setting.PowerState",
        ...
                "discovery": {
                    "component_type": "switch"
                }
            },

Sample image for clothes washer

Immagine 2024-09-26 164158

@saveriol saveriol marked this pull request as draft September 26, 2024 14:57
@saveriol saveriol marked this pull request as ready for review September 26, 2024 15:00
@saveriol saveriol marked this pull request as draft October 10, 2024 14:31
@saveriol
Copy link
Contributor Author

Marked as draft as I want to have a better look into availability for these new controls.

@JxxIT
Copy link

JxxIT commented Oct 10, 2024

Great, thanks for this! I have a dishwasher that has a lot of entities, I'll look at my other entities later and maybe make a PR.

image

saveriol and others added 2 commits October 14, 2024 18:26
If it's a Program, check if BSH.Common.Status.OperationState has "Ready" as available option. If not, programs are read only.
"component_type": "binary_sensor",
"payload_values": {"device_class": "power"},
},
539: {"component_type": "switch"}, # BSH.Common.Setting.PowerState
Copy link
Collaborator

Choose a reason for hiding this comment

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

See #103 PowerState should be an enum with On/Off/Standby

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.

4 participants