Multiple sensors with generic (virtual) thermostat to control Nest

I have an issue where my second generation Nest thermostat sits right behind my TV. This creates a small but noticeable difference in temperature when the TV is on. Additionally, at night it tends to get warmer upstairs the colder it is outside. The heat may be on for longer which accumulates upstairs. Turning on the house fan regularly through Nest to circulate the air does not seem to help. It seems that secondary sensors are only compatible with third generation Nests on up.

I fixed this by using multiple sensors throughout the house and made my Nest thermostat a simple on/off switch for heat. I did this by turning off and deleting all schedules and turning off other non-essential features like motion presence (which never worked well for me anyway). I made sure to leave safety temperatures on.

An input select is used for selecting which thermostat/area you want to get temperature readings from. This effects a sensor template that looks for any changes to the input select and reports the temperature for which ever sensor/area was selected. This template sensor is used by the thermostat to tell what the temperature is.

An input boolean is used as a switch for the generic thermostat and to control the Nest by turning on and off as a triggered automation.


  • Use a sensor in the same room, but away from the TV to turn on/off the heat as needed
  • Third sensor to guide the temperature for better comfort while sleeping


  • Nest paired with HA
  • Turn off and remove extra features on your Nest (or similar thermostat)
  • Have available one or more sensors communicating and working with HA

I created a single file to configure this specific set of features. This is easier to share what I did as well as omitting it if I want to try something completely different. Then I instructed the configuration.yaml file to include it with this (included here as this feature was not immediately obvious to me when starting HA):

    multisensor_thermostat: !include custom_components/multisensor_thermostat.yaml


## multisensor_thermostat:altsysrq: v.01
## Use different sensors to help control the temperature

## Specify the room sensor that will control the temperature
    name: Temperature Control
      - Livingroom
      - Master Bedroom
      - Nest
    initial: Nest
    icon: mdi:eye

        name: "Thermostat Control"
        initial: off
        icon: mdi:power

  - platform: template
        friendly_name: "Primary Temperature Sensor"
        unit_of_measurement: 'F'
       #hidden: true
        value_template: >
          {% if is_state("input_select.primary_room_temp", "Livingroom") %}
            {{ float(states.sensor.aeotec_zw100_multisensor_6_temperature.state) }}
          {% elif is_state("input_select.primary_room_temp", "Master Bedroom") %}
            {{ float(states.sensor.samjin_button_0100bc75_1_1026.state) }}
          {% elif is_state("input_select.primary_room_temp","Nest") %}
            {{ float(states.sensor.living_room_thermostat_temperature.state) }}
          {% endif %}

  - platform: generic_thermostat
    name: Thermostat
    heater: input_boolean.thermostat_control
    target_sensor: sensor.primary_room_temp
    away_temp: '60'

  - alias: Thermostat Turn On
      platform: state
      entity_id: input_boolean.thermostat_control
      from: 'off'
      to: 'on'
      service: climate.set_operation_mode
        entity_id: climate.living_room
        operation_mode: 'heat'
  - alias: Thermostat Turn Off
      platform: state
      entity_id: input_boolean.thermostat_control
      from: 'on'
      to: 'off'
      service: climate.set_operation_mode
        entity_id: climate.living_room
        operation_mode: 'off'

Once you have this is in place and confirm it is working, set your Nest temperature to default to a higher than needed temperature. I set mine to 78. This is so when HA triggers it to turn on it will always heat your home.

I setup a separate trigger to switch from Nest to Livingroom when the TV was turned on and switch back when the TV was off. Additionally, I press a button at night to run a good night routine, which also switches the sensor to the Bedroom. In the morning, when motion is detected at specific times and areas, it switches back to Nest. These examples are not shown, but should be pretty easy to implement.

In the future I would like to make this work with summer conditions. I would also like to find a way of dedicating some type of interface to the Generic Thermostat.


  • Some features are taken away from the Nest. Some of the functionality of the Nest is very useful. To take features away seems like a poor approach to me.
  • A virtual (generic) thermostat requires some training with my family
  • Lack of interface for changing temperature is restricted (currently) to HA

Alternative Ideas

  • Trigger +1 or -1 degree changes to Nest above it’s built in sensor instead of directing it to be on/off. Basically, Nest_Sensor - Secondary_sensor = temperature_adjustment. Then add or subtract the difference to the existing temperature setting on Nest. Sorry if this is confusing. The logic to do this was not as simple as my above example.
  • Simply move my thermostat to a location away from the TV. I am still considering this.
  • Allow Nest to make changes to the Generic Thermostat. Set Nest default temp to be 78, if Nest is anything other than 78 (like 72), set that new temperature on the Generic Thermostat and reset the Nest back to 78. This gets a little confusing to think of all the issues that might arise and I risk created a logical loop, but maybe?
  • I would love to find a way of telling my second generation Nest to natively use secondary sensors.
  • Buy an Ecobee or third generation Nest with a second or third sensor.
  • Get a second Nest. Will that even work?

This was heavily inspired by wheezy’s motion sensing design: Motion sensor thermostat (Thank you sir!)