Error running low humidity conditional statement

I have setup the low humidity conditional statement from the guide and the only thing I changed were the IDs associated with the humidity measure and the message. Any help would be greatly appreciated. I did find one post regarding a similar error but it did not seem to apply to me. Thanks in advance.

CODE:

humidity_too_low = 70

humidity_measure = self.condition("{d6d3a1ad}")  # Latest humidity measurement
if humidity_measure and humidity_measure <= humidity_too_low:
#if humidity_measure <= humidity_too_low:
    self.message += "Humidity is too low! Humidity is {} %".format(humidity_measure)
    self.run_action("{aa19b321}", message=self.message)  # Send email alert with current humidity

LOGS:
2021-11-24 11:23:30,104 - ERROR - mycodo.controllers.controller_conditional_0e095eef - Exception executing check_conditionals() on attempt 1 of 3. Waiting 10 seconds and trying again.
Traceback (most recent call last):
File “/var/mycodo-root/mycodo/controllers/base_controller.py”, line 124, in attempt_execute
func()
File “/var/mycodo-root/mycodo/controllers/controller_conditional.py”, line 182, in check_conditionals
self.conditional_run.message = message
AttributeError: ‘NoneType’ object has no attribute ‘message’

1 Like

For self.conditional_run to be None, your controller would have had to crash before the error you copied. You will need to review the entire log, from when the controller is activated, to determine the relevant error.