Untitled

 avatar
wookiee
yaml
a year ago
638 B
8
Indexable
lovelace yaml
type: custom:button-card
name: Lights
icon: mdi:lamp
layout: icon_name
data: {}
tap_action: # action 1
  action: call-service
  service: script.turn_on
  target:
    entity_id: script.togle_my_button1_boolean
styles:
  card:
    - height: 40px
    - width: 200px
    - background-color: |
        [[[
          if (states['input_boolean.button1_boolean'].state == 'on')
            return "green";
          return "black";
        ]]]
  name:
    - color: white


Action 2:
tap_action:
  action: fire-dom-event
  local_conditional_card:
    action: hide
    ids:
      - tabs1: show
      - tabs2: hide
      - tabs3: hide
Editor is loading...
Leave a Comment