Sequential possibility to (de)activate devices

Hi there,

A time ago I found some standard possibility to make some sequential automation but I can not find it back.
Can somebody help me?

What I would like to do is the following:

I have a electrical boiler, heat pump and a electrical fan heater.
Depending the amount of sun generated power I measure at my grid meter I would like to activate in sequence:

Injection above 1000W → activate boiler

Boiler active & injection above 1100W → activate heat pump

Boiler active & heat pump active & injection above 1400> → activate electrical fan heater

offcourse everything with some time in between so I do not get a frequent on/off-function off the devices.

The same invert sequence I want to make to power them back off.

I am thinking to do it with an automation with logical ports, or is there a better way to do this?

Yes I know there are a lot of script of automations like Emhass, solar optimizer, … But I like to make it all by myself and understand how it has been “programmed” together. If I use scripts I am not able to find out fast, why is does not what I would like it does :slight_smile:

Sounds like you need to write automations with whatever triggers turning on and off whatever entities.

I think you mean integrations or custom integrations or apps here?

Scripts are the same as automations, except automations also include triggers.

and
The Home Assistant Cookbook - Index.

Something I have wondered about (I haven’t actually tried it) is to use generic thermostat for these kind of problems.

The critical observation is that most of the things you want to do are very similar to what is wanted for controlling heating or AC units - turn something on above a certain level.

The idea would be:

  • Use a sensor to feed the current power (instead of temperature) into the Generic Thermostat.
  • Set it to “cool” since you want it to turn on devices above a certain number.
  • Set the output to switch on the device.
  • Repeat 3 times for each of your devices (one thermostat for each device)

That way you get a nice UI to set the power levels:

The problem is you can’t change the wording:

  • Its says “current temperature”
  • The unit of measure is °C or °F

As I said at the beginning I haven’t tried it but its something I want to try when I have a need.


A quick update you need to create a temperature sensor (even if its really reporting power) to use with the generic thermostat - so its getting really kludgey now…