How to change bar to psi on widget
Posted: Sunday 28 April 2019 5:23
hi guys i got a question for you i like to change the Bar to Psi on a widget , but i cant find it any where , any help will be very appreciated
Open source Home Automation System
https://forum.domoticz.com/
You could use below dzVents script for that.WarLion wrote: Sunday 28 April 2019 5:23 hi guys i got a question for you i like to change the Bar to Psi on a widget , but i cant find it any where , any help will be very appreciated
Code: Select all
return {
on = {
devices = {xxx} -- change xxx to idx of your Pressure device in bar
},
execute = function(dz, item)
local psiDevice = dz.devices(yyy) -- change yyy to your new psi device (define as virtual sensor under dummy hardware as custom sensor )
local convHpa2Psi = 68.9475729318
psiDevice.updateCustomSensor(dz.round(item.barometer / convHpa2Psi,2))
end
}