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

[Feature]: More responsive custom:mushroom-entity-card #1424

Open
2 tasks done
bilogic opened this issue May 10, 2024 · 5 comments
Open
2 tasks done

[Feature]: More responsive custom:mushroom-entity-card #1424

bilogic opened this issue May 10, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@bilogic
Copy link

bilogic commented May 10, 2024

Requirements

  • I have updated Mushroom to the latest available version
  • I did a search to see if there is a similar issue or if a pull request is open.

Is your feature request related to a problem?

After tapping on the card once for some of my entities, the UI takes a while to react that I think something is wrong (a while = over 1 second)

The reason this happens is because I scripted some switches over MQTT, e.g. turning off wifi, blocking ads etc, and these do require the scripts to complete running.

For HA's native on/off switch, what I observe is they change state immediately upon being clicked and only to revert back to original state if the script fails, this in my view is a better behavior

Describe the solution you'd like

Follow HA's native switch implementation and toggle the UI immediately, and if the action fails, the entity state changes back again shortly because of feedback from the sensor

Describe alternatives you've considered

n/a

Additional context

No response

@bilogic bilogic added the enhancement New feature or request label May 10, 2024
@piitaya
Copy link
Owner

piitaya commented May 11, 2024

Do you have something set to hold_action? Try to set it to none and see if it's better.

@bilogic
Copy link
Author

bilogic commented May 11, 2024

I don't think so, this is all

      - type: custom:mushroom-entity-card
        name: Ads
        entity: switch.router_ads
        tap_action:
          action: toggle

and I modified my OP, "... because of feedback from the sensor"

@piitaya
Copy link
Owner

piitaya commented May 11, 2024

Mushroom actions are Home Assistant built-in actions so it's strange that you have this only with Mushroom cards.

  1. Do you have the same issue with other entity using mushroom card?
  2. Do you have the same issue with same entity using tile card?

@bilogic
Copy link
Author

bilogic commented May 11, 2024

vid.mp4
  1. No issue if I use Mushroom card with MQTT lights
  2. I have not tried the tile card

@bilogic
Copy link
Author

bilogic commented May 11, 2024

vid.mp4

Same problem with tile, but since there is a clicked animation, it is more intuitive and does not lead to the "something wrong" concern

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants