Pivotonian

Weather

Sep 23rd, 2025
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.53 KB | None | 0 0
  1. type: custom:button-card
  2. entity: input_select.column_c1
  3. show_state: false
  4. show_name: false
  5. show_icon: false
  6. styles:
  7. grid:
  8. - grid-template-areas: '"weather" "forecast" "hourly"'
  9. - grid-template-columns: 1fr
  10. - grid-template-rows: 1fr 1fr
  11. - align-items: start
  12. card:
  13. - height: 375px
  14. width: 302.5px
  15. padding: 10px 0px 20px 0px
  16. margin: 0px 0px 0px 0px
  17. align-content: start
  18. justify-content: start
  19. align-self: start
  20. background: transparent
  21. border-radius: 30px
  22. border: solid 2px transparent
  23. box-shadow: 10 10 10 2px transparent
  24. custom_fields:
  25. hourly:
  26. - margin: 0px 0px 0px 0px
  27. padding: 0px
  28. width: 305px
  29. align-items: center
  30. align-content: center
  31. justify-items: center
  32. background-color: transparent
  33. custom_fields:
  34. weather:
  35. card:
  36. type: custom:button-card
  37. styles:
  38. grid:
  39. - grid-template-areas: '"icon temp"'
  40. grid-template-columns: .75fr 1fr
  41. grid-template-rows: 1fr
  42. card:
  43. - background-color: transparent
  44. margin: 0px 0px 0px 0px
  45. padding: 0px
  46. height: 130px
  47. width: 305px
  48. custom_fields:
  49. icon:
  50. card:
  51. type: custom:button-card
  52. show_entity_picture: true
  53. entity_picture: |
  54. [[[
  55. return states['sensor.weather_icon_animated'].state;
  56. ]]]
  57. tap_action:
  58. action: navigate
  59. navigation_path: '#weather'
  60. styles:
  61. card:
  62. - padding: 0px 0px 0px 0px
  63. margin: 5px 0px 0px 30px
  64. background-color: transparent
  65. height: 100px
  66. align-self: center
  67. align-content: center
  68. justify-self: right
  69. justify-content: right
  70. entity_picture:
  71. - width: 50px
  72. temp:
  73. card:
  74. type: custom:button-card
  75. name: >
  76. [[[ return
  77. Math.round(states['sensor.geelong_racecourse_temp'].state) +
  78. '°'; ]]]
  79. tap_action:
  80. action: navigate
  81. navigation_path: '#weather'
  82. show_icon: false
  83. show_name: true
  84. show_label: true
  85. styles:
  86. card:
  87. - background-color: transparent
  88. border-radius: 0px
  89. align-self: start
  90. align-content: start
  91. justify-self: start
  92. justify-content: start
  93. height: 80px
  94. padding: 0px
  95. margin: 0px 0px 0px -30px
  96. name:
  97. - font-size: 55px
  98. color: white
  99. font-weight: 500
  100. align-self: center
  101. align-content: center
  102. justify-self: center
  103. justify-content: center
  104. font-family: SF Pro Rounded
  105. label:
  106. - font-size: 16px
  107. color: rgba(255,255,255,0.8)
  108. font-weight: 550
  109. margin-top: 15px
  110. align-self: center
  111. align-content: center
  112. justify-self: center
  113. justify-content: center
  114. forecast:
  115. card:
  116. type: custom:button-card
  117. show_icon: false
  118. show_name: true
  119. show_label: true
  120. name: |
  121. [[[ return states['sensor.town_short_text_0'].state; ]]]
  122. label: |
  123. [[[
  124. let highTemp = 'High ' + states['sensor.town_temp_max_0'].state + '°';
  125. let lowTemp;
  126. if (states['sensor.town_temp_min_0'].state === 'unknown') {
  127. lowTemp = 'Low ' + states['sensor.town_temp_min_1'].state + '°';
  128. } else {
  129. lowTemp = 'Low ' + states['sensor.town_temp_min_0'].state + '°';
  130. }
  131. return highTemp + ' ' + lowTemp;
  132. ]]]
  133. tap_action:
  134. action: navigate
  135. navigation_path: '#weather'
  136. styles:
  137. grid:
  138. - justify-items: start
  139. card:
  140. - background-color: transparent
  141. border-radius: 0px
  142. margin: 0px 0px 20px 0px
  143. height: 70px
  144. width: 302px
  145. align-self: start
  146. align-content: start
  147. align-items: center
  148. justify-items: center
  149. name:
  150. - font-size: 22px
  151. font-weight: 550
  152. margin-top: 0px
  153. align-self: center
  154. white-space: normal
  155. text-align: center
  156. word-break: break-word
  157. label:
  158. - font-size: 16px
  159. padding-top: 10px
  160. font-weight: 450
  161. color: rgba(255,255,255,0.6)
  162. text-transform: uppercase
  163. align-self: center
  164. align-content: center
  165. justify-self: center
  166. justify-content: center
  167. hourly:
  168. card:
  169. type: weather-forecast
  170. show_current: false
  171. show_forecast: true
  172. entity: weather.town_bom
  173. forecast_type: daily
  174. forecast_slots: 4
  175. card_mod:
  176. style: |
  177. ha-card {
  178. background-color: transparent;
  179. padding: 0px;
  180. font-size: 12px !important;
  181. margin: 0px 0px 0px 0px;}
  182. card_mod:
  183. style: |
  184. :host {
  185. display: block;
  186. position: relative; margin: 0px 6px 0px 0px;
  187. }
  188.  
  189. :host::before {
  190.  
  191. content: "";
  192. position: absolute;
  193. inset: 0;
  194. border-radius: 30px;
  195. -webkit-backdrop-filter: blur(50px);
  196. z-index: -1;
  197. padding: .1rem;
  198. background: linear-gradient(60deg,
  199. rgba(255,255,255,0.0) 0%,
  200. rgba(255,255,255,0.2) 49%,
  201. rgba(255,255,255,0.2) 51%,
  202. rgba(255,255,255,0.0) 100%);
  203. -webkit-mask:
  204. linear-gradient(#fff 0 0) content-box,
  205. linear-gradient(#fff 0 0);
  206. -webkit-mask-composite: xor;
  207. mask-composite: exclude;
  208. z-index: 0; filter: saturate(140%);
  209. }
  210.  
  211. :host::after {
  212. content: "";
  213. background: linear-gradient(180deg, rgba(255,255,255, 0.1) 20%, rgba(255,255,255, 0.0) 100%);
  214. position: absolute;
  215. inset: 0;
  216. border-radius: 30px;
  217. box-shadow: inset -8px 10px 15px rgba(0, 0, 0, 0.1);
  218. z-index: -1;
  219.  
  220. -webkit-backdrop-filter:blur(30px) saturate(110%) brightness(90%);
  221. filter: drop-shadow(3px 3px 10px rgba(0, 0, 0, 0.2)); }
  222.  
  223. }
Advertisement
Add Comment
Please, Sign In to add comment