Please use ‘code fences’ to post code in this forum.
You don’t need that import in OH2; you must have looked at some quite old OH1 examples.
This creates a new variable to hold the timer handle every time the rule runs.
If you want a second run of the rule to do something about a timer started by an earlier run of the rule, don’t do that.
If you look at examples, you will see the timer handle variable being declared outside of any rule, so that it has an existence between repeat rule runs.
See " Simple Example: Timers Version "
Rules DSL is a loosely typed language.
kuhinja won’t be a string, it will be a state type object.
If you want a string, it is easily got -
var kuhinja = mqtt_topic_kuhinja_occupancy.state.toString
If you use the sendCommand() Action like that, it requires you to supply two strings.
sendCommand("mqtt_homie300_test_air_output1", "OFF")
it’s generally preferable to use the method on the Item though
mqtt_homie300_test_air_output1.sendCommand("OFF")
// or if this is a Switch type Item
mqtt_homie300_test_air_output1.sendCommand(OFF)