I’m new to HA and a bit confused. I’m building a chicken brooder box with a generic thermostat controlling a heat lamp. I’m trying to build a configuration that will decrease the temperature of the thermostat 0.5 degrees a day at a specific time. Here’s the automation & script that I’ve figured out so far - I’m struggling with passing the current climate.brooder_box thermostat temperature to the script so I can make the new temp calculation and set it. Any help would be fantastic - Thank you!
Automation YAML
alias: Brooder Temp Decrease
description: Trigger Brooder Temp Decrease Script
trigger:
-platform: time
at: '14:00:00'
condition:
-condition: state
entity_id: climate.brooder_box
state: 'on'
-condition: and
conditions:
-condition: numeric_state
entity_id: input_nmber.brooder_delay
below: '1'
action:
- service: script.brooder_temp_decrease
data:
entity: climate.brooder_box.temperature
mode: single
Script YAML
brooder_temp_decrease:
alias: Brooder Temp Decrease
sequence:
- service: climate.set_temperature
target:
entity_id: climate.brooder_box
data:
temperature: {{climate.brooder_box.temperature | float - 0.5}}
mode: single