Advertisement
calas

Card volume dot.

Nov 2nd, 2021
933
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.00 KB | None | 0 0
  1.         - type: custom:button-card # Soggiorno
  2.           icon: mdi:circle-slice-8
  3.           entity: media_player.soggiorno
  4.           aspect_ratio: 3/1
  5.           name: Vol. Soggiorno
  6.           styles:
  7.             card:
  8.               - background: none
  9.             grid:
  10.               - position: relative
  11.             custom_fields:
  12.               notification:
  13.                 - background-color: >
  14.                    [[[
  15.                       if (states['sensor.volume_alexa_soggiorno'].state == 0)
  16.                         return "green";
  17.                       return "red";
  18.                     ]]]
  19.                 - border-radius: 50%
  20.                 - position: absolute
  21.                 - left: 60%
  22.                 - top: 10%
  23.                 - height: 20px
  24.                 - width: 20px
  25.                 - font-size: 15px
  26.                 - line-height: 20px
  27.           custom_fields:
  28.             notification: >
  29.              [[[ return Math.floor(states['sensor.volume_alexa_soggiorno'].state ) ]]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement