Giter VIP home page Giter VIP logo

Comments (12)

GHeiner avatar GHeiner commented on August 17, 2024

Hi I support this request. I use for everything custom-buttons an d I'm using the layout from matt8707. So using a select is not handy.

from home-connect-hass.

ekutner avatar ekutner commented on August 17, 2024

As a general rule the UI control to use is automatically detected based on the type of the entity in the HC API. A switch control is used for boolean entities, however the power state entity is not boolean (and in fact it has other states than on/off). All that said I think it does make sense to show a switch for appliances where the entity has exactly two states which happen to be on/off, so I've make that change and you can try it out with beta version 0.5.0-b8.
Note that this wasn't a trivial change so let me know how it works.

from home-connect-hass.

labaland avatar labaland commented on August 17, 2024

As a general rule the UI control to use is automatically detected based on the type of the entity in the HC API. A switch control is used for boolean entities, however the power state entity is not boolean (and in fact it has other states than on/off). All that said I think it does make sense to show a switch for appliances where the entity has exactly two states which happen to be on/off, so I've make that change and you can try it out with beta version 0.5.0-b8. Note that this wasn't a trivial change so let me know how it works.

Sweet!

And one more request:
is it possible for u or us? to change the state from "Dishcare.Dishwasher.Program.MachineCare" to "MachineCare" or / "Machine Care"

image

It is showing right here but not when using state templates with like custom:button-card:

image

from home-connect-hass.

ekutner avatar ekutner commented on August 17, 2024

Enum values in history can't be translated, if you're seeing them in current values then please submit a PR with updates to the translation files. See #26 for more info.

from home-connect-hass.

pswid avatar pswid commented on August 17, 2024

It works for some of the devices, but not all:

  • coffee machine also has two power states but instead On and Off it has On BSH.Common.EnumType.PowerState.On and Standby BSH.Common.EnumType.PowerState.Standby.
  • washing machine and dryer has also two states but On BSH.Common.EnumType.PowerState.On and "Totally off" (probably BSH.Common.EnumType.PowerState.MainsOff). Unfortunately if you remotely trigger state "totally off" washing machine or dryer powers off totally (so also disconnects from the cloud) and you can power it on again only locally. So maybe instead of on/off switch the better option would be just off button?

from home-connect-hass.

ekutner avatar ekutner commented on August 17, 2024

@pswid I'm not sure what you mean. From what I understand from your description everything seems to be working fine.

from home-connect-hass.

pswid avatar pswid commented on August 17, 2024

It does, but for the devices mentioned above, PowerStatus, although only two values are possible, is still displayed as select and not switch. Standby (and MainsOff?) should be equivalent to Off. Don't you think?

image

from home-connect-hass.

pswid avatar pswid commented on August 17, 2024

I also noticed that for ovens integration shows PowerStatus as select with 4 options (on, off, mainsoff and standby) while only two of them are working (on and standby). The other two (off and mainsoff) cause 409 error.

I don't know why the HC API reports four available PowerState options for ovens, while the documentation https://api-docs.home-connect.com/settings#power-state mentions only about two of them (it's probably an API bug). So in the case of ovens, you could also make a switch (on and standby values) instead of select with options that are not working...

from home-connect-hass.

ekutner avatar ekutner commented on August 17, 2024

The integration doesn't know anything about specific appliances or entities, everything is detected and generated on the fly and that is not going to change. If the API returns values other than On and Off then the control will be a select, that too is now a general handling of all entities and is not going to change. I can say that in many cases the documentation doesn't match the actual behavior so I'm not sure which one is wrong but assuming it's the API that HC will have to fix it on their side.

from home-connect-hass.

GHeiner avatar GHeiner commented on August 17, 2024

Hi i tested the new power switch with my dishwasher and it worked excellent. I only have a Bosch Bosch dishwasher so I couldn't test more.

But fif you want me to test something please let me know.

from home-connect-hass.

pswid avatar pswid commented on August 17, 2024

I can understand you don't want to make workarounds of the HC API errors (e.g. for four oven power states available although only two are working). However, why not to replace select by switch toggling between on and standby for devices that support only that two power states?

from home-connect-hass.

ekutner avatar ekutner commented on August 17, 2024

There is nothing special about the power setting either. I added generic handling of enums that only have On/Off values but I don't want to second guess what the other values do.

from home-connect-hass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.