button-card
button-card copied to clipboard
Card Properties Open on Tap When using 'state'
Checklist
- [ *] I updated the card to the latest version available
- [ *] I cleared the cache of my browser
Describe the bug
If there is no state defined in the card's definition, tap_action works correclty, i.e. it executes the action, but it does NOT open the entity's property page. When I use the state parameter, instead of executing the tap_action it opens the entity's property page.
Version of the card Version: 3.4.2
To Reproduce This is the configuration I used:
- type: 'custom:button-card'
entity: media_player.denon_avr_s660h
size: 25px
name: power
show_name: false
show_state: false
color_type: card
color: 'rgb(45, 79, 140)'
state:
- value: 'off'
icon: 'mdi:power-off'
tap_action:
action: call-service
service: denonavr.get_command
service_data:
entity_id: media_player.denon_avr_S660H
command: /goform/formiPhoneAppDirect.xml?PWON
- operator: default
icon: 'mdi:power'
tap_action:
action: call-service
service: denonavr.get_command
service_data:
entity_id: media_player.denon_avr_S660H
command: /goform/formiPhoneAppDirect.xml?PWSTANDBY
Screenshots If applicable, add screenshots to help explain your problem.
Expected behavior
When clicking/tapping on the button, it should execute tap_action regardless if it has state defined.
Desktop (please complete the following information):
- Browser [e.g. chrome, safari] Brave
- Version [e.g. 22] v1.46.144
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context