Hello,
I am new to the world of HA and am trying to port my FHEM scripts.
In FHEM I had a well-functioning dehumidification automation.
The script looked like this:
Your condition templates need to return a boolean true or false result though. What you have is empty if statements that return nothing. Try it like this instead:
The comparison operations ==, >, <, >= and <= return boolean true or false results. And you have combiled them correctly with logic (and) so the templates will now return boolean results and the conditions will pass if either of the templates returns true (“do if true”).
You also had your templates over multiple lines, (I assume for for readability). In this case you must use the multi-line character > on a line by itself and remove the quotes from around your template.
I have also removed the escaped single quotes inside the template as these are no longer necessary as there are no quotes outside a multi line template. The alternative is to use double quotes outside and single quote inside the template for a single line template, e.g.