Announcement

Collapse
No announcement yet.

Energy math scripting

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

    Energy math scripting

    Hi,

    Hopefully someone can send me in the right direction.

    I have found a combine code for wattage, this script only combine watt and update a virtual device with the current W output. Triggered by "change" in reading
    Code:
        hs.setDeviceString(197,"",True)
        hs.setDeviceString(197,(hs.deviceValue(98) +hs.deviceValue(95)) & "Watt",True)
    
    End Sub
    The next script i wanna make is adding specific kWh readings each day as a total amount into a virtual device.
    Then reset the value every month back to zero.

    Can anyone help me with the coding? =)
    Last edited by entazee; January 7, 2016, 01:45 AM. Reason: Change code
Working...
X