cancel
Showing results for 
Search instead for 
Did you mean: 

Would welcome advice on script to manage Nest thermostat settings

Wombat37
Community Member

It's a long story, but I'll try and keep it short 🙂

My house was built about 50 years ago. It has a hot water baseboard radiator central heating system. The builder cleverly didn't lag the copper pipes that were routed through outside walls. The subsequent owner subsequently installed a ceiling in the basement which further thermally isolated these pipes from any internal heat. Everything works okay until I light my wood stove, and the central heating turns off because the ambient temperature rises above the setpoint on the Nest thermostat - the pipes then freeze in the walls.

I'm trying to develop a Google Home Script to turn on the central heating for just 5 minutes on the hour, every hour. Logically this looks to be simple, but I can't seem to implement it as a script. I attach the script below.

The problems I have are as follows:

  1. Is there an easier way of calling the script on the hour rather than putting in a collection of 24 time starters
  2. How can I tell if the ambient temperature is greater than the setpoint in the Condition section? Both can be accessed in separate lines.
  3. How can I make relative changes to the setpoint (like increasing it by 20F and then returning it back to the original)? I want to preserve the original Nest schedule entered in Home.
  4. Why is my script editor reversing the device order? E.g. it likes "device: Family Room - Thermostat" but rejects "device: Thermostat - Family Room". All the documentation and examples seem to use the latter. 

Hopefully, these problems are due to my ignorance, and I would greatly welcome any advice here. I can program in several languages, but this one is totally new to me.

Many thanks in advance!

 

 

metadata:
name: Family Room Thermostat Watchdog
description: Hourly triggers heating when a wood fire would otherwise prevent it

automations:
# ---- STARTERS ---- #
# Start on the hour, every hour.
starters:
- type: time.schedule

   at: 1:00 am
- type: time.schedule
   at: 2:00 am
- type: time.schedule
   at: 3:00 am
- type: time.schedule
   at: 4:00 am
   etc... 

 

# ---- CONDITIONS ---- #
# Only activate if ambient temperature is above setpoint (or else CH is still active)
condition:
type: device.state.TemperatureSetting
device: Family Room - Thermostat
state: thermostatTemperatureAmbient
greaterThan: thermostatTemperatureSetpoint

 

# ---- ACTIONS ---- #
# Raise setpoint by 20F for just 5 min
actions:
# Raise temperature by 20F
- type: device.command.ThermostatTemperatureSetpoint
   devices: Family Room - Thermostat
   thermostatTemperatureSetpoint: thermostatTemperatureSetpoint+20F

# Hold for 5 min
- type: time.delay
   for: 5 min

# Lower temperature back by 20F
- type: device.command.ThermostatTemperatureSetpoint
   devices: Family Room - Thermostat
   thermostatTemperatureSetpoint: thermostatTemperatureSetpoint-20F

 

1 REPLY 1

GeremiG
Community Specialist
Community Specialist

Hi @Wombat37!

 

Thank you for posting in the community. I can understand how important it is for you to turn on the central heating in your house using automations. I appreciate your efforts in taking those steps before. I'm happy to help you! 

I want to share with you the following articles that will help you with your home automation: Create advanced home automations with the script editor. Write scripted automations with the script editor.

Let me know how it goes.

 

Best regards,
Geremi