I am needing some help so I have these smart buttons that I am wanting to use as panic buttons. I have made a custom button card for the states of the smart button to come to. The part I am struggling with is the acknowledgement of the state. So when the button has been triggered and the state has come through I want to be able to click the custom button in the dashboard. To acknowledge the state and stop the custom card from flashing.
here is what i have done so far for the custom button.
type: custom:button-card
entity: sensor.192_168_0_88_smart_button_button
name: Panic Button
show_state: false
tap_action:
action: call-service
service: input_boolean.turn_on
service_data:
entity_id: input_boolean.security_alert_helper
state_display: |
[[[
return entity.state;
]]]
state:
- operator: template
value: |
[[[
return states['input_boolean.security_alert_helper'].state === 'on';
]]]
icon: mdi:security
name: null
styles:
card:
- background-color: black
- filter: opacity(70%)
- height: 200px
- animation: none
icon:
- color: white
- value: Short Press
icon: mdi:security
name: Security Needed
styles:
card:
- background-color: red
- filter: opacity(80%)
- height: 200px
- animation: blink 2s ease infinite
icon:
- color: white
name:
- color: white
- value: Long Press
icon: mdi:security
name: Security Needed
styles:
card:
- background-color: red
- filter: opacity(80%)
- height: 200px
- animation: blink 2s ease infinite
icon:
- color: white
name:
- color: white
- value: Double Press
icon: mdi:security
name: Security Needed
styles:
card:
- background-color: red
- filter: opacity(80%)
- height: 200px
- animation: blink 2s ease infinite
icon:
- color: white
name:
- color: white
this is what blinks when the sensor button is pressed
and when I click the custom button when its in the above state this is how it looks
I have created a helper boolean toggle switch and a automation.
I am not sure where I am going wrong.