lawrencehead

declutter-racing-calendar-card

Jul 6th, 2025
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. racing-calendar-card:
  2. card:
  3. type: custom:mushroom-template-card
  4. entity: '[[sensor]]'
  5. primary: |
  6. {{ state_attr('[[sensor]]', 'session_name') }}
  7. secondary: |
  8. {{ states(entity) }}
  9. icon: '[[icon]]'
  10. icon_color: |
  11. {{ state_attr('[[sensor]]', 'icon_colour') }}
  12. tap_action:
  13. action: fire-dom-event
  14. browser_mod:
  15. service: browser_mod.popup
  16. data:
  17. deviceID: this
  18. title: Upcoming events
  19. content:
  20. type: custom:atomic-calendar-revive
  21. enableModeChange: true
  22. entities:
  23. - entity: sensor.calendars
  24. icon: mdi:calendar
  25. - entity: '[[calendarEntity]]'
  26. showMultiDay: false
  27. max_events: 5
  28. showRelativeTime: false
  29. showLocation: false
  30. maxDaysToShow: 365
  31. maxEventCount: 10
  32. showHiddenText: false
  33. startDaysAhead: -4
  34. card_mod:
  35. style: |
  36. ha-state-icon {
  37. {% if state_attr('[[sensor]]', 'icon_colour') == 'orange' %}
  38. animation: shake 1500ms infinite;
  39. {% elif state_attr('[[sensor]]', 'icon_colour') == 'yellow' %}
  40. animation: shake 750ms infinite;
  41. {% elif state_attr('[[sensor]]', 'icon_colour') == 'green' %}
  42. animation: wheelie 2s infinite;
  43. {% endif %}
  44. }
  45. @keyframes shake {
  46. 0%, 100% { transform: translate(0, 0) rotate(0); }
  47. 20% { transform: translate(0.6px, -0.6px) rotate(-4deg); }
  48. 40% { transform: translate(-0.6px, 0.6px) rotate(4deg); }
  49. 60% { transform: translate(0.6px, 0.6px) rotate(-4deg); }
  50. 80% { transform: translate(-0.6px, -0.6px) rotate(4deg); }
  51. }
  52. @keyframes wheelie {
  53. 0%, 100% { transform: rotate(0); }
  54. 30%, 70% { transform: rotate(-30deg); }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment