EricTRR
(Eric Trr)
April 15, 2026, 4:27pm
1
Hi, looking for some assistance with this automation to change the thermostat temp based on hourly pricing.
Using Home Assistant Green, Ecobee thermostat, and ComEd five-minute pricing.
When I test the automations (Run Actions), the automation runs correctly. But it is not running on its own when the five minute price has been under 5 cents for more than the set period of time. This is the current automations.yaml I’m using:
id: ‘redacted’
alias: Pre-cool when ComEd is cheap
description: ‘’
triggers:
entity_id: sensor.comed_five_minute_price
below: 5
for:
minutes: 10
trigger: numeric_state
conditions:
actions:
target:
entity_id: climate.my_ecobee
data:
temperature: 68
action: climate.set_temperature
action: notify.mobile_app_iphone_redacted
metadata: {}
data:
message: ‘"Pre-cooling; price={{ states(’‘sensor.comed_five_minute_price’‘)
}}"’
mode: single
id: redacted
alias: Restore temp when ComEd is expensive
description: ‘’
triggers:
entity_id: sensor.comed_five_minute_price
above: 10
for:
minutes: 10
trigger: numeric_state
conditions:
actions:
target:
entity_id: climate.my_ecobee
data:
temperature: 72
action: climate.set_temperature
action: notify.mobile_app_iphone_redacted
metadata: {}
data:
message: ‘"Price is high, restoring temperature; price={{ states(’‘sensor.comed_five_minute_price’‘)
}}"’
mode: single
EricTRR
(Eric Trr)
April 17, 2026, 4:50pm
2
Update. It started working but tends to take a few hours to work again after updating the automation (and restarting yaml or HA).
Numeric State triggers are often misunderstood… there is an article in the Community Cookbook Index that you may find helpful:
In an automation written to run when the heating drops below 20C, the trigger will fire when the temperature changes from 20 to 19.
trigger:
- platform: numeric_state
entity_id:
- climate.study
for:
hours: 0
minutes: 10
seconds: 0
below: 20
It will not fire again until the temperature rises above 20C and drops for a second time.
A trigger is an event… Not a state, but a change of state.
This topic is part of the community-driven cookbook where you can f…
Also, please follow Community Questions Guideline #11 by using the “Preformatted text” option on any code or configuration.
1 Like
EricTRR
(Eric Trr)
April 23, 2026, 4:00pm
4
- id: 'redacted'
alias: Pre-cool when ComEd is cheap
description: ''
triggers:
- entity_id: sensor.comed_five_minute_price
below: 5
for:
minutes: 10
trigger: numeric_state
conditions: []
actions:
- target:
entity_id: climate.my_ecobee
data:
temperature: 67
action: climate.set_temperature
- action: notify.mobile_app_iphone
metadata: {}
data:
message: '"Pre-cooling; price={{ states(''sensor.comed_five_minute_price'')
}}"'
mode: single
- id: redacted
alias: Restore temp when ComEd is expensive
description: ''
triggers:
- entity_id:
- sensor.comed_five_minute_price
above: 10
for:
hours: 0
minutes: 5
seconds: 0
trigger: numeric_state
conditions: []
actions:
- target:
entity_id: climate.my_ecobee
data:
temperature: 72
action: climate.set_temperature
- action: notify.mobile_app_iphone
metadata: {}
data:
message: '"Price is high, restoring temperature; price={{ states(''sensor.comed_five_minute_price'')
}}"'
EricTRR
(Eric Trr)
April 23, 2026, 4:21pm
5
Thanks for confirming the numeric state trigger as the likely cause. I’ll more into that.