home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
3.8k stars 2.6k forks source link

Valve with variable position cannot be controlled directly from Dashboard in entities card #20927

Open tim-geier opened 1 month ago

tim-geier commented 1 month ago

Checklist

Describe the issue you are experiencing

With the current entities card it is sometimes impossible to move a valve in the desired direction. If the valve is partly opened the switch on the frontend is active and the only possible action is to deactivate the switch and close the valve. But moving the valve more to the open direction is currently impossible. Without fully closing the valve first or opening the entity popup.

Describe the behavior you expected

What I would like are separate buttons for open/close/stop directly on the entities card, but only if the valve supports it. For a valve without position control or without stop function the current on/off switch is fine. I would imagine something like this: grafik

It seems like this was already implemented in src/components/ha-valve-controls.ts but got removed with #19342. Unfortunately there is no explanation in the PR why the valve buttons were removed.

Steps to reproduce the issue

  1. Add any valve with position control to a card with type: entities
  2. Move valve to any position except fully opened or fully closed grafik
  3. Try to move to a more open position

What version of Home Assistant Core has the issue?

2024.5.5

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Firefox 126.0.1

Which operating system are you using to run this browser?

Win 10 22H2

State of relevant entities

entity: valve.esp_wp_esszimmer_abluft
state: open
current_position: 47
friendly_name: esp-wp Esszimmer Abluft
supported_features: 15

Problem-relevant frontend configuration

type: entities
entities:
  - entity: valve.esp_wp_esszimmer_abluft
    secondary_info: position
    name: Esszimmer Abluft

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

piitaya commented 1 month ago

I don't have a real valve so I can not test the real behavior. If your valve is open to 47%, you close it (it must be 0%, right). What happens if you reopen it? Will it be fully open (100%) or partially open (47%)? The main reason we changed to a switch is to easily see the state the entity by looking at the switch position because of the device page, there is no colored icon and no secondary info : CleanShot 2024-06-03 at 15 51 21