Page 1 of 1

2 values, 1 text device.

Posted: Sunday 20 December 2020 21:12
by OedzesG
Hello all,

short question about updating a text sensor in Domoticz.

I have 2 user variables which contain content about a possible update-state and a link quality.

These user variables are updated directly from MQTT.

I would like for my dashticz dashboard that both values ​​are placed one below the other in the text device.

With:

Code: Select all

updateText (text)
I can update a text sensor but how do I get 2 different values ​​in 1 text sensor?

thnx!

Re: 2 values, 1 text device.

Posted: Sunday 20 December 2020 23:23
by waaren
OedzesG wrote: Sunday 20 December 2020 21:12 I can update a text sensor but how do I get 2 different values ​​in 1 text sensor?

Code: Select all

local text = dz.variables('var1').value 
text = text ..  '\n' .. dz.variables('var2').value
updateText (text)

Re: 2 values, 1 text device.

Posted: Saturday 26 December 2020 9:40
by OedzesG
@waaren

thnx!

marry christmas!