sky201503 / openhab

Automatically exported from code.google.com/p/openhab
GNU General Public License v3.0
0 stars 0 forks source link

historicstate and changedSince always return Uninitialized but minimumSince works for example #156

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Create a number or switch item
2.create rule to use or print .historicState. value (or changedSince)
3.Check logs and output

What is the expected output? What do you see instead?
ON/OFF or value but it always returns Uninitialized

What version of the product are you using? On what operating system?

1.0 on Ubuntu 12.04 32 bit desktop edition.

Please provide any additional information below.
This is my test code :

Switch Huismode             "huismode"                  (Status)    { knx="<4/1/2"}

rule "Wifi GalaxyS comes on"
when
    Item Network_GalaxyS changed
    then
        val seconds = (House_leave_time.state as DecimalType).intValue
        println("State van de huismode " + seconds + " seconden geleden, was " + Huismode.historicState(now.minusSeconds(seconds)))

    end

This is similar like the demo file :    println("2 hours ago, the temperature was 
" + Weather_Temperature.historicState(now.minusHours(2)) + " degrees.") 

the NumberItem.minimumSince(now.minusSeconds(60)) for example works and returns 
the correct value.

Any idea ?

Original issue reported on code.google.com by nicoat...@gmail.com on 23 Nov 2012 at 10:41

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Could this be a duplicate of  issue 102 , which has been been fixed in 1.1?

Original comment by kai.openhab on 24 Nov 2012 at 8:53