Python: String empty or null?

Thank you for your quick response.

  1. I have stored the item name is the variable presenceLightAlter, so I don’t need quotes.
  2. I found that in the python helper docu, but seems that it is working without the pull.
  3. I think, I found that in the helper docu, too. Or I’m complety wrong
  4. Understood. But If I’m using you expression, then my string with the NULL value is true.
    .length() was not working for me, switched that back to len()
  File "/etc/openhab/automation/lib/python/core/log.py", line 96, in wrapper
    return function(*args, **kwargs)
  File "/etc/openhab/automation/lib/python/core/rules.py", line 108, in execute
    self.callback(inputs.get('event'))
  File "<script>", line 30, in switchLightOnOff
AttributeError: 'unicode' object has no attribute 'length'