pjarbit

Car Notifications

Oct 25th, 2024
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. type: custom:button-card
  2. entity: sensor.unmet_car_conditions
  3. name: CAR NOTIFICATIONS
  4. show_name: true
  5. show_icon: true
  6. show_state: false
  7. styles:
  8. card:
  9. - background-color: >
  10. [[[ if (entity.state !== "") { return "rgba(255, 0, 0, 0.7)"; } else {
  11. return "rgba(67, 73, 82, 1)"; } ]]]
  12. - border-radius: 10px
  13. - padding: 10px
  14. - color: >
  15. [[[ if (entity.state === "") { return "rgb(47, 207, 118)"; } else {
  16. return "rgb(255, 255, 255)"; } ]]]
  17. - font-size: 20px
  18. - white-space: normal
  19. name:
  20. - font-weight: bold
  21. label:
  22. - white-space: normal
  23. - display: block
  24. - max-width: 100%
  25. icon:
  26. - color: >
  27. [[[ if (entity.state === "") { return "rgb(47, 207, 118)"; } else {
  28. return "rgb(255, 255, 255)"; } ]]]
  29. - width: 80px
  30. - height: 80px
  31. icon: >
  32. [[[ if (entity.state !== "") { return "mdi:car-emergency"; } else { return
  33. "mdi:car-multiple"; } ]]]
  34. show_label: true
  35. label: >
  36. [[[ if (entity.state !== "") { return entity.state; } else { return "ALL
  37. CLEAR"; } ]]]
  38. tap_action:
  39. action: none
  40. hold_action:
  41. action: none
Advertisement
Add Comment
Please, Sign In to add comment