Advertisement
philippzbornik

HA - Wäschetrockner

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