d_sellers1

templating card with brightness

Jan 7th, 2022
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.09 KB | None | 0 0
  1.              - type: custom:button-card
  2.                 template: brightness_selector
  3.                 show_icon: true
  4.                 show_name: true
  5.                 show_state: true
  6.                 name: 100%
  7.                 state:
  8.                   - operator: template
  9.                     value: |
  10.                      [[[
  11.                         return states['light.bedroom1'].attributes
  12.                         && (states['light.bedroom1'].attributes.brightness >= 254)
  13.                       ]]]
  14.                     color: rgb(255,255,0)
  15.                     icon: mdi:lightbulb-outline
  16.                   - operator: default
  17.                     icon: mdi:lightbulb
  18.                 tap_action:
  19.                   service_data:
  20.                     entity_id: light.bedroom_lights
  21.                     brightness_pct: 100
  22.               - type: custom:button-card
  23.                 template: brightness_selector
  24.                 name: 75%
  25.                 tap_action:
  26.                   service_data:
  27.                     entity_id: light.bedroom_lights
  28.                     brightness_pct: 75
Advertisement
Add Comment
Please, Sign In to add comment