[SOLVED] Simply math calculation error

  • Platform information:
    • Hardware: CPUArchitecture/RAM/storage
    • OS: what OS is used and which version
    • Java Runtime Environment: which java platform is used and what version
    • openHAB version: 2
  • Issue of the topic:

I have this in my rule

var String local_string_yesterday = now.minusDays(1).toString("yyyy-MM-dd") + "T23:59:00.0000"
var Number local_number_wallplug2dailytotalenergy = (Z_way_number_WallPlug2_totalpower.state) - (Z_way_number_WallPlug2_totalpower.historicState(parse(local_string_yesterday)))
Number Z_way_number_WallPlug2_totalpower "Wallplug2 [%.3f]" (group_house_totalenergy) {channel="zway:zwayDevice:d5ec35fd:2:sensorMultilevel-ZWayVDev_zway_2-0-50-0"}
Error during the execution of rule 'dailytotalenergy': Unknown variable or command '-'; line 36, column 60, length 124

How do I need to do this correctly???