Nest locks users out of their own data

I have a CT80 with zwave control. Works well, but auto-creates four climate entities, heat_normal heat_econ, cool_normal, and cool_econ. Only difference is the default set-points between econ and normal. All other attributes and state values are the same across them all. So, I use the custom:Dual-Thermostat lovelace card to switch between heat_normal and cool_normal climate entities.

I also created two custom sensors, one for Operating Mode and another for Operating State. These are useful for automations, etc. Here’s the code:

#~~~~~~~~~~~~~~~~~~~~~~~~~
# custom sensor that tracks the mode set for the HVAC.
# This reports what its set to, not what its doing.
# All of the four CT80 "climate" entities show the same properties
# Use "heating" because its now wintertime, no other reason.
# While the fan could be forced on during non-off modes,
# only report "fan" as mode when system is otherwise off and fan is on.
#
- platform: template
  sensors:
    hallway_hvac_mode:
      friendly_name: 'Hallway HVAC Mode'
      value_template: >-
        {% if is_state('climate.hallway_thermostat_heating_normal', 'heat') %}
           Heat
        {% elif is_state('climate.hallway_thermostat_heating_normal', 'cool') %}
           Cool
        {% elif is_state('climate.hallway_thermostat_heating_normal', 'auto') %}
           Auto
        {% elif is_state('climate.hallway_thermostat_heating_normal', 'off') %}
           {% if is_state_attr('climate.hallway_thermostat_heating_normal', 'fan_state', 'Running') %}
              Fan
           {% elif is_state_attr('climate.hallway_thermostat_heating_normal', 'fan_state', 'Idle') %}
              Off
           {% else %}
              Off-unknown
           {% endif %}
        {% else %}
           On-unknown
        {% endif %}

#~~~~~~~~~~~~~~~~~~~~~~~~~~
# custom sensor that tracks the operating state of the HVAC.
# This reports what its doing, as opposed to what mode is set.
# Report Fan-only if fan is running and the system is neither
# actively heating or cooling, otherwise its Off.
- platform: template
  sensors:
    hallway_hvac_state:
      friendly_name: 'Hallway HVAC State'
      value_template: >-
        {% if is_state_attr('climate.hallway_thermostat_heating_normal', 'operating_state', 'Heating') %}
           Heating
        {% elif is_state_attr('climate.hallway_thermostat_heating_normal', 'operating_state', 'Cooling') %}
           Cooling
        {% elif is_state_attr('climate.hallway_thermostat_heating_normal', 'fan_state', 'Running') %}
           Fan
        {% elif is_state('climate.hallway_thermostat_heating_normal', 'off') %}
           Off
        {% elif is_state_attr('climate.hallway_thermostat_heating_normal', 'fan_state', 'Idle') %}
           Idle
        {% else %}
           Unknown
        {% endif %}

Oh, also I refresh the status of the thermostat ever five minutes with an automation. Polling only updates the set-point, not all the attributes, or the state.

#~~~~~~~~~~~~~~~~~
# Refresh thermostat information
#  CT 80 is not good at self updating when its state changes
#   This will refresh every five minutes
#   Note that it takes about 3 seconds for the thermostat
#    to update once requested.
#
- id: 'refresh_thermostat'
  alias: 'Refresh Thermostat Status'
  initial_state: true
  trigger:
    platform: time_pattern
    minutes: '/5'   # e.g., minutes divisible by five
    seconds: '00'   # seconds needed so it doesn't match every second of minutes
  action:
    service: zwave.refresh_node
    data:
       node_id: 3
1 Like