I want to send a text message + the battery value of a item and can’t get it working.
rule "Bewaking deurbel"
when
Item ShellyDeurbelLowBattery changed to ON or Item testSwitch changed
then
val telegramAction = getActions("telegram","telegram:telegramBot:BotHennie")
var String BatValue = ShellyDeurbelBatteryLevel.state.toString
logInfo("default.rules", "Bewaking deurbel : " + BatValue)
telegramAction.sendTelegram("Batterij deurbel laag " + BatValue)
end
The logline shows "Bewaking deurbel : 80 %" as expected but the last line gives a error
"Script execution of rule with UID 'OH3BatterijBewaking-2' failed: Conversion = '%' in OH3BatterijBewaking"