CSC UI - Weather


Referring page: Custom Sprinkler Controller (CSC)

This is the yaml code for the weather UI component of my sprinkler controller. The temperature data is all reused yaml from an earlier weather post.


YAML:

  #####################################
  # BEGIN WEATHER DATA
  #####################################

        type: custom:vertical-stack-in-card
        cards:
          - type: custom:mushroom-title-card
            title: "Climate"
            #subtitle: "Temperature"

          ######## Begin SJ TEMPERATURE #########
          - type: custom:layout-card
            layout: horizontal
            min_columns: 1
            max_columns: 2
            column_num: 2
            sidebar_column: false

            cards:
              - type: custom:stack-in-card
                mode: horizontal
                cards:
                - type: custom:decluttering-card
                  template: san_jose_current_temp2
                #this has impact
                card_mod:
                  style: |
                    ha-card {
                      border: none !important;
                      box-shadow: none !important;
                    }

          ######### BEGIN 3DAY FORECAST ###################
          - type: custom:decluttering-card
            template: pop_up_temperature_panel_sprinklers
            variables:
              - entity_forecast_today: sensor.nachio_nachio_max_temperature_san_jose_forecast0
              - entity_forecast_t1: sensor.nachio_nachio_max_temperature_san_jose_forecast1
              - entity_forecast_t2: sensor.nachio_nachio_max_temperature_san_jose_forecast2

          - type: custom:stack-in-card
            cards:
              - type: custom:layout-card
                layout_type: grid
                layout:
                  grid-template-columns: 10% 40% 40% 10%
                  grid-template-rows: 1
                  grid-template-areas: |
                    "zone1 zone2 zone3 zone4"
                cards:

                  - type: custom:mushroom-chips-card
                    chips:
                      
                      - type: template
                        entity: sensor.nachio_weighted_avg_temp
                        icon: |
                          {% if states('sensor.nachio_weighted_avg_temp') | float() > 82 %}
                            mdi:sun-thermometer
                          {% elif states('sensor.nachio_weighted_avg_temp') | float() < 0 %}  
                            mdi:thermometer
                          {% else %}
                            mdi:snowflake-thermometer
                          {% endif %}
                        icon_color: |-
                          {% from 'weather.jinja' import icon_color_temp %}
                          {{ icon_color_temp('sensor.nachio_weighted_avg_temp') }} 
                        content: "Adjusted Temp: {{ states('sensor.nachio_weighted_avg_temp') | round(1) }}°F"
                        tap_action:
                          action: more-info
                        card_mod:
                          style:
                            mushroom-state-info$: |
                            .: |
                              ha-card {
                                border: none !important;
                                box-shadow: none !important;
                              }  
                    view_layout:
                      grid-area: zone2


                  - type: custom:mushroom-chips-card
                    chips:
                      - type: template
                        entity: sensor.nachio_duration_adjustment
                        #icon: mdi:weather-hazy
                        icon: |
                          {% if states('sensor.nachio_duration_adjustment') | float() > 0 %}
                            mdi:arrow-up-thick
                          {% elif states('sensor.nachio_duration_adjustment') | float() < 0 %}  
                            mdi:arrow-down-thick
                          {% else %}
                            mdi:timer-off-outline
                          {% endif %}

                        icon_color: |-
                          {% if states('sensor.nachio_duration_adjustment') | float() > 0 %}
                            green
                          {% elif states('sensor.nachio_duration_adjustment') | float() < 0 %}  
                            blue
                          {% else %}
                            grey
                          {% endif %}
                        content: "Additional Time: {{ states('sensor.nachio_duration_adjustment') }} min"
                        tap_action:
                          action: more-info
                        card_mod:
                          style:
                            mushroom-state-info$: |
                            .: |
                              ha-card {
                                border: none !important;
                                box-shadow: none !important;
                              }  
                    view_layout:
                      grid-area: zone3


          - type: custom:decluttering-card
            template: main_rain_ui
            #This below doesn't seem to be working to disable the border CY
            card_mod:
              style: |
                ha-card {
                  border: none !important;
                  box-shadow: none !important;
                }


          - type: custom:stack-in-card
            cards:
              - type: custom:layout-card
                layout_type: grid
                layout:
                  grid-template-columns: 10% 18% 24% 24% 24%
                  grid-template-rows: 1
                  grid-template-areas: |
                    "zone1 zone2 zone3 zone4 zone5"
                cards:
                  - type: custom:mushroom-chips-card
                    chips:
                      #*** Humidity ***
                      - type: template
                        #entity: sensor.gw1100b_uv_index
                        #icon: mdi:water-percent
                        #icon_color: blue
                        content: 'Today:'                            
                        tap_action:
                          action: none
                          #action: more-info
                          #entity: sensor.gw1100b_uv_index

                        card_mod:
                          style:
                            mushroom-state-info$: |
                            .: |
                              ha-card {
                                border: none !important;
                                box-shadow: none !important;
                              }  
                    view_layout:
                      grid-area: zone2           

                  - type: custom:mushroom-chips-card
                    chips:
                      - type: template
                        entity: sensor.pw_san_jose_precip_probability
                        icon: mdi:water-percent
                        icon_color: blue
                        content: | 
                          Probability: {{ states('sensor.pw_san_jose_precip_probability')}}%                         
                        tap_action:
                          action: more-info
                          entity: sensor.pw_san_jose_precip_probability

                        card_mod:
                          style:
                            mushroom-state-info$: |
                            .: |
                              ha-card {
                                border: none !important;
                                box-shadow: none !important;
                              }  
                    view_layout:
                      grid-area: zone3

                  - type: custom:mushroom-chips-card
                    chips:
                      - type: template
                        entity: sensor.nachio_nachio_rain_forecast_san_jose
                        icon: mdi:water-percent
                        icon_color: blue
                        content: | 
                          Forecast: {{ states('sensor.nachio_nachio_rain_forecast_san_jose')}}in                              
                        tap_action:
                          action: more-info
                          entity: sensor.nachio_nachio_rain_forecast_san_jose

                        card_mod:
                          style:
                            mushroom-state-info$: |
                            .: |
                              ha-card {
                                border: none !important;
                                box-shadow: none !important;
                              }  
                    view_layout:
                      grid-area: zone4     

                  - type: custom:mushroom-chips-card
                    chips:
                      - type: template
                        entity: sensor.nachio_nachio_rain_today_san_jose
                        icon: mdi:water-percent
                        icon_color: blue
                        content: | 
                          Actual: {{ states('sensor.nachio_nachio_rain_today_san_jose')}}in                           
                        tap_action:
                          action: more-info
                          entity: sensor.nachio_nachio_rain_today_san_jose

                        card_mod:
                          style:
                            mushroom-state-info$: |
                            .: |
                              ha-card {
                                border: none !important;
                                box-shadow: none !important;
                              }  
                    view_layout:
                      grid-area: zone5