Announcement

Collapse
No announcement yet.

Event referencing $$DVR

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Event referencing $$DVR

    I have a temperature sensor that unfortunately register with 8 decimal points so a temperature of 70 will display as 70.34562344. How do I display using the $$DVR in the event the temperature removing or using only 2 decimals from the temperature?

    Thanks,
    Aldo

    #2
    I had this issue with my 1-wire temperature / humidity sensors imported to HS3 via a script.

    I changed it in the script (I did not write the original script) using rounded to nearest whole number integer in the DIM statement for the variables on the top of the script using "short"

    See here for "short" use.

    Code:
    Sub Main(parm as object) 
        dim FTemp,CTemp,Humid as Short
    Not really sure how you would dynamically change the variable display $$DVR in the event.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
    HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

    HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

    Comment


      #3
      Thanks Pete.

      Comment

      Working...
      X