So I just rewriting some of my automations to trigger off the outside temp instead of the season and was wondering if there is a better way to handle updating a single variable in multiple files (without creating a input_variable if possible)
Basically all my thermostat automations are a variation on this
id: Thermostat AC up at night
alias: Thermostat AC up at night
initial_state: 'on'
trigger:
- platform: time
at: "23:00:00"
condition:
- condition: numeric_state
entity_id: 'sensor.dark_sky_temperature_high_0d'
above: 85
action:
- service: climate.set_temperature
data:
entity_id: 2gig_technologies_ct101_thermostat_iris_cooling_1
temperature: 75
and I’d like to be able to just have the two temps be pulled from a central location instead of having to update 5-10 different files to adjust the trigger point / set points.
Side note I’m not even 100% sure this works since I just changed it from checking the season (summer/winter) and to using the high/low temp for the day but I’m not at my actual server to test it. so comments on that would be helpful.
Also I do not want to use Node Red so please don’t suggest it.
I hadn’t thought of using a script before (haven’t needed them for anything else so haven’t really read about them) but I’ll be reading up on them now. Might simplify a few things.
And yeah I meant input_number.
Thanks for the suggestions I’ll be going over them.
So the rules of this game exclude the use of an input_number? OK, how about an input_text? Or are all things beginning with the word ‘input’ forbidden? If so, you’ll need to find something else to store the threshold value. Although Home Assistant does not support global variables, there are two custom components available that provide this feature.
From my perspective, an input_number that you have an initial value set for, and that you don’t expose in the UI, is basically a global constant as long as you don’t write any automations that change it.
I feel there should be a way to do a global variable that isn’t an input. Once I get everything set up and the right temps figured out I don’t foresee changing them. If there isn’t a way to do a global variable without using an input_number then I’ll do that more wanted to know if there was a better way that I was not yet aware of.