I have a lot of values needed to configure the temperature for our thermostat and trying to figure out the best way to store them. In my mind I’d like to have a data structure like:
home:
start_time: 06:00
end_time: 19:30
day_heat_temp: 68
night_heat_temp: 58
day_cool_temp: 73
night_cool_temp: 71
away:
start_time: 07:00
end_time: 19:30
day_heat_temp: 62
night_heat_temp: 55
day_cool_temp: 75
night_cool_temp: 75
company:
start_time: 05:30
end_time: 20:30
day_heat_temp: 70
night_heat_temp: 62
day_cool_temp: 71
night_cool_temp: 71
vacation:
start_time: 00:00
end_time: 23:59
day_heat_temp: 55
night_heat_temp: 55
day_cool_temp: 76
night_cool_temp: 76
where there are different house modes each with different time ranges for a more “comfortable” daytime temperature and a different temperature at night.
I’ve put all of this into a giant if/elif/else automation, but that doesn’t seem like the right way to go about this. I’ve thought about using the input_
constructs for my data, but also seems a bit ugly. What other ways of storing this type of configuration do people use?