Advertisement
philippzbornik

HA - Geschirrspüler

Feb 21st, 2025
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.90 KB | None | 0 0
  1. - type: 'custom:button-card'
  2. entity: sensor.siemens_sn758x46te_68a40e40caf6_bsh_common_setting_powerstate
  3. name: 'Geschirrspüler'
  4. icon: 'mdi:dishwasher'
  5. color: black
  6. show_label: true
  7. tap_action:
  8. action: none
  9. state:
  10. - value: "Aus"
  11. label: Ausgeschaltet
  12. styles:
  13. grid:
  14. - grid-template-areas: '"i" "n" "l"'
  15. - grid-template-columns: 1fr
  16. - grid-template-rows: 70px min-content 1fr
  17. label:
  18. - justify-self: start
  19. - font-size: 14px
  20. - padding: 2px 0
  21. - opacity: 0.7
  22. - font-weight: 500
  23. custom_fields:
  24. program:
  25. - display: none
  26. bar:
  27. - display: none
  28. stat1:
  29. - display: none
  30. stat2:
  31. - display: none
  32. stat3:
  33. - display: none
  34. styles:
  35. card:
  36. - padding: 20px
  37. - height: 210px
  38. - background: linear-gradient(157deg, rgba(246,220,131,1) 0%, rgba(247,139,243,1) 100%)
  39. grid:
  40. - grid-template-areas: '"i program" "n stat1" "bar bar" "stat2 stat3"'
  41. - grid-template-columns: 1fr 1fr
  42. - grid-template-rows: 70px min-content 40px min-content
  43. name:
  44. - justify-self: start
  45. - font-size: 14px
  46. - opacity: 0.7
  47. icon:
  48. - width: 34px
  49. img_cell:
  50. - justify-self: start
  51. - align-self: start
  52. - width: 34px
  53. - height: 34px
  54.  
  55. custom_fields:
  56. program:
  57. - justify-self: end
  58. - align-self: end
  59. - padding-bottom: 6px
  60. - font-size: 14px
  61. - opacity: 0.7
  62. stat1:
  63. - justify-self: end
  64. - font-size: 14px
  65. - padding-bottom: 5px
  66. - opacity: 0.7
  67. stat2:
  68. - justify-self: start
  69. - font-size: 10px
  70. - opacity: 0.7
  71. stat3:
  72. - justify-self: end
  73. - font-size: 10px
  74. - opacity: 0.7
  75. bar:
  76. - justify-self: start
  77. - margin-top: '-4px'
  78. - width: 100%
  79. - border-radius: 6px
  80. - background: '#f0f0f0'
  81. - height: 12px
  82. custom_fields:
  83. program: |
  84. [[[
  85. if (states['sensor.siemens_sn758x46te_68a40e40caf6_bsh_common_option_programprogress'].state <100)
  86. return 'Programm: ' + states['sensor.siemens_sn758x46te_68a40e40caf6_selected_program'].state
  87. return "Programm: Abgeschlossen"
  88. ]]]
  89. bar: |
  90. [[[
  91. var state = states['sensor.siemens_sn758x46te_68a40e40caf6_bsh_common_option_programprogress'].state
  92. return `<div> <div style="background: #1679AB; height: 12px; width: ${state}%"></div> </div>`
  93. ]]]
  94. stat1: |
  95. [[[
  96. if (states['sensor.siemens_sn758x46te_68a40e40caf6_bsh_common_option_programprogress'].state <100)
  97. return 'Endzeit: ' + states['sensor.geschirrspuler_remaining_time'].state
  98. return ""
  99. ]]]
  100. stat2: '0 %'
  101. stat3: '100 %'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement