And this is working exactly as I wish. It took me a little while to realize that mem1 is a switch to enable or disable the thermostat rule, so I had to create an entry for it in openhab (or manually enable it via the tasmota console)
The solution, if someone is going to blindly replicate me (turning the heater on if the temp is below 15, turning it off if above 19 - to be modified later via openhab), AND you happen to have the same temperature sensor (SI7021). If you have a different temp sensor, adjust appropriately.
from tasmota console:
backlog SwitchMode1 3; Rule 1; Rule 4; TelePeriod 60; SetOption26 1; SetOption0 0; poweronstate 0; mem1 0; mem2 19; mem3 15; var1 0
then set up the rule
Rule1 on system#boot do RuleTimer1 70 endon on Switch1#State do event toggling1=%mem1% endon on event#toggling1=0 do mem1 1 endon on event#toggling1=1 do mem1 0 endon on Rules#Timer=1 do backlog var1 0; RuleTimer1 70; power1 0 endon on tele-SI7021#temperature do backlog var1 1; RuleTimer1 70; event ctrl_ready=1; event temp_demand=%value% endon on event#ctrl_ready>%mem1% do var1 0 endon on event#temp_demand>%mem2% do power1 0 endon on event#temp_demand<%mem3% do power1 %var1% endon
If you want to understand the rules more, look at the rules cookbook thermostat example in detail, linked in my previous post. In short, the rule only takes action if the rule is engaged (mem1), and if the thermostat is actually reading correctly. If the temp is below mem3, it turns the heater on, and if the temp is above mem2, it turns the heater off.
==
Then, assuming you’re familliar with mqtt in openhab, configure the channels via your favourite method. I used the paperui interface. Adjust the channel to reflect your device (rather than my CNCRoom)
Upper temp limit:
state: cmnd/CNCSonoff/mem2
command: cmnd/CNCSonoff/mem2
Lower temp limit:
state: cmnd/CNCSonoff/mem3
command: cmnd/CNCSonoff/mem3
AutoThermostatEnabled
state: cmnd/CNCSonoff/mem1
command: cmnd/CNCSonoff/mem1
Manual Heater Power
state: stat/CNCSonoff/POWER
command: cmnd/CNCSonoff/POWER
Raw Sensor Output
tele/CNCSonoff/SENSOR
-- gives output that will need to be parsed, such as: {"Time":"2019-12-15T00:48:27","SI7021":{"Temperature":19.9,"Humidity":43.6},"TempUnit":"C"}
You then will have mqtt items exposed that you use in rules as you see fit. I will have a switch for if I’m using the shop. If this is changed, it will adjust the temperature limits accordingly. I’m suitably content this won’t result in my shop over-heating and burning down (and the heater used really is quite safe even if it was left on). The biggest risk will be if wifi goes out while I’m using the shop, and the tasmota doesn’t get the command to reduce the temperatures when I’m done. Given that I have persistence enabled, I suppose I could write some rules to notify me about loss of communication.
Anyway, thanks for your direction @vzorglub and @rossko57