NEWS
VIS formula in Object ID SOLVED
-
I am using WeatherCustom widget, is there a way to convert temperature from Celsius to Fahrenheit, for example by using formula in Temperature ID. Something like
(ObjectID *9/5)+32![6b39a171-bae5-4d64-9c66-9103fb6a7a71-image.png]
(/assets/uploads/files/1585194027712-6b39a171-bae5-4d64-9c66-9103fb6a7a71-image.png)Apparently, this feature works only for widgets with HTML property. It will be great to clarify it in VIS Wiki
-
I am using WeatherCustom widget, is there a way to convert temperature from Celsius to Fahrenheit, for example by using formula in Temperature ID. Something like
(ObjectID *9/5)+32![6b39a171-bae5-4d64-9c66-9103fb6a7a71-image.png]
(/assets/uploads/files/1585194027712-6b39a171-bae5-4d64-9c66-9103fb6a7a71-image.png)Apparently, this feature works only for widgets with HTML property. It will be great to clarify it in VIS Wiki
@ap2017 Install the Javascript Adapter and in Userdata.0 create a new Datapoint as Number.
The goto Javascript and create a new "Javascript".
Insert this and Edit for your needs:on({id: 'accuweather.0.Current.Temperature'/* <<< This has to be your AccuWeather Temp. No matter which one*/, change: "ne"}, function (obj) { setState("0_userdata.0.New_Object"/*<<<This has to be your new Datapoint*/, (getState("accuweather.0.Current.Temperature"/*<<< This has to be the same AccuWeather Temp. as above*/).val * (9 / 5) + 32), true); });then goto VIS and select the Object created in Userdata.0
-
@ap2017 Install the Javascript Adapter and in Userdata.0 create a new Datapoint as Number.
The goto Javascript and create a new "Javascript".
Insert this and Edit for your needs:on({id: 'accuweather.0.Current.Temperature'/* <<< This has to be your AccuWeather Temp. No matter which one*/, change: "ne"}, function (obj) { setState("0_userdata.0.New_Object"/*<<<This has to be your new Datapoint*/, (getState("accuweather.0.Current.Temperature"/*<<< This has to be the same AccuWeather Temp. as above*/).val * (9 / 5) + 32), true); });then goto VIS and select the Object created in Userdata.0
-
@CrunkFX Thank you. Can same be done by binding ObjectID in widget? Something like:
{objectID;*(9);/(5);+(32);} For some reason it does not work for me.@ap2017 sagte in VIS formula in Object ID:
@CrunkFX Thank you. Can same be done by binding ObjectID in widget? Something like:
{objectID;*(9);/(5);+(32);} For some reason it does not work for me.Yes you can just use bindings in vis for calculations.
“ You can use this pattern in any text, like
My calculations with {objectID1;operation1;operation2;...} are {objectID2;operation3;operation4;...}
or color calculations:#{objectRed;/(100);*(255);HEX2}{objectGreen;HEX2}{objectBlue;HEX2}
“
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden