My Nest Thermostat card config using thermostat-dark-card

Here is my sensors.yaml which gives error can you please check what is wrong?

 - platform: qnap
   host: 10.0.1.10
   port: 443
   ssl: true
   verify_ssl: false
   username: xxxx
   password: xxxx
   monitored_conditions:
     - status
     - system_temp
     - cpu_usage
     - cpu_temp
     - memory_percent_used
     - memory_free
     - memory_used
     - volume_percentage_used
     - drive_smart_status
     - volume_size_free
     - network_tx
     - network_rx
     - drive_temp

 - platform: radarr_upcoming_media
   host: 10.0.1.10
   port: 7878
   api_key: xxxx
   max: 10

 - platform: sonarr_upcoming_media
   api_key: xxxx
   host: 10.0.1.10
   port: 8989
   days: 7
   ssl: false
   max: 10


 - platform: afvalinfo
   resources:
     - gft
     - pbd
     - papier
     - restafval
     - trash_type_today
     - trash_type_tomorrow
   location: xxxx
   postcode: xxxx
   streetnumber: xx
   streetnumbersuffix: ""
   dateformat: "%d-%m-%Y"
   locale: "nl"
   timespanindays: 365
 - platform: template
   sensors:
     paper_days_until_collection:
       value_template: "{{ state_attr('sensor.afvalinfo_papier', 'days_until_collection_date') }}"

 - platform: template
   sensors:
     afvalinfo_next_trash_type_and_date:
       value_template: >
         {% set ns = namespace(minimum=365) %}
         {% set list = ['gft', 'papier', 'pbd', 'restafval','textiel'] %}
         {%- for l in list %}
         {%- set days = state_attr('sensor.afvalinfo_' ~l, 'days_until_collection_date')%}
         {%- if days != None and days < ns.minimum %}
         {%- set ns.minimum = days %}
         {%- endif %}
         {%- endfor %}
         {%- for l in list %}
         {%- set days = state_attr('sensor.afvalinfo_' ~l, 'days_until_collection_date')%}
         {%- if days == ns.minimum %}
         {{l}} · {{ states('sensor.afvalinfo_' ~l) }}
         {%- endif %}
         {%- endfor %}
 
 
 - platform: template
   sensors:

     - name: "Living Room Time to Temp"
       unique_id: living_room_time_to_temp
       icon: mdi:camera-timer
       unit_of_measurement: 'minutes'
       state: "{{ ((state_attr('climate.woonkamer','temperature')|float(0) - states('sensor.woonkamer_temperature')|float(0)) * state_attr('sensor.woonkamer_time_to_temp','rate_of_change')|float(0)/60)|abs|int }}"
       attributes:
         message: |
           {% if states('sensor.woonkamer_time_to_temp')|float(0) < 10 %}
            IN LESS THAN 10 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 16 %}
            IN 15 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 21 %}
            IN 20 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 26 %}
            IN 25 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 31 %}
            IN 30 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 36 %}
            IN 35 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 41 %}
            IN 40 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 46 %}
            IN 45 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 51 %}
            IN 50 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 56 %}
            IN 55 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 61 %}
            IN 1 HR
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 66 %}
            IN 1 HR 5 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 71 %}
            IN 1 HR 10 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 76 %}
            IN 1 HR 15 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 81 %}
            IN 1 HR 20 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 86 %}
            IN 1 HR 25 MIN
           {% elif states('sensor.woonkamer_time_to_temp')|float(0) < 191 %}
            IN 1½ HR
           {% else %}
            IN 2+ HR
           {% endif %}
         time_of_current_change_to_heating: >
           {{ states('input_datetime.hvac_current_heat_started') }}
         time_of_last_change_to_heating: >
           {{ states('input_datetime.hvac_heat_started') }}
         time_of_last_change_from_heating: >
           {{ states('input_datetime.hvac_heat_ended') }}
         elapsed_seconds: >
           {{ as_timestamp(states('input_datetime.hvac_heat_ended')) - as_timestamp(states('input_datetime.hvac_heat_started')) }}
         temp_at_last_change_to_heat: >
           {{ states('input_number.hvac_heat_start_temp') }}
         temp_at_last_change_from_heat: >
           {{ states('input_number.hvac_heat_end_temp') }}
         degrees_of_separation: >-
             {{ (states('input_number.hvac_heat_end_temp')|float(0) - states('input_number.hvac_heat_start_temp')|float(0))|abs|round(1,"even",0) }}
         rate_of_change: >
           {% if state_attr('sensor.woonkamer_time_to_temp', 'degrees_of_separation')|float(0) > 0 %}
            {{ state_attr('sensor.woonkamer_time_to_temp', 'elapsed_seconds')|float(0) / state_attr('sensor.woonkamer_time_to_temp', 'degrees_of_separation')|float(0) }}
           {% else %}
            0
           {% endif %}
         current_temp: >
           {{ states('sensor.woonkamer_temperature') }}
         target_temp: >
           {{ state_attr('climate.woonkamer','temperature') }}
         last_estimated_time_to_temp: >
           {{ ((state_attr('sensor.woonkamer_time_to_temp','temp_at_last_change_from_heat')|float(0) - state_attr('sensor.woonkamer_time_to_temp','temp_at_last_change_to_heat')|float(0)) * state_attr('sensor.woonkamer_time_to_temp','rate_of_change')|float(0))|abs|timestamp_custom('%H:%M:%S', true) }}

     - name: "Nest Heating Runtime"
       unique_id: nest_heat_runtime
       unit_of_measurement: 'seconds'
       state: "{{state_attr('climate.woonkamer','elapsed_seconds')|float(0) }}"

     - name: "Nest ECO Low"
       unique_id: nest_eco_low
       device_class: temperature
       unit_of_measurement: '°C'
       state: '19.5'

     - name: "Nest ECO High"
       unique_id: nest_eco_high
       device_class: temperature
       unit_of_measurement: '°C'
       state: '24.5'

     - name: "Nest ECO Temp"
       unique_id: nest_eco_temp
       state: >
         {% if states('sensor.nest_eco_low') < states('sensor.nest_setpoint') < states('sensor.nest_eco_high') %} none
         {% else %} eco
         {% endif %}

     - name: "Nest Humidity"
       unique_id: nest_humidity
       device_class: humidity
       unit_of_measurement: '%'
       state: "{{ states('sensor.woonkamer_humidity')|round(0,'even',0) }}"

     - name: "Nest HVAC Action"
       unique_id: nest_hvac_action
       state: "{{ state_attr('climate.woonkamer','hvac_action') }}"

     - name: "Nest HVAC Mode"
       unique_id: nest_hvac_mode
       state: "{{ states('climate.woonkamer') }}"
       attributes:
         hvac_off:  "{% if (states('climate.woonkamer') ==  'off') %} ✔ {% else %} ­{% endif %}"
         hvac_heat: "{% if (states('climate.woonkamer') == 'heat') %} ✔ {% else %} ­{% endif %}"
         hvac_cool: "{% if (states('climate.woonkamer') == 'cool') %} ✔ {% else %} ­{% endif %}"
         hvac_auto: "{% if (states('climate.woonkamer') == 'auto') %} ✔ {% else %} ­{% endif %}"

     - name: "Nest Preset Mode"
       unique_id: nest_preset_mode
       state: "{{ state_attr('climate.woonkamer','preset_mode') }}"
       attributes:
         none: "{% if (state_attr('climate.woonkamer','preset_mode') == 'none') %} ✔ {% else %} ­{% endif %}"
         eco:  "{% if (state_attr('climate.woonkamer','preset_mode') ==  'eco') %} ✔ {% else %} ­{% endif %}"

     - name: "Nest Heating Rate of Change"
       unique_id: nest_heating_rate_of_change
       unit_of_measurement: 'seconds/degree'
       state: "{{ state_attr('sensor.woonkamer_time_to_temp','rate_of_change')|float(0) }}"

     - name: "Nest Setpoint"
       unique_id: nest_setpoint
       device_class: temperature
       unit_of_measurement: '°C'
       state: "{{ state_attr('climate.woonkamer', 'temperature') }}"

     - name: "Nest Time to Temp Message"
       unique_id: nest_time_to_temp_message
       state: >
         {% if state_attr('climate.woonkamer','hvac_action') == 'off' %} SYSTEM IS OFF
         {% elif state_attr('climate.woonkamer','hvac_action') == 'idle' and states('climate.woonkamer') == 'heat' %} HEAT SET TO
         {% elif state_attr('climate.woonkamer','hvac_action') == 'idle' and states('climate.woonkamer') == 'cool' %} COOLING SET TO
         {% else %} {{ state_attr('sensor.woonkamer_time_to_temp','message') }}
         {% endif %}
       attributes:
         hvac_action: "{{ state_attr('climate.woonkamer','hvac_action') }}"

     - name: "Nest Temperature"
       unique_id: nest_temperature
       device_class: temperature
       unit_of_measurement: '°C'
       state: "{{ state_attr('climate.woonkamer','current_temperature')|round(1, 'half', default=0) }}"

      - name: "Nest Outside Temperature"
       unique_id: nest_outside_temperature
       device_class: temperature
       unit_of_measurement: '°C'
       state: "{{ (states('sensor.openweathermap_temperature')|float(0) + 0.5)|round(0,'floor',default=0) }}"

Ah, you’re still using legacy sensor configuration format.
The formatting and variable names are very different from Modern Configuration format.
For example, Living Room Time to Temp would need to be…

sensor:
  - platform: template
    sensors:
      living_room_time_to_temp:
        friendly_name: "Living Room Time to Temp"
        value_template: "{{ ((state_attr('climate.woonkamer','temperature')|float(0) - states('sensor.woonkamer_temperature')|float(0)) * state_attr('sensor.woonkamer_time_to_temp','rate_of_change')|float(0)/60)|abs|int }}"
        unit_of_measurement: 'minutes'

Hi Daniel

i got it partly working


but as you can see not all entities are working as they are non existing.

The 2nd card has numerous entities I added to augment my use of Nest Thermostat for heating.

  • Utility meters for my furnace runtime
  • input_datetime/script/sensors to track actual furnace filter usage in hours

These though are required to track the rate of heat rise to estimate how long it’s going to take to reach a new temp…


and are listed in my repository description:

and are manipulated by the automations I created.

Hey Daniel & group,

I am starting fresh with home assistant after a year away. Lots has changed. I tried to implement your latest implementation of the dark thermostat in most basic format (only including basic heater function) but cannot get it working. I am using MQTT Climate/HVAC integration and the default thermostat works fine - Per below:
image

However, the Dark Thermostat card does not appear and sensors are always showing as unknown (Except for Nest temp which has default 0 value). The first issue seems to be that my changing climate entities are not updating sensor values. If I can get this going, I can then start to look at the card / Dark thermostat display issue.
image

My Climate yaml looks like this:

mqtt:
  climate: !include climate.yaml

climate yaml file

- name: Climate Control
  unique_id: climate.living_room
  mode_command_topic: "nestModeCmd"
  mode_state_topic: "nestModeState"
  modes:
    - "auto"
    - "off"
  action_topic: "nestStateState"
  temperature_command_topic: "nestSetPointCmd"
  temperature_state_topic: "nestSetPointState"
  current_temperature_topic: "livingRoomTemp"
  precision: 0.5
  retain: true
  qos: 1
  temp_step: 0.5
  min_temp: 0
  max_temp: 50

And template sensor yaml is per below:

template: 
  - sensor: 
      !include template_sensors.yaml

Template_sensors yaml:

    - name: "Nest HVAC Action"
      unique_id: nest_hvac_action
      state: "{{ state_attr('climate.living_room','hvac_action') }}"

    - name: "Nest HVAC Mode"
      unique_id: nest_hvac_mode
      state: "{{ states('climate.living_room') }}"
      attributes:
        hvac_off:  "{% if (states('climate.living_room') ==  'off') %} ✔ {% else %} ­{% endif %}"
        hvac_heat: "{% if (states('climate.living_room') == 'heat') %} ✔ {% else %} ­{% endif %}"
        hvac_cool: "{% if (states('climate.living_room') == 'cool') %} ✔ {% else %} ­{% endif %}"
        hvac_auto: "{% if (states('climate.living_room') == 'auto') %} ✔ {% else %} ­{% endif %}"

    - name: "Nest Setpoint"
      unique_id: nest_setpoint
      device_class: temperature
      unit_of_measurement: '°C'
      state: "{{ state_attr('climate.living_room', 'temperature') }}"

    - name: "Nest Temperature"
      unique_id: nest_temperature
      device_class: temperature
      unit_of_measurement: '°C'
      state: "{{ state_attr('climate.living_room','current_temperature')|round(1, 'half', default=0) }}"

    - name: "Nest Outside Temperature"
      unique_id: nest_outside_temperature
      device_class: temperature
      unit_of_measurement: '°C'
      state: "{{ (states('sensor.openweathermap_temperature')|float(0) + 0.5)|round(0,'floor',default=0) }}"    

I’ve been through forums, read docs and been at it for a few days now. And struggling. Hoping you can see the obvious issue in front of me. Thanks in advance.

What does your climate.living_room entity look like?

Hi Daniel, I checked this and found 2 x immediate issues. 1) The entity name was climate.living_room_heater (Based on a previous version). 2) There is no hvac_action attribute. As soon as I manually updated the entity name to “climate.living_room”, the dashboard thermostat and temperature attributes all came to life. I am surprised the entity name did not auto update with updated .yaml, however, now realise this entity check should be my first action in future. I am not sure why hvac_action is missing but will now try to figure this out. Thanks!. Updated entity below
climate

My hvac_action states are either idle or heating. With a fancier thermostat you could also have hvac_action: cooling…

My hvac_action attribute was completely missing from climate.living_room entity. After adding the following line in the climate .yaml, the hvac_action attribute appeared and now everything works :ok_hand:

action_template: "{{ 'heating' if value == '1' else 'off' }}"

Once again, thanks for your help.

1 Like

Will this work with the original Nest, before Google bought it and re-branded it to Google Nest?

I am guessing it will as it is not dependent on the integration.
As long as your current climate entity & attributes that show up in HA looks like this, it will work…

I’ve finally fixed an issue nagging me for a while now which surfaced sometime last year where the last horizontal stack of 4 entities was not displaying properly (you could see the outline of the 4 buttons) until you did a browser refresh.

type: custom:vertical-stack-in-card
card_mod:
  style: |
    ha-card {
      color: white;
      border: none;
      font-size: 1.0rem;
      {% if is_state_attr('climate.living_room', 'hvac_action', 'heating') %}
        background: #EB6D00;
        border-bottom: 1pt solid #E65E00;
      {% else %}
        {% if is_state_attr('climate.living_room', 'hvac_action', 'cooling') %}
          background: #0055FF ; 
          border-bottom: 1pt solid #00008B;
        {% else %}
          background: #373F48 ;
          border-bottom: 1pt solid #2b333a;
        {% endif %}
      {% endif %}
    }
cards:
  - type: custom:thermostat-dark-card
    card_mod:
      style: |
        ha-card {
          color: white;
          border: none;
          font-size: 1.0rem;
          {% if is_state_attr('climate.living_room', 'hvac_action', 'heating') %}
            background: #EB6D00;
            border-bottom: 1pt solid #E65E00;
          {% else %}
            {% if is_state_attr('climate.living_room', 'hvac_action', 'cooling') %}
              background: #0055FF ; 
              border-bottom: 1pt solid #00008B;
            {% else %}
              background: #373F48 ;
              border-bottom: 1pt solid #2b333a;
            {% endif %}
          {% endif %}
        }
    entity: climate.living_room
    chevron_size: '50'
    step: '0.5'
    pending: '1'
    idle_zone: '2'
    hvac:
      states:
        'off': 'off'
        cooling: cool
        heating: heat
    attribute: hvac_action
    away:
      sensor:
        sensor: sensor.nest_eco_temp
    highlight_tap: true
  - type: entities
    entities:
      - type: custom:multiple-entity-row
        entity: sensor.nest_humidity
        name: Inside Humidity
        icon: mdi:none
        style:
          hui-generic-entity-row:
            $: |
              state-badge {
                display: none !important;
              }
    card_mod:
      style: |
        ha-card {
          border: none;
          color: white;
          font-size: 1.2rem;
          {% if is_state_attr('climate.living_room', 'hvac_action', 'heating') %}
            background: #EB6D00;
          {% else %}
            {% if is_state_attr('climate.living_room', 'hvac_action', 'cooling') %}
              background: #0055FF ; 
            {% else %}
              background: #373F48 ;
            {% endif %}
          {% endif %}
        }
  - type: entities
    entities:
      - entity: sensor.nest_outside_temperature
        name: Outside Temp
        icon: mdi:none
        style:
          hui-generic-entity-row:
            $: |
              state-badge {
                display: none !important;
              }
    card_mod:
      style: |
        ha-card {
          color: white;
          border: none;
          font-size: 1.2rem;
          {% if is_state_attr('climate.living_room', 'hvac_action', 'heating') %}
            background: #EB6D00;
          {% else %}
            {% if is_state_attr('climate.living_room', 'hvac_action', 'cooling') %}
              background: #0055FF ; 
            {% else %}
              background: #373F48 ;
            {% endif %}
          {% endif %}
        }
  - type: horizontal-stack
    card_mod:
      style: |
        ha-card {
          border: none;
          {% if is_state_attr('climate.living_room', 'hvac_action', 'heating') %}
            background: #EB6D00;
            border-bottom: 1pt solid #E65E00;
          {% else %}
            {% if is_state_attr('climate.living_room', 'hvac_action', 'cooling') %}
              background: #0055FF ; 
              border-bottom: 1pt solid #00008B;
            {% else %}
              background: #373F48 ;
              border-bottom: 1pt solid #2b333a;
            {% endif %}
          {% endif %}
        }
    cards:
      - type: custom:button-card
        entity: sensor.nest_hvac_mode
        name: MODE
        show_name: true
        tap_action:
          action: more-info
        color_type: icon
        state:
          - operator: template
            value: |
              [[[ return states['climate.living_room'].state === 'off' ]]]
            icon: mdi:none
            color: white
          - operator: template
            value: |
              [[[ return states['climate.living_room'].state === 'heat' ]]]
            icon: mdi:none
            color: rgb(239, 140, 0)
          - operator: template
            value: |
              [[[ return states['climate.living_room'].state === 'cool' ]]]
            color: blue
            icon: mdi:none
        show_state: false
        card_mod:
          style: |
            ha-card {
              color: white;
              border: none;
              font-size: .8rem !important;
              {% if is_state_attr('climate.living_room', 'hvac_action', 'heating') %}
                background: #EB6D00;
                border-bottom: 1pt solid #E65E00;
              {% else %}
                {% if is_state_attr('climate.living_room', 'hvac_action', 'cooling') %}
                  background: #0055FF ; 
                {% else %}
                  background: #373F48 ;
                {% endif %}
              {% endif %}
            }
             ha-icon { 
               background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24.1' height='24.1' viewBox='-282.6 655.7 611.9 511.8' fill='%23FFF'%3E%3Cpath d='M235.4 1039.5c-38.3 30.7-76.8 46.1-117.7 46.1-51.2 0-99.7-23-153.5-74.2-61.4-58.8-127.9-110-194.5-110-12.8 0-25.6 2.6-38.4 5.1-2.3.7-5.7 1-7.6-2.6-1.7-3.2 0-5.1 2.6-7.6 38.3-30.7 76.8-46.1 117.7-46.1 51.2 0 99.7 23 153.5 74.2 61.3 58.8 127.8 110 194.4 110 12.8 0 25.6-2.6 38.3-5.1 2.8-.5 5.9-1.2 7.6 2.6 1.6 3.3.1 5.1-2.4 7.6zM-194.5 991c38.3 0 76.8 18 115.2 56.3 46.1 43.5 97.2 84.4 145.9 84.4 10.2 0 20.5-2.6 28.2-5.1 2.6-.7 4.6.1 5.7 2.1 1.7 3.1-.6 5.6-.6 5.6-28.2 23-58.8 33.2-87 33.2-38.3 0-76.8-18-115.2-56.3-46.1-43.5-97.2-84.4-145.9-84.4-10.2 0-20.4 2.9-28.2 5.1-2.3.7-4.2.7-5.7-2.3-1.5-2.8.6-5.3.6-5.3 28.1-20.6 56.3-33.3 87-33.3zM327.4 799c-28.2 23-58.8 33.2-87 33.2-38.3 0-76.8-18-115.2-56.3-46-43.4-97.1-84.4-145.8-84.4-10.2 0-20.5 2.6-28.2 5.1-2.2.7-4.3.2-5.6-1.8-2.2-3.5.5-5.9.5-5.9 28.2-23 58.8-33.2 87-33.2 38.3 0 76.8 18 115.2 56.3 46.1 43.5 97.2 84.4 145.9 84.4 10.2 0 20.5-2.6 28.2-5.1 2.1-.8 4.3-1.1 5.7.7 1.5 2.1 1.9 4.5-.7 7zM81.9 811.9c61.4 58.8 127.9 110 194.5 110 12.8 0 25.6-2.6 38.3-5.1 2.6-.7 5.7-1.2 7.6 2.6 1.6 3.1 0 5.1-2.6 7.6-38.4 30.7-76.8 46-117.7 46-51.2 0-99.7-23-153.5-74.2-61.4-58.8-127.9-110-194.5-110-12.8 0-25.6 2.6-38.3 5.1-2.6.7-5.7.7-7.6-2.6-1.8-3.1 0-5.1 2.6-7.6 38.3-30.7 76.8-46.1 117.7-46.1 51.1 0 99.7 23.1 153.5 74.3z'/%3E%3C/svg%3E"); 
               background-position: 25%;
               background-position-x: 50%;
               background-position-y: center;
               background-repeat: no-repeat;
               height: 44px;
               margin: 0;
               auto 3px;
               width: 26px;            
             }
      - type: custom:button-card
        entity: sensor.nest_preset_mode
        name: ECO
        label: ECO
        tap_action:
          action: more-info
        color_type: icon
        color: green
        icon: mdi:none
        state:
          - operator: template
            value: >
              [[[ return states['climate.living_room'].attributes.preset_mode ==
              'none' ]]]
            icon: mdi:none
            color: white
        show_state: false
        show_name: true
        card_mod:
          style: |
            ha-card {
              color: white;
              border: none;
              font-size: .8rem !important;
              {% if is_state_attr('climate.living_room', 'hvac_action', 'heating') %}
                background: #EB6D00;
              {% else %}
                {% if is_state_attr('climate.living_room', 'hvac_action', 'cooling') %}
                  background: #0055FF ; 
                {% else %}
                  background: #373F48 ;
                  border-bottom: 1pt solid #2b333a;
                {% endif %}
              {% endif %}
            }
            ha-icon { 
              background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24.1' height='24.1' viewBox='0 0 26 24' fill='%23FFF'%3E%3Cpath class='st0' d='M.8 20.7c6.3 4.5 13.1 4.7 19-1.7 6.1-6.5 6.4-14.5 6.2-19-3.3 4-9.5 2.2-18.2 5C1 7.2.1 15.3 0 18.7c1.6-1.7 4.6-4.5 8.5-5.9 6.2-2.3 8.9-2.3 12.6-5.1-2.3 2.6-5.3 4.1-11.1 6.2-4.2 1.5-7.9 5.3-9.2 6.8z'/%3E%3C/svg%3E");
              background-position: 25%;
              background-position-x: 50%;
              background-position-y: center;
              background-repeat: no-repeat;
              height: 44px;
              margin: 0;
              auto 3px;
              width: 26px;            
            }
      - type: custom:button-card
        entity: climate.living_room
        name: SCHEDULE
        tap_action:
          action: more-info
        color_type: icon
        icon: none
        show_state: false
        show_name: true
        card_mod:
          style: |
            ha-card {
              color: white;
              border: none;
              font-size: .8rem !important;
              {% if is_state_attr('climate.living_room', 'hvac_action', 'heating') %}
                background: #EB6D00;
              {% else %}
                {% if is_state_attr('climate.living_room', 'hvac_action', 'cooling') %}
                  background: #0055FF ; 
                {% else %}
                  background: #373F48 ;
                  border-bottom: 1pt solid #2b333a;
                {% endif %}
              {% endif %}
            }
            ha-icon { 
              background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='24.1' fill='%23FFF'%3E%3Cpath d='M17 24.5H5c-2.8 0-5-2.2-5-5v-12c0-2 1.2-3.8 3-4.6v1c0 1.4 1.1 2.6 2.5 2.6S8 5.3 8 3.9V2.5h6v1.4c0 1.4 1.1 2.6 2.5 2.6S19 5.3 19 3.9v-1c1.8.8 3 2.5 3 4.6v12c0 2.8-2.2 5-5 5zm-1.7-7.9l-3.8-2.2V9c0-.6-.4-1-1-1s-1 .4-1 1V15.6s0 .1.1.1l.1.1.1.1s.1 0 .1.1l4.3 2.5c.5.3 1.1.1 1.4-.4.4-.6.2-1.2-.3-1.5zM16.5 5c-.6 0-1-.4-1-1V1c0-.6.4-1 1-1s1 .4 1 1v3c0 .6-.4 1-1 1zm-11 0c-.6 0-1-.4-1-1V1c0-.6.4-1 1-1s1 .4 1 1v3c0 .6-.4 1-1 1z'/%3E%3C/svg%3E");
              background-position: 25%;
              background-position-x: 50%;
              background-position-y: center;
              background-repeat: no-repeat;
              height: 44px;
              margin: 0;
              auto 3px;
              width: 26px;            
            }
      - type: custom:button-card
        entity: climate.living_room
        name: HISTORY
        tap_action:
          action: url
          url_path: https://home.nest.com/thermostat/02AA01AC28140A0G
        color_type: icon
        icon: mdi:none
        show_state: false
        show_name: true
        card_mod:
          style: >
            ha-card {
              color: white;
              border: none;
              font-size: .8rem !important;
              {% if is_state_attr('climate.living_room', 'hvac_action', 'heating') %}
                background: #EB6D00;
              {% else %}
                {% if is_state_attr('climate.living_room', 'hvac_action', 'cooling') %}
                  background: #0055FF ; 
                  border-bottom: 1pt solid #00008B;
                {% else %}
                  background: #373F48 ;
                {% endif %}
              {% endif %}
            }

            ha-icon { 

            background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg
            xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0
            0 26 24' fill='%23FFF' stroke='%23FFF'%3E%3Cpath stroke-width='.05'
            d='M12.5 24c-6.6 0-12-5.4-12-12s5.4-12 12-12c.6 0 1 .4 1 1s-.4 1-1
            1C7 2 2.5 6.5 2.5 12s4.5 10 10 10 10-4.5 10-10c0-.6.4-1 1-1s1 .4 1
            1c0 6.6-5.4 12-12 12zM22.9 8.4c-.5.2-1.1 0-1.3-.5-.2-.5
            0-1.1.5-1.3.5-.2 1.1 0 1.3.5.2.5 0 1.1-.5 1.3zm-3.6-3.7c-.4-.4-.4-1
            0-1.4s1-.4 1.4 0c.4.4.4 1 0 1.4-.4.4-1 .4-1.4 0zm-2.1
            11.7l-5.2-3s-.1
            0-.1-.1l-.1-.1-.1-.1-.1-.1v-.1-.1-.1-.1-.1-7.1c0-.6.4-1 1-1s1 .4 1
            1v6.4l4.7 2.7c.5.3.6.9.4 1.4-.4.6-1
            .7-1.5.5zm-1.1-14c-.5-.2-.8-.8-.5-1.3.2-.5.8-.8 1.3-.5.5.2.8.8.5
            1.3-.2.5-.8.7-1.3.5z'/%3E%3C/svg%3E"); 
              background-position: 25%;
              background-position-x: 50%;
              background-position-y: center;
              background-repeat: no-repeat;
              height: 44px;
              margin: 0;
              auto 3px;
              width: 26px;            
            }

At this point, there’s probably some redundant styings but at least it loads correctly the first time!

Hello,

I m new here.
I integrate the nest on HA but i have only 3 entity:
climate.living_room
sensor.living_room_humidity
sensor.living_room_temperature

Do you have more than 3 entity ?

No, only three is correct.

Do you have the code for the utility meters for furnace runtime and furnace filter usage?


image


image


image


image

image

alias: Furnace Filter Replaced
sequence:
  - service: input_datetime.set_datetime
    data:
      timestamp: "{{ now() }}"
    target:
      entity_id: input_datetime.furnace_filter_replaced
mode: single
alias: Furnace Filter Replaced
description: ""
trigger:
  - platform: state
    entity_id:
      - input_datetime.furnace_filter_replaced
condition: []
action:
  - service: utility_meter.calibrate
    data:
      value: "0"
    target:
      entity_id: sensor.furnace_filter_usage
mode: single

sensor:

  - platform: history_stats
    name: Furnace Filter Hours
    entity_id: sensor.nest_hvac_action
    type: time
    state: 'heating'
    start: '{{ as_timestamp(states("input_datetime.furnace_filter_replaced") ,0) }}'
    end: '{{ as_timestamp(now() ,0) }}'

  - platform: history_stats
    name: Norton Court Heating
    entity_id: sensor.nest_hvac_action
    state: 'heating'
    type: time
    start: '{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}'
    end: '{{ now() }}'

Thank you! How did you create the following sensors? I assume through Helpers?

  • sensor.norton_court_heating
  • sensor.furnace_runtime_weekly
  • sensor.furnace_runtime_monthly
  • sensor.furnace_runtime_annually
  • sensor.furnace_filter_replaced
  • sensor.furnace_filter_usage
  • sensor.furnace_filter_hours

Also, how did you configure the utility_meter.calibrate?

And 1 more question…
I want to include the state ‘cooling’ in sensor.nest_hvac_action in addition to ‘heating’

How would I accomplish this?



sensor:

  - platform: history_stats
    name: Furnace Filter Hours
    entity_id: sensor.nest_hvac_action
    type: time
    state: 'heating'
    start: '{{ as_timestamp(states("input_datetime.furnace_filter_replaced") ,0) }}'
    end: '{{ as_timestamp(now() ,0) }}'