Hello !
I’m quite confuse. I’m trying to use the button badge in the Heading card. but I have trouble performing an action :
Here is my code for the heading
type: heading
icon: mdi:sofa
heading_style: title
badges:
- type: button
icon: hue:scene-nightlight
color: deep-purple
tap_action:
action: perform-action
perform_action: cover.set_cover_position
target:
area_id: salon
data:
position: "{{ states('input_number.ui_covers_night_position') | int }}"
When I press the button, I get the following error
Failed to perform the action cover/set_cover_position. expected int for dictionary value @ data['position']
But when I go to Developer Tools > Action to do :
action: cover.set_cover_position
target:
area_id: salon
data:
position: "{{ states('input_number.ui_covers_night_position') | int }}"
It work like a charm !
what’s the difference between perform-action and action ?
What can I do to make my button work ?