Hello everyone,
I´m trying to do one button card that when i push him change of color and call a service (climate service) i havent able to do it.
So far i ve achieved to do 2 separate button card one of them change of color with toggle, and on the other side one button card call a service, but i havent able to do a mix of them.
i have this code of change color button:
- type: custom:button-card
icon: mdi:lightbulb
entity: input_boolean.test1
name: Test
aspect_ratio: 1/1
styles:
card:
- border-radius: 20%
- box-shadow: 0px 0px 10px 1px
icon:
- margin-top: ‘-5%’
style:
top: 95%
left: 85%
width: 3%
tap_action:
action: toggle
state:- value: ‘on’
styles:
card:
- box-shadow: 0px 0px 10px 5px orange
icon:
- color: orange
name:
- color: orange - value: ‘off’
styles:
label:
- color: rgba(0, 0, 0.0)
- value: ‘on’
and here the button call service:
- type: custom:button-card
icon: mdi:radiator
name: ‘ON’
aspect_ratio: 1/1
styles:
card:
- border-radius: 20%
- box-shadow: 0px 0px 10px 1px
icon:
- margin-top: ‘-5%’
style:
top: 95%
left: 55%
width: 3%
tap_action:
action: call-service
service: climate.turn_on
service_data:
entity_id:
- climate.calefaccion_bano
- climate.calefaccion_central
- climate.calefaccion_cuadrada
- climate.calefaccion_rectangular
- climate.calefaccion_comedor
- climate.calefaccion_cocina
anyone can help me.
thanksss