Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: vertical-stack
- cards:
- - type: custom:decluttering-card
- template: normal_title
- variables:
- - content: Current Conditions
- - sub-content: null
- - type: vertical-stack
- cards:
- - square: false
- type: grid
- cards:
- - type: picture-elements
- image: /local/dashboard_photos/transparent/~transparent-1-1.png
- card_mod:
- style: |
- ha-card {
- background:
- /* top, transparent red, faked with gradient */
- linear-gradient(
- rgba(0, 0, 0, 0.2),
- rgba(0, 0, 0, 0.1)
- ),
- /* bottom, image */
- url("/local/dashboard_photos/temperature_humidity.jpg");
- background-size: cover;
- #background-size: contain;
- #background-size: auto;
- #background-size: auto auto;
- background-repeat: no-repeat;
- background-position: center left;
- }
- elements:
- - type: state-label
- style:
- transform: none
- right: 1%
- top: 1%
- card_mod:
- style: |
- :host {
- {% set lev = states('sensor.outdoor_front_temp')|float(0) %}
- {% if lev < -7 %}
- color: lightblue;
- text-shadow: 1px 1px 4px blue;
- font-weight: 600;
- font-size: 160%;
- {% elif lev > 27 %}
- color: crimson;
- text-shadow: 1px 1px 4px salmon;
- font-weight: 600;
- font-size: 160%;
- {% else %}
- color: white;
- font-size: 160%;
- {% endif %}
- }
- entity: sensor.outdoor_front_temp
- - type: conditional
- conditions:
- - entity: sensor.outdoor_humidity
- state_not: unavailable
- title: humidity
- elements:
- - type: state-label
- style:
- transform: none
- right: 1%
- top: 17%
- font-size: 155%
- color: white
- entity: sensor.outdoor_humidity
- - type: state-label
- style:
- transform: none
- right: 2%
- card_mod:
- style: |
- :host {
- {% set lev = states('sensor.calc_feels_like')|float(0) %}
- {% if lev < -7 %}
- color: lightblue;
- text-shadow: 1px 1px 4px blue;
- font-weight: 600;
- font-size: 150%;
- top: 50%;
- {% elif lev > 27 %}
- color: crimson;
- text-shadow: 1px 1px 4px salmon;
- font-weight: 600;
- font-size: 150%;
- top: 50%;
- {% else %}
- color: white;
- bottom: 12%;
- {% endif %}
- }
- entity: sensor.calc_feels_like
- prefix: "Feels: "
- - type: conditional
- conditions:
- - entity: sensor.openweathermap_uv_index
- state_not: unavailable
- title: uv index
- elements:
- - type: state-label
- style:
- transform: none
- right: 2%
- bottom: 0%
- font-size: 100%
- color: silver
- entity: sensor.openweathermap_uv_index
- - type: picture-elements
- image: /local/dashboard_photos/transparent/~transparent-1-1.png
- card_mod:
- style: |
- ha-card {
- background:
- /* top, transparent red, faked with gradient */
- linear-gradient(
- rgba(0, 0, 0, 0.2),
- rgba(0, 0, 0, 0.1)
- ),
- /* bottom, image */
- url("/local/dashboard_photos/wind_turbine_2.jpg");
- background-size: cover;
- #background-size: contain;
- #background-size: auto;
- #background-size: auto auto;
- background-repeat: no-repeat;
- }
- elements:
- - type: conditional
- conditions:
- - condition: numeric_state
- entity: sensor.outdoor_front_pressure
- above: 4
- title: pressure
- elements:
- - type: state-label
- style:
- transform: none
- left: 1%
- bottom: 0%
- font-size: 100%
- card_mod:
- style: |
- :host {
- color:
- {% set lev = states('sensor.outdoor_front_pressure')|float(0) %}
- {% if lev > 70 %}
- red
- {% elif lev > 40 %}
- rgb(255,165,0)
- {% else %}
- lightgreen
- {% endif %};
- }
- entity: sensor.outdoor_front_pressure
- prefix: "Pressure: "
- - type: state-label
- style:
- transform: none
- left: 1%
- font-size: 100%
- card_mod:
- style: |
- :host {
- {% set lev = states('sensor.lincoln_wind_gust')|float(0) %}
- {% if lev <= states('sensor.astroweather_backyard_10m_wind_speed')|float(0) %}
- opacity: 0;
- top: 999%;
- {% elif lev > 65 %}
- color: red;
- top: 10%;
- {% elif lev > 40 %}
- color: rgb(255,165,0);
- top: 10%;
- {% elif lev < 1 %}
- opacity: 0;
- top: 999%;
- {% else %}
- color: silver;
- top: 10%;
- {% endif %}
- }
- entity: sensor.lincoln_wind_gust
- prefix: "Gust: "
- - type: conditional
- conditions:
- - condition: numeric_state
- entity: sensor.astroweather_backyard_10m_wind_speed
- above: 0
- title: wind speed
- elements:
- - type: state-label
- style:
- left: 50%
- top: 50%
- font-size: 200%
- font-weight: 700
- color: white
- entity: sensor.astroweather_backyard_10m_wind_direction
- - type: state-label
- style:
- transform: none
- left: 1%
- font-size: 100%
- card_mod:
- style: |
- :host {
- {% set lev = states('sensor.astroweather_backyard_10m_wind_speed')|float(0) %}
- {% if lev > 50 %}
- color: red;
- top: 1%;
- {% elif lev > 30 %}
- color: rgb(255,165,0);
- top: 1%;
- {% elif lev < 1 %}
- opacity: 0;
- top: 999%;
- {% else %}
- color: silver;
- top: 1%;
- {% endif %}
- }
- entity: sensor.astroweather_backyard_10m_wind_speed
- prefix: "Speed: "
- - type: state-label
- style:
- transform: none
- left: 1%
- font-size: 100%
- card_mod:
- style: |
- :host {
- {% set lev = states('sensor.lincoln_chance_of_precip')|float(0) %}
- {% if lev > 70 %}
- color: silver;
- bottom: 10%;
- {% elif lev > 90 %}
- color: rgb(255,165,0);
- bottom: 10%;
- {% elif lev < 1 %}
- opacity: 0;
- top: 999%;
- {% else %}
- color: silver;
- bottom: 10%;
- {% endif %}
- }
- entity: sensor.lincoln_chance_of_precip
- prefix: "POP: "
- columns: 2
- - type: picture-elements
- image: /local/dashboard_photos/low_horizon_blue_1.jpg
- elements:
- - type: state-label
- title: sun elevation
- style:
- transform: none
- left: 1%
- top: 0%
- font-size: 90%
- font-weight: 700
- entity: sensor.sun_elevation
- prefix: "Elevation: "
- - type: state-label
- title: sun azimuth
- style:
- transform: none
- left: 1%
- top: 9%
- font-size: 90%
- font-weight: 700
- entity: sensor.sun_azimuth
- prefix: "Azimuth: "
- card_mod:
- style: |
- :host {
- {% set totAz = (180-states('sensor.morning_azimuth')|float(0))*2 %}
- {% set progress = ( ( (states('sensor.azimuth_display')|float(0) - states('sensor.morning_azimuth')|float(0) ) / totAz) * 100)|float(0)|round(0) %}
- {% if states('sensor.sun_elevation')|float(0) > -6 %}
- background-image: linear-gradient(270deg,rgba(28,28,28,1) {{100-progress-3}}%, rgba(28,28,28,0.2) {{100-progress+5}}% ),
- linear-gradient(90deg, blue 0%, rgb(255,165,0) 12%, yellow 20%, yellow 80%,rgb(255,165,0) 92%, blue 100%);
- {% endif %}
- background-size: 100% 4px !important;
- background-repeat: no-repeat !important;
- background-position: 0% 75% !important;
- }
- - type: state-label
- title: dawn
- style:
- transform: none
- left: 1%
- top: 18%
- font-size: 90%
- card_mod:
- style: |
- :host {
- {% set datetime_value = as_timestamp(state_attr('sun.sun','next_dawn')) | timestamp_custom('%Y-%m-%d %H:%M:%S') %}
- {# Extract the date from the datetime value #}
- {% set extracted_date = strptime(datetime_value, '%Y-%m-%d %H:%M:%S').date() %}
- {# Calculate tomorrow's date #}
- {% set tomorrow_date = (now() + timedelta(days=1)).date() %}
- {# Determine if the extracted date is tomorrow #}
- {% if extracted_date == tomorrow_date %}
- opacity: 0.5;
- {% else %}
- opacity: 1;
- {% endif %}
- }
- entity: sensor.next_dawn
- prefix: "Dawn: "
- - type: state-label
- title: sunrise
- style:
- transform: none
- left: 1%
- top: 27%
- font-size: 90%
- card_mod:
- style: |
- :host {
- {% set datetime_value = as_timestamp(state_attr('sun.sun','next_rising')) | timestamp_custom('%Y-%m-%d %H:%M:%S') %}
- {# Extract the date from the datetime value #}
- {% set extracted_date = strptime(datetime_value, '%Y-%m-%d %H:%M:%S').date() %}
- {# Calculate tomorrow's date #}
- {% set tomorrow_date = (now() + timedelta(days=1)).date() %}
- {# Determine if the extracted date is tomorrow #}
- {% if extracted_date == tomorrow_date %}
- opacity: 0.5;
- {% else %}
- opacity: 1;
- {% endif %}
- }
- entity: sensor.next_sunrise
- prefix: "Sunrise: "
- - type: state-label
- title: noon
- style:
- transform: none
- left: 1%
- top: 36%
- font-size: 90%
- card_mod:
- style: |
- :host {
- {% set datetime_value = as_timestamp(state_attr('sun.sun','next_noon')) | timestamp_custom('%Y-%m-%d %H:%M:%S') %}
- {# Extract the date from the datetime value #}
- {% set extracted_date = strptime(datetime_value, '%Y-%m-%d %H:%M:%S').date() %}
- {# Calculate tomorrow's date #}
- {% set tomorrow_date = (now() + timedelta(days=1)).date() %}
- {# Determine if the extracted date is tomorrow #}
- {% if extracted_date == tomorrow_date %}
- opacity: 0.5;
- {% else %}
- opacity: 1;
- {% endif %}
- }
- entity: sensor.next_solar_noon_time
- prefix: "Noon: "
- - type: state-label
- title: sunset
- style:
- transform: none
- left: 1%
- top: 45%
- font-size: 90%
- card_mod:
- style: |
- :host {
- {% set datetime_value = as_timestamp(state_attr('sun.sun','next_setting')) | timestamp_custom('%Y-%m-%d %H:%M:%S') %}
- {# Extract the date from the datetime value #}
- {% set extracted_date = strptime(datetime_value, '%Y-%m-%d %H:%M:%S').date() %}
- {# Calculate tomorrow's date #}
- {% set tomorrow_date = (now() + timedelta(days=1)).date() %}
- {# Determine if the extracted date is tomorrow #}
- {% if extracted_date == tomorrow_date %}
- opacity: 0.5;
- {% else %}
- opacity: 1;
- {% endif %}
- }
- entity: sensor.next_sunset
- prefix: "Sunset: "
- - type: state-label
- title: dusk
- style:
- transform: none
- left: 1%
- top: 54%
- font-size: 90%
- card_mod:
- style: |
- :host {
- {% set datetime_value = as_timestamp(state_attr('sun.sun','next_dusk')) | timestamp_custom('%Y-%m-%d %H:%M:%S') %}
- {# Extract the date from the datetime value #}
- {% set extracted_date = strptime(datetime_value, '%Y-%m-%d %H:%M:%S').date() %}
- {# Calculate tomorrow's date #}
- {% set tomorrow_date = (now() + timedelta(days=1)).date() %}
- {# Determine if the extracted date is tomorrow #}
- {% if extracted_date == tomorrow_date %}
- opacity: 0.5;
- {% else %}
- opacity: 1;
- {% endif %}
- }
- entity: sensor.next_dusk
- prefix: "Dusk: "
- - type: state-label
- title: moon elevation
- style:
- transform: none
- right: 1%
- top: 0%
- font-size: 90%
- font-weight: 700
- entity: sensor.astroweather_backyard_moon_altitude
- prefix: "Elevation: "
- - type: state-label
- title: moon azimuth
- style:
- transform: none
- right: 1%
- top: 9%
- font-size: 90%
- font-weight: 700
- entity: sensor.astroweather_backyard_moon_azimuth
- prefix: "Azimuth: "
- - type: state-label
- title: moon phase
- style:
- transform: none
- right: 1%
- top: 18%
- font-size: 90%
- color: silver
- entity: sensor.moon
- - type: state-label
- title: moon illumination
- hold_action:
- action: more-info
- entity: camera.nasa_moon_image
- style:
- transform: none
- right: 1%
- top: 27%
- font-size: 90%
- color: silver
- background: rgba(255,255,255,.0)
- entity: sensor.astroweather_backyard_moon_phase
- prefix: "Illumination: "
- - type: state-label
- title: moonrise
- style:
- transform: none
- right: 1%
- top: 36%
- font-size: 90%
- card_mod:
- style: |
- :host {
- {% set datetime_value = as_timestamp(states('sensor.astroweather_backyard_moon_next_rising')) | timestamp_custom('%Y-%m-%d %H:%M:%S') %}
- {# Extract the date from the datetime value #}
- {% set extracted_date = strptime(datetime_value, '%Y-%m-%d %H:%M:%S').date() %}
- {# Calculate tomorrow's date #}
- {% set tomorrow_date = (now() + timedelta(days=1)).date() %}
- {# Determine if the extracted date is tomorrow #}
- {% if (extracted_date == tomorrow_date) or (states('sensor.astroweather_backyard_moon_altitude')|float(0) > 1) %}
- opacity: 0.5;
- {% else %}
- opacity: 1;
- {% endif %}
- }
- entity: sensor.next_moonrise
- prefix: "Moonrise: "
- - type: state-label
- title: moonset
- style:
- transform: none
- right: 1%
- top: 45%
- font-size: 90%
- card_mod:
- style: |
- :host {
- {% set datetime_value = as_timestamp(states('sensor.astroweather_backyard_moon_next_setting')) | timestamp_custom('%Y-%m-%d %H:%M:%S') %}
- {# Extract the date from the datetime value #}
- {% set extracted_date = strptime(datetime_value, '%Y-%m-%d %H:%M:%S').date() %}
- {# Calculate tomorrow's date #}
- {% set tomorrow_date = (now() + timedelta(days=1)).date() %}
- {# Determine if the extracted date is tomorrow #}
- {% if (states('sensor.astroweather_backyard_moon_altitude')|float(0) < 0) %}
- opacity: 0.5;
- {% else %}
- opacity: 1;
- {% endif %}
- }
- entity: sensor.next_moonset
- prefix: "Moonset: "
- - type: image
- tap_action: none
- double_tap_action: none
- hold_action: none
- image: /local/dashboard_photos/sun-icon.png
- style:
- width: 9%
- min-width: 39px
- card_mod:
- style: |
- :host {
- bottom: {{ (((states('sensor.sun_elevation')|float(0)))+2)|round(1) }}%;
- left: {{ ((states('sensor.astroweather_backyard_sun_azimuth')|float(0) / 360)*100)|round(1) }}%;
- opacity:
- {% set ele = states('sensor.sun_elevation')|float(0) %}
- {% set ele_start = -5 %}
- {% set ele_end = 3 %}
- {% set ele_range = ele_end - ele_start %}
- {% set min_opacity = 0.07 %}
- {% set adj_ele = ele - ele_start %}
- {% set calc_opacity = adj_ele / ele_range %}
- {% if ele < ele_start %}
- {{ min_opacity }};
- {% elif ele > ele_end %}
- {{ "1.0" }}
- {% else %}
- {% if calc_opacity < min_opacity %}
- {{ min_opacity }}
- {% else %}
- {{ calc_opacity }}
- {% endif %}
- {% endif %}
- }
- - type: image
- tap_action:
- action: more-info
- double_tap_action: none
- hold_action:
- action: more-info
- entity: camera.nasa_moon_image
- camera_image: camera.nasa_moon_image
- entity: sensor.nasa_moon_phase_info
- style:
- width: 5%
- min-width: 28px
- card_mod:
- style: |
- :host {
- bottom: {{ (((states('sensor.astroweather_backyard_moon_altitude')|float(0)))+7)|round(1) }}%;
- left: {{ ((states('sensor.astroweather_backyard_moon_azimuth')|float(0) / 360)*100)|round(1) }}%;
- opacity:
- {% set ele = states('sensor.astroweather_backyard_moon_altitude')|float(0) %}
- {% set ele_start = -2 %}
- {% set ele_end = 3 %}
- {% set ele_range = ele_end - ele_start %}
- {% set min_opacity = 0.01 %}
- {% set adj_ele = ele - ele_start %}
- {% set calc_opacity = adj_ele / ele_range %}
- {% if ele < ele_start %}
- {{ min_opacity }};
- {% elif ele > ele_end %}
- {{ "1.0" }}
- {% else %}
- {% if calc_opacity < min_opacity %}
- {{ min_opacity }}
- {% else %}
- {{ calc_opacity }}
- {% endif %}
- {% endif %}
- {% set comment = "https://community.home-assistant.io/t/display-the-accurate-moon-phase-and-orientation-with-home-assistant-by-gui-only/723099/10" %}
- border-radius: 50% !important;
- clip-path: circle(43%) !important;
- }
- - type: state-label
- style:
- transform: none
- transform-origin: bottom left
- left: 0%
- bottom: 0%
- font-size: 100%
- font-weight: 600
- color: grey
- entity: sensor.dummy_blank_sensor
- prefix: <East
- tap_action: none
- double_tap_action: none
- hold_action: none
- - type: state-label
- style:
- transform: none
- transform-origin: bottom right
- right: 0%
- bottom: 0%
- font-size: 100%
- font-weight: 600
- color: grey
- entity: sensor.dummy_blank_sensor
- tap_action: none
- double_tap_action: none
- hold_action: none
- prefix: West>
- - type: state-label
- title: full moon
- tap_action: none
- double_tap_action: none
- hold_action: none
- style:
- font-size: 120%
- color: lightgreen
- font-weight: 800
- entity: sensor.dummy_blank_sensor
- prefix: "Alert: Warewolves Tonight"
- card_mod:
- style: |
- :host {
- background: rgba(255,255,255,0.0);
- {% if is_state('sensor.moon','full_moon') %}
- opacity: 1;
- top: 94%;
- left: 50%;
- {% else %}
- opacity: 0;
- top: -99%;
- left: -99%;
- {% endif %}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement