Fridge Automation for Charcuterie

Hi, the last few days I’ve been learning to use hass.io to automate a fridge using some tasmota/sonoffs.
I first loaded hass.io on a virtualbox and started configuring the switches and playing my way into learning.
So when I was able to do some simple tasks I decided to start with the project, the simple description would be:

Use three switches that control:

1 Humidifier
2 Fridge
3 Dehumidifier

Using the input of a DHT22 sensor for Temperature and Humidity.
Here is the flowchart I’m trying to automate:

The flowchart shows the on/off trigger points of every device for each process, these aren’t correlative, all three trigger concurrently based on each device ruleset

Think about this project like automating a house with three rooms with different necessities but using the same sensors and switches

So the first thing I did was to configure the switches and then created two sensors.

Then the fun part began, don’t know why but I started with the drying process, being a newbie the first thing that I tried and made it work is to create a set of five automations that control the on/off of every switch

Made a table of truth of all the possible options, tested, it worked and went to bed as happy as you could imagine :slight_smile:

The following day I realized that going this way was going to be a PITA because I still need to automate the other two tasks. So I saved the whole automations in a text file and restarted…

This time I used the climate/generic thermostat, yes I duped it to work with both my sensors for temperature and humidity and being creative with the values, ac/heat options and carefully tuned options I made it work again with the same ruleset and not a single automation. Yes, I’m proud :blush:

Now is when I ask for help: do you guys have a better way to do this? given that I’m a newbie the answer is probably yes, could you give some ideas on how to better implement this?

Also, help regarding how to enable one of the processes while disabling the other would be great.

Thanks a ton

Pablo

addendum:

The tasmota/sonoff are controlled via MQTT and to test everything I publish packets using the HA interface

Here are the sonoffs and how I configured the screen for the drying process.


To control the fridge, given that I need to act on both temperature and humidity I’m using two thermostats. Since the sonoff fires a packet every 5 minutes, the photo shows the real temperature at home at the moment of the photo, yes its summer here :slight_smile:

Pablo

Without seeing the automations you’ve created, I don’t know how much I can help. Perhaps an input_select would be useful? Some of the automations could adjust their operation based on the state of the input_select.

Here’s an example that creates one called input_select.process_mode.

input_select:
  process_mode:
    options:
      - Fermentation
      - Drying
      - Age Meat

An automation’s trigger, condition and action can refer to the state of input_select.process_mode.

Here is how I have configured the switches, sensors and thermostats, I want to have a screen where I can select which process to use and show its particular variables. Been looking input select, not sure If I can put all of this in one branch, and disable the thermostats from the other branches.

Is there a better way to operate on sensors than the climate generic thermostat?

switch Heladera:
platform: mqtt
name: "Heladera"    
command_topic: "cmnd/sonoff4/power"
state_topic: "stat/sonoff4/POWER"
qos: 1
payload_on: "ON"
payload_off: "OFF"
retain: true