I have a particle sensor under tasmota.... I get the payload in the format
Payload:{"Time":"2021-12-06T10:53:53","BME280":{"Temperature":22.3,"Humidity":38.2,"DewPoint":7.4,"Pressure":997.8},"VINDRIKTNING":{"PM1":895,"PM2.5":8,"PM10":33},"PressureUnit":"hPa","TempUnit":"C"}
...
$string(VINDRIKTNING.PM1) works
$string(VINDRIKTNING.PM2.5) does not work
$string(VINDRIKTNING.PM10) work
...
How can I mask the dot at 2.5?
edje11
2
Feed your payload trough a json node and everything is handled for you, no need to works with strings.
You need to use the alternate syntax VINDRIKTNING["PM2.5"]
instead
works perfectly
Thanks a lot guys!
PS.:
Does not work after all... the node does not complain, but the output value is wrong...
however,
$string(VINDRIKTNING."PM2.5")
Works as desired.
Thanks...
system
Closed
5
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.