[Solved]Display a different Variable value at the Dashboard [not with Blockly] but with dzVents

Moderator: leecollings

User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Display a different Variable value at the Dashboard with Blockly

Post by waaren »

besix wrote: Tuesday 30 April 2019 17:19 Thank you very much waaren for help, but I get an error in line 18
I just had it when I tried to modify it myself. Still important, I do not have to have the max only current
link to foto
https://prntscr.com/nir6sx
Please post logs and scripsts here between code display tags. Use the </> button
The setpointVariable should be defined as type float because that is the type of the setPoint attribute that will be written to it.
I don't understand what you mean with "Still important, I do not have to have the max only current" Please elaborate.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
besix
Posts: 99
Joined: Friday 25 January 2019 11:33
Target OS: Linux
Domoticz version: beta
Location: Poland
Contact:

Re: Display a different Variable value at the Dashboard with Blockly

Post by besix »

Ok, I will use </>
In the script, I need the current state of Set Point in the Device text
Ok, I set the variable float script is ok!
Gives max Set Piont

I just want to change it to work for each change of the Device Set Piont
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Display a different Variable value at the Dashboard with Blockly

Post by waaren »

besix wrote: Tuesday 30 April 2019 17:31 I just want to change it to work for each change of the setpoint
If I understand your requirement correctly this is all you need.

Code: Select all

return {
            on = {
                     devices = { 'SetPoint' }, -- change to name of your setpoint device
                 },
            
    execute = function(dz, item)
        setpointTextDevice = dz.devices('Setpoint text sensor')  -- change to name of your text device
        setpointTextDevice.updateText('Current setpoint : ' .. dz.utils.round(item.setPoint,1)  .. ' set at ' .. dz.time.rawTime)
    end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
besix
Posts: 99
Joined: Friday 25 January 2019 11:33
Target OS: Linux
Domoticz version: beta
Location: Poland
Contact:

Re: Display a different Variable value at the Dashboard with Blockly

Post by besix »

It was so easy.:)
Thank you. Works
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest