I have an entity with two states Enabled and Disabled. I want to create a button that would toggle the selected state. I am new to HA and the solution seems to elude me.
I created a button card and it shows me the entity and it’s state. But if I select Toggle under Tap Action, I get a warning “Service select.turn_off not found.” If I set it to default More Info, and click the icon, I can then change the value.
You need to use the Call Service
option, not Toggle
.
Then for the service use select.select_next
. In the code editor it should look something like:
show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: select.select_next
target:
entity_id: select.example
data:
cycle: true
entity: select.example
1 Like
Thank you, I tried select.select_option and couldn’t get that to work. select:select_next works perfectly.