Help with (easy) Rule?

I stopped “playing” around with my Setup for a while (cause everything was running smooth) - and now im a little bit rusty when it comes to make a simple Rule... I cannot figure out what im doing wrong
I just want to get a telegram message if my Temperature geos above 50°C via Telegram

 rule "Speichertemp"
  when 
    Item WandthermostatSpeicher_Temp > 50
  then
    telegramAction.sendTelegram("Es ist sehr heiß auf dem Speicher")
end 
   WandthermostatSpeicher_Temp                "Speicher [%.1f °C]"            <temperature>   (Speichertemp)      {alexa="TemperatureSensor.temperature", channel="homematic:HmIP-STH:3014F711A0001F58A9A710DF:000E5A49A142DF:1#ACTUAL_TEMPERATURE"}

maybe someone can give a a hint …

You cannot put the comparison in the When line for the rule. Only certain specified triggers are allowed there. See the triggers section here:

You’ll need to change the trigger to something like:

Item WandthermostatSpeicher_Temp changed

and then test the value of the item state in the rule body.

1 Like
rule "Speichertemp"
  when 
    Item WandthermostatSpeicher_Temp changed
  then
    if (WandthermostatSpeicher_Temp.state > 50)
         telegramAction.sendTelegram("Es ist sehr heiß auf dem Speicher")
end 
1 Like

A vital detail missing is what type of Item is involved. As it is linked to a homematic channel, I should guess it is a Number type Item?

If it were a Number:Temperature type, you would need to do the comparison a little differently.

your when is badly buggered up
options:

Item <item> received command [<command>]
Item <item> received update [<state>]
Item <item> changed [from <state>] [to <state>]

so when

when 
    Item WandthermostatSpeicher_Temp changed

or

    Item WandthermostatSpeicher_Temp  received update

then… if this or that ect…

notice anything in [ ] is optional so

when 
    Item WandthermostatSpeicher_Temp  received command

or

when 
    Item WandthermostatSpeicher_Temp  received update

or

when 
    Item WandthermostatSpeicher_Temp  changed

will all trigger an event. Do your comparison in the

then

note that case (upper and lower case) counts

Thanks for your Help - i will try to figure this out and post my updated Rule

1 Like