Page 1 of 1
How to change bar to psi on widget
Posted: Sunday 28 April 2019 5:23
by WarLion
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
Re: How to change bar to psi on widget
Posted: Sunday 28 April 2019 18:23
by waaren
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
You could use below dzVents script for that.
When not yet familiar with dzVents please start with reading
Get started Before implementing. Special attention please for
"In Domoticz go to Setup > Settings > Other and in the section EventSystem make sure the checkbox 'dzVents disabled' is not checked. Also make sure that in the Security section in the settings you allow 127.0.0.1 to not need a password. dzVents uses that port to send certain commands to Domoticz. Finally make sure you have set your current location in Setup > Settings > System > Location, otherwise there is no way to determine nighttime/daytime state."
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
}
Re: How to change bar to psi on widget
Posted: Monday 29 April 2019 7:02
by WarLion
mate thanks a lot you save me there , still not working as im noob on dzvent but you gave me the starting poin , and for that i thank you