Just got a new multi-sensor that reports temperature. I can see temperature posts into the logs, now I want to send the temperature via a notification.
%value% should work. Did your rule actually trigger? It's set to the value of the triggering event. If you just try "Run Rule Actions," there is no trigger, and the value will not be updated. It should work when your sensor actually generates an event.
Thanks that may be the issue. it was reporting zero for %value%. So unless there is a log entry for temperature from this device, it will continue to report zero?
Also, I tried doing it in Dashboard. It shows the last temperature reading. If there a way to get the last reading into a rule just like dashboard does?
yeah, you have to save to a variable (and I think if you want in a dashboard it has to be a hub variable). The action to set it looks something like this:
It should really be the last value, not necessarily zero, and for new rules probably null. What really matters is the event (check "Events" on the device detail page for an authoritative source), though by default most drivers will also log an "info" log entry for those, too.
As @aaiyar mentioned, you could save the device attribute value to a variable and use it that way if needed. But for your rule, unless you're using the rule in an additional way (e.g., running the actions from a different rule), you wouldn't need it. It will work with "real" triggers.