cancel
Showing results for 
Search instead for 
Did you mean: 

How to do simple math in Script Editor

JerryInTennesse
Community Member

I need to run additional fans when my AC unit can't keep my house temperature under control. I would like to monitor the current ambient temperature against my thermostat setpoint and turn them on when I see a 2 degree temperature difference. 

Ideally, I would like to assign a variable with a value that would be: thermostatTemperatureSetpoint + 2

Then I would like to create a starter that would be active when the thermostatTemperatureAmbient > variable

Unfortunately, I cannot find a way to do this, can anyone help?

Another option I thought of is to compare the ambient against the setpoint, and if the ambient is greater for a given time than start the fans.

Again, I cannot find a way to do this. Any thoughts or ideas?

 

3 REPLIES 3

1teegulley
Community Member

I just want to comment in case it helps with visibility. This is something I would like to do as well, and haven't found a solution.

I'd like to do something like set the temp like this: thermostatTemperatureSetpoint: thermostatTemperatureAmbient - 2 with the starter being greater than (or equal to)  a specific humidity value.

richrobuk
Community Member

I'm with you on this one too..

I have a simple heating system with an RF controlled Boiler. I want to be able to set my TRVs to a set point (variable) day by day and then have an automation that effectively reads:

starters:
- type: device.state.TemperatureSetting
state: thermostatTemperatureAmbient
device: <MY_TRV_DEVICE>
greaterThan: device. state.ThermostatTemperatureSetpoint

JerryInTennesse
Community Member

I went to HomeAssistant for a while but for me it was quite a headache setting up a server on a spare PC. I'm still hoping Google supports their script editor with new features and capabilities, but after 5 months I'm losing faith here too.