Comments (12)
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.
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.
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"
It is showing right here but not when using state templates with like custom:button-card:
from home-connect-hass.
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.
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 StandbyBSH.Common.EnumType.PowerState.Standby
. - washing machine and dryer has also two states but On
BSH.Common.EnumType.PowerState.On
and "Totally off" (probablyBSH.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.
@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.
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?
from home-connect-hass.
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.
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.
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.
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.
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)
- Which breaking changes in 1.0.0? HOT 3
- Alarmclock HOT 1
- no way to complete the Oauth flow HOT 3
- Keeps waking up washer dryer HOT 5
- Feature request: Adding multiple accounts. HOT 7
- Dishwasher NEFF S157ZBX01D via App downloaded Programms unknown in Integration HOT 13
- Proces fase shows : LaundryCare.Common.EnumType.ProcessPhase.FillingDetergent HOT 5
- Option is not valid for select...... _programs HOT 1
- AutomationActionType and AutomationTriggerInfo are deprecated HOT 2
- Coffeemaker TQ907DF5 new Entities // Time remaining for Clean&Calc, cleaning, water filter HOT 5
- Inability to select Favorite program HOT 3
- Catch the alarm signal from 'BSH.Common.Setting.AlarmClock' HOT 6
- Microwave functions HOT 2
- Energy consumption dishwasher forecast HOT 1
- Update to 1.0.1 or 1.02 will stop this to work HOT 10
- EnumType in States HOT 1
- warming drawer wrong temperature HOT 2
- No entities for dishwasher - API call failed with code=409 conflict HOT 5
- Current programmeprogress everytime shows 0% with my Dryer HOT 1
- Cooktop power status undefined HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from home-connect-hass.