Shelly on-board automations (actions) - controlled by HA?

Hi there;

I recently moved some very basic automations from HA to 2 Shelly2PM’s for redundancy and reliability reasons.

The new setup is as follows;

-2x Shelly 2PM’s - both with AddOns and 4x temperature Sensors.
-The Temperature sensors monitor two locations redundantly (2 x 2), and depending on the temperature, turn the fan motor on Low Speed or High Speed. There is also a safety Vent - which one Shelly can control, which vents the heat during low temperatures when you are no longer using the Wood Heater - or more likely, during long nights when the wood burns out (and I would like to use the electric heater).

However when I had it with HA, I had a Derivative sensor based on rate of temperature change. High values of rate-of-change over 3 cycles, followed by a long slow rate of change, indicated the Wood was burnt out and the unit was cooling down. I used this data-set to declare the Wood Heater burnt out in HA, then turn on my Daikin Electric Heater. The issue is, the Daikin, and Flu Fan, use the same ducting. I can’t run both together, hence I must interlock them.

Because everything is on the Shelly, and very basic, I have no real way to enable/disable it’s automations (actions). Previously I had a master input_boolean that dictated if the Flu Fan automation could run or not.

I need something similar within the Shelly 2PM’s. Does anyone know how to enable or disable the Shelly automations, or set - unset the equivalent of an input boolean within the Shelly Devices?

Thanks

For Gen3+ devices you can use virtual components to allow communications between HA automations and Shelly automations/scripts.

2 Likes

This is really neat - I would LOVE to see a code example or two!

There is no code needed for that… you need to create a virtual component in the Shelly device UI and 90 second later the entity for this component will appear in HA. Yo can read about virtual components here Shelly - Home Assistant

2 Likes

Thanks Bieniu - I didn’t know about Virtual Components.

I will go check now and see what I can find.! :slight_smile:

Edit; just discovered I have deployed a Gen2 and Gen3 device in this application. The Gen3 has the virtual components - very easy. I will have a spare Gen3 here and will swap it in place of the Gen2. Weekend job!

Edit2; I can create the virtual component - it appears in HA as a switch.[name] however I can not include it as a Condition within the Shelly Actions. Any ideas?

No. I don’t know the Shelly automation ecosystem. You need to ask Shelly support.