Can figure out web UI rule configuration, temp above 24 send command and temp below send command

Hello, ive just dived into using webui configuration of my rules

I have a thermostat reporting temperature in a room
A ventilation system where i can send a command High or low
I want to simple send command High when temperature is above 24
And Low command when under 23
Before i used =>24 in textual rules.

But webui rule configuration confuses me

Don’t use it then. File based rules are still available.

Maybe write a file rule and then take the learning opportunity to convert it to GUI.

Beware of units of measurement, if comparing temperatures.

1 Like

Thank’s for the answer but it is so simple it should be self explanitory to do this in UI, it is as simple as a rule can get.
But Athom homey gets more and more compelling with answers like this :slight_smile:

Not to be rude

First, plug it in? We’ve no idea how far you’ve got or what you have tried or what problems you have encountered. Answer quality reflects question quality.
What do you really need help with, how to click and select a rule trigger? How to choose a rule trigger? Etc.

You need two rules. One for when it goes high and another one when it goes low.

You can use a Condition (but only if…) section to do the comparison.

If you want to do it all in one rule you’ll need to use a Script Action and write it as coffee just like you do now.

Is this programmer-speak that I’m not familiar with, or an autocorrect typo? Either way, :coffee: :+1:

Google insists on replacing code with coffee and if in not wearing my reading glasses I don’t always notice. I are really speak gooder than I type. :wink:

1 Like
rule "Vaskerom Avtrekk temperatur"

       Item ZWave19ThermostatVaskeromSensorTemperature2 changed
    if (Double::parseDouble(ZWave19ThermostatVaskeromSensorTemperature2.state.toString) > 24.5) {
       logInfo("Vaskerom over 24 grader", "Ventilasjon satt til hoy")
else if (Double::parseDouble(ZWave19ThermostatVaskeromSensorTemperature2.state.toString) < 23.5) {
       logInfo("Vaskerom under 23 grader", "Ventilasjon satt til lav")

2021-11-13 21:52:13.828 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID ‘Matrix-14’ failed: For input string: “24.3 °C” in Matrix

This is what I am having trouble with (as i recall something changed from 2.5OH to 3.0OH, cant for the life of me figure out what i need to change :slight_smile:

You don’t need all that parse-double-stringy stuff, just compare item.state with another temperature, not a plain numeric. Apples with apples.

if (yourItem.state > 24.5 | °C) {

I ended up using this rule that works quite well by its own

rule "Klima Ventilasjon vaskerom"
 	Item ZWave19ThermostatVaskeromSensorTemperature2 received update
 	logInfo("Vaskerom-Temperatur: ", ZWave19ThermostatVaskeromSensorTemperature2.state.toString())
 	if (SupplyFanWrite.state == 3 && ((ZWave19ThermostatVaskeromSensorTemperature2.state as Number).doubleValue > 24.5)) {
 	if (SupplyFanWrite.state == 4 && ((ZWave19ThermostatVaskeromSensorTemperature2.state as Number).doubleValue < 23.0)) {

But if I use the same rule to regulate Humidity in bathroom it cancels out the rule above

rule "Klima Ventilasjon Bad Fuktighet"
 	Item VentEAFBadOppeHumidity received update
 	logInfo("Bad-Fuktighet: ", VentEAFBadOppeHumidity.state.toString())
 	if (SupplyFanWrite.state == 3 && ((VentEAFBadOppeHumidity.state as Number).doubleValue > 50)) {
 	if (SupplyFanWrite.state == 4 && ((VentEAFBadOppeHumidity.state as Number).doubleValue < 40)) {

Washroom rule: the temperature is over 24*C therefore High command (4) is issued to the ventilation


IF bathroom rule, the humidity is below 40% it cancel out the rule for venting hot air from washroom

Ending with a loop HIGH (4) LOW(3) beeng sent out.
Ive disabeled the bathrom rule for now

What I am thinking, The washroom rule has triggered HIGH(4) the bathroom rule should not be allowed to issue a LOW(3) until the first rule has finished (going under 23*C) or vice verca

So … you might have just one rule triggered by either temp or humidity changing, and decide in the rule to run fan or not depending on both factors.