Guest User

CustomWeatherCard

a guest
Feb 16th, 2025
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.10 KB | None | 0 0
  1. type: custom:mod-card
  2. style: |
  3. ha-card {
  4. background-color: rgba(0, 0, 0, .2); /* Set the entire background color */
  5. border-radius: 30px;
  6. border: 1px solid rgba(255, 255, 255, .1);
  7. z-index: 1;
  8. }
  9. card:
  10. type: custom:layout-card
  11. layout_type: custom:grid-layout
  12. layout: {}
  13. cards:
  14. - type: weather-forecast
  15. entity: weather.home
  16. show_current: true
  17. show_forecast: false
  18. secondary_info_attribute: apparent_temperature
  19. name: " "
  20. card_mod:
  21. style: |
  22. div.temp-attribute {
  23. display: flex;
  24. align-items: center;
  25. justify-content: flex-start;
  26. position: absolute;
  27. top: 50%;
  28. bottom: 50%;
  29. left: 25%;
  30. gap: 20px;
  31. }
  32. div.name-state > div.state {
  33. font-size: 28px;
  34. margin-right: 10px; /* Space between state and temperature */
  35. }
  36. div.name-state > div.temp {
  37. font-size: 28px;
  38. margin: 0;
  39. padding: 0;
  40. }
  41. div.temp-attribute > div.attribute {
  42. font-size: 28px;
  43. }
  44. div.temp-attribute > div.temp {
  45. font-size: 28px;
  46. }
  47. ha-card {
  48. margin-top: -8px;
  49. transition: none !important;
  50. background-color: rgba(0, 0, 0, 0) !important;
  51. --checkbox-color: white !important;
  52. --primary-text-color: white !important;
  53. --secondary-text-color: white !important;
  54. font-family: "Helvetica";
  55. border-color: rgba(0, 0, 0, 0);
  56. }
  57. - type: custom:hourly-weather
  58. entity: weather.home
  59. icons: true
  60. show_date: "false"
  61. show_precipitation_probability: false
  62. grid_options:
  63. columns: full
  64. rows: auto
  65. label_spacing: "2"
  66. num_segments: "15"
  67. name: null
  68. icon_fill: single
  69. colors:
  70. clear-night:
  71. foreground: "#ffffff"
  72. cloudy:
  73. background: "#B0C4DE"
  74. foreground: "#000000"
  75. fog:
  76. foreground: "#ffffff"
  77. hail:
  78. foreground: "#ffffff"
  79. lightning:
  80. foreground: "#ffffff"
  81. lightning-rainy:
  82. foreground: "#ffffff"
  83. partlycloudy:
  84. foreground: "#ffffff"
  85. pouring:
  86. foreground: "#ffffff"
  87. rainy:
  88. background: "#1E90FF"
  89. foreground: "#FFFFFF"
  90. snowy:
  91. foreground: black
  92. snowy-rainy:
  93. foreground: "#ffffff"
  94. sunny:
  95. background: "#FFD700"
  96. foreground: "#000000"
  97. windy:
  98. foreground: "#ffffff"
  99. windy-variant:
  100. foreground: "#ffffff"
  101. exceptional:
  102. foreground: "#ffffff"
  103. - type: custom:weather-chart-card
  104. entity: weather.home
  105. show_main: false
  106. show_temperature: false
  107. show_current_condition: false
  108. show_attributes: false
  109. show_time: false
  110. show_time_seconds: false
  111. show_day: false
  112. show_date: false
  113. show_humidity: false
  114. show_pressure: false
  115. show_wind_direction: false
  116. show_wind_speed: false
  117. show_sun: false
  118. show_feels_like: false
  119. show_dew_point: false
  120. show_wind_gust_speed: false
  121. show_visibility: false
  122. show_last_changed: false
  123. use_12hour_format: true
  124. icons_size: "75"
  125. animated_icons: true
  126. icon_style: style1
  127. autoscroll: true
  128. forecast:
  129. precipitation_type: probability
  130. show_probability: false
  131. labels_font_size: "24"
  132. precip_bar_size: "100"
  133. style: style2
  134. show_wind_forecast: false
  135. condition_icons: true
  136. round_temp: false
  137. type: daily
  138. number_of_forecasts: "7"
  139. disable_animation: true
  140. disable_tooltips: true
  141. show_rainfall: false
  142. chart_height: "310"
  143. chart_datetime_color: rgba(255, 255, 255, 1)
  144. temperature2_color: rgba(255, 255, 255, 1)
  145. precipitation_color: rgba(75, 166, 238, .25)
  146. units:
  147. speed: ""
  148. title: null
  149. day_date_size: "26"
  150. current_temp_size: "50"
  151. card_mod:
  152. style: |
  153. ha-card {
  154. background-color: rgba(0, 0, 0, 0) !important;
  155. margin-top: -40px;
  156. margin-left: -40px;
  157. margin-right: -40px;
  158. font-family: "Helvetica";
  159. --primary-text-color: white !important;
  160. border-color: rgba(0, 0, 0, 0);
  161. height: 330px; /* Let height adjust dynamically */
  162. width: auto;
  163. overflow: hidden;
  164. }
  165. div.conditions {
  166. transform: translateY(-303px); /* Moves the icons up by 10px */
  167. /position: sticky;
  168. padding: 38px;
  169.  
  170. }
  171. grid_options:
  172. columns: full
  173. rows: auto
  174. column_span: 3
  175. visibility:
  176. - condition: screen
  177. media_query: "(min-width: 768px)"
  178.  
Advertisement
Add Comment
Please, Sign In to add comment