I’m trying to use input_boolean
UI is ready… now I need to understand how to format the action accordingly
- cards:
- color: 'rgb(255, 0, 0)'
entity: input_boolean.deebot_cucina
icon: 'mdi:toaster-oven'
state:
- color: 'rgb(100, 100, 100)'
value: 'off'
styles:
card:
- font-size: 12px
- background-color: black
- color: white
type: 'custom:button-card'
- color: 'rgb(255, 0, 0)'
entity: input_boolean.deebot_sala
icon: 'mdi:sofa'
state:
- color: 'rgb(100, 100, 100)'
value: 'off'
styles:
card:
- font-size: 12px
- background-color: black
- color: white
type: 'custom:button-card'
- color: 'rgb(255, 0, 0)'
entity: input_boolean.deebot_camera
icon: 'mdi:bed-king'
state:
- color: 'rgb(100, 100, 100)'
value: 'off'
styles:
card:
- font-size: 12px
- background-color: black
- color: white
type: 'custom:button-card'
- color: 'rgb(255, 0, 0)'
entity: input_boolean.deebot_bagno_grande
icon: 'mdi:shower'
state:
- color: 'rgb(100, 100, 100)'
value: 'off'
styles:
card:
- font-size: 12px
- background-color: black
- color: white
type: 'custom:button-card'
type: horizontal-stack
- cards:
- color: 'rgb(255, 0, 0)'
entity: input_boolean.deebot_bagno_piccolo
icon: 'mdi:shower-head'
state:
- color: 'rgb(100, 100, 100)'
value: 'off'
styles:
card:
- font-size: 12px
- background-color: black
- color: white
type: 'custom:button-card'
- color: 'rgb(255, 0, 0)'
entity: input_boolean.deebot_corridoio
icon: 'mdi:road-variant'
state:
- color: 'rgb(100, 100, 100)'
value: 'off'
styles:
card:
- font-size: 12px
- background-color: black
- color: white
type: 'custom:button-card'
- color: 'rgb(255, 0, 0)'
entity: input_boolean.deebot_aurora
icon: 'mdi:bed-empty'
state:
- color: 'rgb(100, 100, 100)'
value: 'off'
styles:
card:
- font-size: 12px
- background-color: black
- color: white
type: 'custom:button-card'
- color: 'rgb(255, 0, 0)'
entity: input_boolean.deebot_giovanni
icon: 'mdi:bed-empty'
state:
- color: 'rgb(100, 100, 100)'
value: 'off'
styles:
card:
- font-size: 12px
- background-color: black
- color: white
type: 'custom:button-card'
- color: 'rgb(0, 255, 0)'
entity: input_boolean.deebot_times
icon: 'mdi:numeric-2'
state:
- color: 'rgb(255, 0, 0)'
value: 'off'
icon: 'mdi:numeric-1'
styles:
card:
- font-size: 12px
- background-color: black
- color: white
type: 'custom:button-card'
type: horizontal-stack
This code doesn’t seem to work…
- color: white
entity: null
icon: 'mdi:view-dashboard-outline'
name: Stanze
styles:
card:
- font-size: 12px
- background-color: black
- color: white
tap_action:
action: call-service
service: vacuum.send_command
service_data:
command: spot_area
entity_id: vacuum.aspirapolvere
params:
cleanings: |-
{% if ('input_boolean.deebot_times', 'on') %}
2
{% else %}
1
{% endif %}
rooms: |-
{% if ('input_boolean.deebot_cucina', 'on') %}
1,
{% endif %}
{% if ('input_boolean.deebot_sala', 'on') %}
0,
{% endif %}
{% if ('input_boolean.deebot_camera', 'on') %}
3,
{% endif %}
{% if ('input_boolean.deebot_bagno_grande', 'on') %}
5,
{% endif %}
{% if ('input_boolean.deebot_bagno_piccolo', 'on') %}
8,
{% endif %}
{% if ('input_boolean.deebot_corridoio', 'on') %}
2,
{% endif %}
{% if ('input_boolean.deebot_aurora', 'on') %}
7,
{% endif %}
{% if ('input_boolean.eebot_giovanni', 'on') %}
6,
{% endif %}
type: 'custom:button-card'