Integrations

Generic thermostat

Spook adds an action to the generic thermostat helper that changes the temperature of one of its presets, so an automation can move a preset without a trip to the helper's options.

The generic thermostat helper turns a heater or an air conditioner on and off, by a temperature sensor. Any switch can be the heater: a smart plug on an electric radiator, a relay on the boiler.

It can have presets: away, comfort, eco, home, sleep and activity, each with a temperature of its own. Pick away, and the thermostat heats to the away temperature. Those temperatures are set on the second page of the helper's options, and only there. An automation cannot change them: not a lower away temperature in the middle of winter, not a sleep temperature you set on your dashboard.

Spook adds an action for that: set preset temperature.

Actions

Spook adds one action to the generic thermostat integration. You find it wherever you add an action, marked with a 👻.

Set preset temperature

Changes the temperature of one preset of one or more generic thermostats, like the options of the helper do. Everything else stays as it is: the sensor, the heater, the tolerances, the minimum and maximum, and the other presets.

The change goes through the helper's own options, both pages of them, so Home Assistant checks it the same way it checks what you fill in there. Then Home Assistant reloads the thermostat, as it does after you save its options. The action returns once the thermostat is reloaded, so the next step of your automation already sees its new presets. A thermostat that already has the temperature you give is left alone, without a reload.

A preset the thermostat does not have yet is added, as filling it in on the options does. To take a preset away, give it null in YAML: temperature: null removes the preset, the way leaving it empty in the options does.

Every entity is checked before the first thermostat changes. An entity that is not a generic thermostat, or one set up in YAML, is refused with an error, and nothing changes. The thermostats change one at a time, in the order you give them.

Run by hand, the action takes an administrator, like the options of a helper do. Your automations can always run it. So can your scripts, unless a user who is not an administrator starts one.

How to use it

  1. Open the automation or script that should change the preset, and select Add action.
  2. Search for set preset temperature, and select Generic thermostat: Set preset temperature 👻.
  3. Choose the generic thermostats.
  4. Pick the preset, and fill in its new temperature.
  5. Select Save.

To take a preset away, switch the action to YAML with the three dots menu, and set the temperature to null.

Missing something here?

An action, an entity or a repair this integration should have? Say so. Stuck, or found a bug? There is help.