Announcement

Collapse
No announcement yet.

How to round numbers while speaking?

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

  • How to round numbers while speaking?

    I do an hourly chime with temperature and humidity here. My temperatures speak to two decimals and I would like to round the number to a whole number.

    IE:

    Today is $date. The time is $time. The indoor temperature is $$DVR:2556: degrees, and Relative Humidity is $$DVR: 2444: percent. The outdoor temperature is $$DVR: 2580: degrees.

    I have tried to change $$DVR:2556: degrees to Round($$DVR:2556: /2,0) degrees and hear TTS saying Round and the extra 2 and 0.

    How do I round off the integer while speaking?
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.4X
    Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.4X

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

  • #2
    You may have to round the device value before you retrieve it. "&hs.SetDeviceValueByRef(2556, hs.DeviceValue(2556), False)" might do it.
    Mike____________________________________________________________ __________________
    HS3 Pro Edition 3.0.0.548

    HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF, Rain8Net+ | RFXCOM | QSE100D | Vantage Pro | Green-Eye | X10: XTB-232, -IIR | Edgeport/8 | Way2Call | Ecobee3

    Comment


    • #3
      I have an event that speaks the amount of electricity being used when I turn on the oven or dryer using the Brultech plugin. Often the spoken value goes out to 9 or 10 decimal places. I guess that would have to be modified within the plugin. It does sound impressive though.

      Comment


      • #4
        Thank-you guys. I am rounding off the number in the value display of the variable.

        This is a MQTT value and I think I can massage it when MQTT receives the value in the MQTT configuration.
        - Pete

        Auto mator
        Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.4X
        Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.4X

        X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

        Comment


        • #5
          If it’s an HS device, you can change decimals here:

          Click image for larger version

Name:	CF6B60CD-06CA-457A-9561-03C572A27907.jpeg
Views:	44
Size:	48.7 KB
ID:	1330537
          Michael

          HS3 Pro 3.0.0.470 | 849 devices | 349 events | OpenSprinkler | BLShutdown | EasyTrigger | NetCAM | Harmony Hub | Sonos | SDJ-Health | BLUPS | PHLocation | BLBackup | BLLock | Z-Wave 3.0.1.243 | weatherXML | Pushover 3P | Blue-Iris | AirPlaySpeak

          Comment


          • #6
            Thank you Michael.

            Yes was doing that for my temperature and humidity sensors.

            Click image for larger version  Name:	OutsideTemp2.jpg Views:	0 Size:	60.0 KB ID:	1330547

            It was relating to my TTS hourly chime reading of the reference variable and not knowing that I could TTS the value of the variable.

            Changing it now in the MQTT reference ID configuration. I had made the mistake of not putting the value in the right "slot".

            Now the TTS is a whole number temperature.

            Click image for larger version  Name:	MQTT.jpg Views:	0 Size:	111.0 KB ID:	1330548

            How would I change this line to TTS the value instead of the reference ID?

            Today is $date. The time is $time. The indoor temperature is $$DVR:2556: degrees, and Relative Humidity is $$DVR: 2444: percent. The outdoor temperature is $$DVR: 2580: degrees.

            - Pete

            Auto mator
            Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.4X
            Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.4X

            X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

            Comment

            Working...
            X