Guest User

Untitled

a guest
Jul 24th, 2023
829
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.46 KB | None | 0 0
  1. type: vertical-stack
  2. cards:
  3. - type: horizontal-stack
  4. cards:
  5. - type: custom:mushroom-template-card
  6. layout: vertical
  7. icon: phu:magentatv
  8. icon_color: |
  9. {% if states('input_number.kitchen_rgb_mode') | int == 0 %}
  10. 0, 0 ,0 , 1
  11. {% elif states('input_number.kitchen_rgb_mode') | int == 1 %}
  12. {{ states('input_text.kitchen_kelvin_to_rgb') }}
  13. {% elif states('input_number.kitchen_rgb_mode') | int == 2 %}
  14. {{ states('input_text.kitchen_kelvin_to_rgb') }}
  15. {% elif states('input_number.kitchen_rgb_mode') | int == 3 %}
  16. {{ states('input_text.kitchen_rgb_color_value') }}
  17. {% elif states('input_number.kitchen_rgb_mode') | int == 4 %}
  18. {{ states('input_number.kitchen_rgb_brightness') | int }}, {{ states('input_number.kitchen_rgb_brightness') | int }}, {{ states('input_number.kitchen_rgb_brightness') | int }}, 1
  19. {% else %}
  20. 255,0,0,1
  21. {% endif %}
  22. fill_container: true
  23. primary: Mode
  24. tap_action:
  25. action: none
  26. badge_icon: ''
  27. multiline_secondary: true
  28. secondary: |
  29. {% if states('input_number.kitchen_rgb_mode') | int == 0 %}
  30. 0 (OFF)
  31. {% elif states('input_number.kitchen_rgb_mode') | int == 1 %}
  32. 1 (Kelvin)
  33. {% elif states('input_number.kitchen_rgb_mode') | int == 2 %}
  34. 3 (Kelvin Brightness)
  35. {% elif states('input_number.kitchen_rgb_mode') | int == 3 %}
  36. 3 (RGB)
  37. {% elif states('input_number.kitchen_rgb_mode') | int == 4 %}
  38. 4 (RGB Brightness)
  39. {% else %}
  40. error
  41. {% endif %}
  42. hold_action:
  43. action: none
  44. double_tap_action:
  45. action: none
  46. card_mod:
  47. style:
  48. mushroom-shape-icon$: |
  49. .shape {
  50.  
  51. --shape-animation: spin 20s linear infinite;
  52. --shape-color: rgba(0,0,0,.07);
  53. --icon-symbol-size: 90px;
  54. --icon-size: 89px;
  55. background: none
  56. -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 50px), #000 0);
  57. }
  58. - type: custom:mushroom-template-card
  59. layout: vertical
  60. icon: phu:magentatv
  61. icon_color: '{{ states(''input_text.kitchen_kelvin_to_rgb'')}}'
  62. fill_container: true
  63. primary: '{{ states("input_number.kitchen_rgb_temperature")}}'
  64. tap_action:
  65. action: none
  66. badge_icon: ''
  67. multiline_secondary: true
  68. secondary: Kelvin
  69. hold_action:
  70. action: none
  71. double_tap_action:
  72. action: none
  73. card_mod:
  74. style:
  75. mushroom-shape-icon$: |
  76. .shape {
  77.  
  78. --shape-animation: spin 20s linear infinite;
  79. --shape-color: rgba(0,0,0,.07);
  80. --icon-symbol-size: 90px;
  81. --icon-size: 89px;
  82. background: none
  83. -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 50px), #000 0);
  84. }
  85. - type: custom:mushroom-template-card
  86. layout: vertical
  87. icon: phu:magentatv
  88. icon_color: '{{ states(''input_text.kitchen_rgb_color_value'')}}'
  89. fill_container: true
  90. primary: '{{ states(''input_text.kitchen_rgb_color_value'')}}'
  91. tap_action:
  92. action: none
  93. badge_icon: ''
  94. multiline_secondary: true
  95. secondary: RGB ({{ states('input_number.kitchen_rgb_track') | float | int }})
  96. hold_action:
  97. action: none
  98. double_tap_action:
  99. action: none
  100. card_mod:
  101. style:
  102. mushroom-shape-icon$: |
  103. .shape {
  104.  
  105. --shape-animation: spin 20s linear infinite;
  106. --shape-color: rgba(0,0,0,.07);
  107. --icon-symbol-size: 90px;
  108. --icon-size: 89px;
  109. background: none;
  110. -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 50px), #000 0);
  111. }
  112. - type: custom:mushroom-template-card
  113. layout: vertical
  114. icon: phu:magentatv
  115. icon_color: >
  116. {{ states('input_number.kitchen_rgb_brightness') | int }}, {{
  117. states('input_number.kitchen_rgb_brightness') | int }}, {{
  118. states('input_number.kitchen_rgb_brightness') | int }}
  119. fill_container: true
  120. primary: >-
  121. {{ (states("input_number.kitchen_rgb_brightness") | int / 255 * 100) |
  122. round(0) }}%
  123. tap_action:
  124. action: none
  125. badge_icon: ''
  126. multiline_secondary: true
  127. secondary: >-
  128. Brightness ({{ states('input_number.kitchen_rgb_brightness') | float |
  129. int }})
  130. hold_action:
  131. action: none
  132. double_tap_action:
  133. action: none
  134. card_mod:
  135. style:
  136. mushroom-shape-icon$: |
  137. .shape {
  138.  
  139. --shape-animation: spin 20s linear infinite;
  140. --shape-color: rgba(0,0,0,.07);
  141. --icon-symbol-size: 90px;
  142. --icon-size: 89px;
  143. background: none
  144. -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 50px), #000 0);
  145. }
  146. - type: custom:my-slider-v2
  147. entity: input_number.kitchen_rgb_temperature
  148. styles:
  149. card:
  150. - height: 50px
  151. container:
  152. - width: 100%
  153. - height: 100%
  154. - position: relative
  155. - overflow: hidden
  156. - border-radius: 0px
  157. track:
  158. - width: 100%
  159. - height: 100%
  160. - position: relative
  161. - background: rgba(235,167,5,.7)
  162. progress:
  163. - height: 100%
  164. - background: rgba(255,234,182,.9)
  165. - position: absolute
  166. - width: 0.00%
  167. thumb:
  168. - height: 100%
  169. - background: white
  170. - position: absolute
  171. - right: '-5px'
  172. - width: 10px
  173. - type: custom:my-slider-v2
  174. entity: input_number.kitchen_rgb_track
  175. styles:
  176. card:
  177. - height: 50px
  178. container:
  179. - width: 100%
  180. - height: 100%
  181. - position: relative
  182. - overflow: hidden
  183. - border-radius: 0px
  184. track:
  185. - width: 100%
  186. - height: 100%
  187. - position: relative
  188. - background: rgba(255,0,0,.3)
  189. progress:
  190. - height: 100%
  191. - background: rgba(0,0,255,.4)
  192. - position: absolute
  193. - width: 0.00%
  194. thumb:
  195. - height: 100%
  196. - background: rgba(0,255,0,.7)
  197. - position: absolute
  198. - right: '-5px'
  199. - width: 10px
  200. - type: custom:my-slider-v2
  201. entity: input_number.kitchen_rgb_brightness
  202. styles:
  203. card:
  204. - height: 50px
  205. container:
  206. - width: 100%
  207. - height: 100%
  208. - position: relative
  209. - overflow: hidden
  210. - border-radius: 0px
  211. track:
  212. - width: 100%
  213. - height: 100%
  214. - position: relative
  215. - background: rgba(100,100,100,.3)
  216. progress:
  217. - height: 100%
  218. - background: rgba(255,255,255,.8)
  219. - position: absolute
  220. - width: 0.00%
  221. thumb:
  222. - height: 100%
  223. - background: white
  224. - position: absolute
  225. - right: '-5px'
  226. - width: 10px
  227.  
Add Comment
Please, Sign In to add comment