Advertisement
Guest User

Corrected Dishwasher Card

a guest
Feb 19th, 2025
632
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.33 KB | None | 0 0
  1. - type: custom:bubble-card
  2. card_type: separator
  3. name: Dishwasher
  4. icon: mdi:dishwasher
  5. styles: |
  6. .bubble-line {
  7. background: rgb(52, 52, 52);
  8. opacity: 1;
  9. }
  10.  
  11. - type: custom:layout-card
  12. layout_type: custom:grid-layout
  13. cards:
  14. - type: custom:button-card
  15. view_layout:
  16. grid-area: one
  17. show_name: true
  18. name: Run Auto
  19. layout: icon_name
  20. icon: mdi:silverware-clean
  21. entity: switch.dishwasher_program_auto2
  22. tap_action:
  23. action: toggle
  24. styles:
  25. card:
  26. - border-radius: 30px
  27. - border-width: 1px
  28. - border-color: rgb(52, 52, 52)
  29. img_cell:
  30. - width: 40px
  31. - height: 35px
  32. icon:
  33. - width: 25px
  34. - height: 25px
  35. - color: white
  36. - margin-top: 0px
  37. name:
  38. - font-size: 12px
  39. - justify-self: start
  40.  
  41. - type: custom:mushroom-entity-card
  42. entity: input_text.dishwasher_status
  43. name: Dishwasher
  44. icon: ""
  45. fill_container: true
  46. icon_color: rgba(251, 133, 0, 1)
  47. card_mod:
  48. style: |
  49. {% if is_state('input_text.dishwasher_status', 'Clean') %}
  50. ha-card {
  51. border-radius: 30px;
  52. border-width: 1px;
  53. height: 50px !important;
  54. }
  55. ha-state-icon {
  56. color: rgba(142, 202, 230, 1);
  57. }
  58. ha-state-icon {
  59. --card-mod-icon: mdi:dishwasher
  60. }
  61. {% else %}
  62. ha-card {
  63. border-radius: 30px;
  64. border-width: 1px;
  65. height: 50px !important;
  66. }
  67. ha-state-icon {
  68. color: rgba(251, 133, 0, 1);
  69. }
  70. ha-state-icon {
  71. --card-mod-icon: mdi:dishwasher-alert
  72. }
  73. {% endif %}
  74.  
  75. layout:
  76. grid-template-columns: 1fr 2fr
  77. grid-template-rows: 2
  78. grid-template-areas: "\"one two\""
  79. margin: 0px -5px -10px -7px
  80.  
  81. - type: conditional
  82. conditions:
  83. - condition: state
  84. entity: sensor.dishwasher_rinse_aid_nearly_empty
  85. state: present
  86. card:
  87. type: custom:mushroom-entity-card
  88. entity: sensor.dishwasher_rinse_aid_nearly_empty
  89. icon_color: light-grey
  90. icon: mdi:water-alert
  91. fill_container: true
  92. name: Dishwasher Needs Rinse-Aid
  93. card_mod:
  94. style: |
  95. ha-card {
  96. border-radius: 30px;
  97. border-width: 1px;
  98. }
  99. ha-state-icon {
  100. color: rgba(142, 202, 230, 1);
  101. }
  102.  
  103. - type: conditional
  104. conditions:
  105. - condition: state
  106. entity: sensor.dishwasher_operation_state
  107. state: run
  108. card:
  109. type: custom:button-card
  110. entity: sensor.dishwasher_operation_state
  111. name: Dishwasher
  112. show_label: true
  113. tap_action:
  114. action: none
  115. hold_action:
  116. action: none
  117. double_tap_action:
  118. action: none
  119. icon: mdi:dishwasher
  120. state:
  121. - value: Ready
  122. label: Idle
  123. styles:
  124. custom_fields:
  125. bar:
  126. - display: none
  127. stat1:
  128. - display: none
  129. stat2:
  130. - visibility: hidden
  131. stat3:
  132. - visibility: hidden
  133. - value: "Off"
  134. label: "Off"
  135. styles:
  136. custom_fields:
  137. bar:
  138. - display: none
  139. stat1:
  140. - display: none
  141. stat2:
  142. - visibility: hidden
  143. stat3:
  144. - visibility: hidden
  145. styles:
  146. card:
  147. - padding: 20px
  148. - height: 180px
  149. - font-family: montserrat
  150. grid:
  151. - grid-template-areas: "\"i program\" \"n stat2\" \"bar bar\" \"stat1 stat3\""
  152. - grid-template-columns: 1fr 1fr
  153. - grid-template-rows: 70px min-content 40px min-content
  154. name:
  155. - justify-self: start
  156. - font-size: 16px
  157. - font-weight: 500
  158. label:
  159. - justify-self: start
  160. - font-size: 16px
  161. - font-weight: 500
  162. icon:
  163. - width: 36px
  164. img_cell:
  165. - justify-self: start
  166. - align-self: start
  167. - width: 36px
  168. - height: 36px
  169. custom_fields:
  170. program: |
  171. [[[
  172. var powerState = states['switch.dishwasher_power'].state;
  173. var program = states['select.dishwasher_active_program'].state;
  174. var programLabels = {
  175. "dishcare_dishwasher_program_eco_50": "Eco",
  176. "dishcare_dishwasher_program_auto_2": "Auto",
  177. "dishcare_dishwasher_program_intensiv_70": "Heavy",
  178. "dishcare_dishwasher_program_quick_65": "Express 65°",
  179. "dishcare_dishwasher_program_night_wash": "Silent",
  180. "dishcare_dishwasher_program_machine_care": "Machine Care",
  181. "dishcare_dishwasher_program_pre_rinse": "Pre-rinse"
  182. };
  183.  
  184. if (powerState !== 'off' && (!program || program === 'unavailable' || program === 'unknown')) {
  185. return "Idle";
  186. }
  187.  
  188. return programLabels[program] || program;
  189. ]]]
  190. stat3: |
  191. [[[
  192. var powerState = states['switch.dishwasher_power'].state;
  193. if (powerState === 'off') {
  194. return "Off";
  195. }
  196.  
  197. var progress = states['sensor.dishwasher_program_progress'].state;
  198.  
  199. if (progress === 'unavailable' || progress === 'unknown' || progress === '') {
  200. return "Ready";
  201. }
  202.  
  203. return progress + '%';
  204. ]]]
  205.  
  206. - type: history-graph
  207. entities:
  208. - entity: input_text.dishwasher_status
  209. logarithmic_scale: false
  210. show_names: false
  211. card_mod:
  212. style: |
  213. {% if is_state('input_text.dishwasher_status', 'Clean') %}
  214. ha-card {
  215. border-radius: 30px;
  216. border-width: 1px;
  217. }
  218. ha-state-icon {
  219. color: rgba(142, 202, 230, 1);
  220. }
  221. ha-state-icon {
  222. --card-mod-icon: mdi:dishwasher
  223. }
  224. {% else %}
  225. ha-card {
  226. border-radius: 30px;
  227. border-width: 1px;
  228. }
  229. ha-state-icon {
  230. color: rgba(251, 133, 0, 1);
  231. }
  232. ha-state-icon {
  233. --card-mod-icon: mdi:dishwasher-alert
  234. }
  235. {% endif %}
  236.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement