dariusz
September 24, 2019, 5:47pm
1
I try to send 3 parameters in 1 notify message. But the syntax is wrong.
For 1 parameter it is O.K.
What could be wrong?
{
"message": "Temperatura jest {{ states('sensor.switch_sonoff_01_bme280_temperature') }} °C Ciśnienie jest {{ states('sensor.switch_sonoff_01_bme280_pressure') }} hPa Wilgotność jest {{ states('sensor.switch_sonoff_01_bme280_humidity') }} %",
"title": "Dzień dobry...!!!"
}
Some update - notify is sent (it was something else wrong).
But the message is format not in so good way.
I would like:
Hi...!!!
Temperature is xxx C
Humidity is xxx %
Pressure is xxx hPa
Means - in each row 1 parameter…
silvrr
September 24, 2019, 6:24pm
2
See the below as an example and let me know if you need more help.
This comes back as …
Today is September 24, 2019
The current temperature is 56 degrees Fahrenheit with a forecast of partlycloudy. The low temperature today is 63 degrees Fahrenheit with a high of 76.
The predicted rainfall today is None inches.
dariusz
September 24, 2019, 6:45pm
3
Well, this is what I have now. I.e. all in 1 row:
"Hi...!!! Temperature is xxx C, Humidity is xxx %, Pressure is xxx hPa"
I wanted to have like this:
Hi...!!!
Temperature is xxx C
Humidity is xxx %
Pressure is xxx hPa
silvrr
September 24, 2019, 7:09pm
4
See the example I linked above. the {{ "\n" }}
provides a new line.
dariusz
September 24, 2019, 8:05pm
5
Perfect! This is what I wanted. Thx…
tom_l
September 24, 2019, 11:58pm
6
Could it also be done like this?:
message: >+
Temperature is {{ template}} C
Humidity is {{ template}} %
Pressure is {{ template}} hPa
1 Like
dariusz
September 25, 2019, 9:26am
7
OK. I’m not so experienced with ‚templates’… But I’ll look. Thank you.