Max_G
(Max G)
1
- Platform information:
- Hardware: Raspberry Pi 3 Model B Rev 1.2_
- OS: Raspbian GNU/Linux 8 (stretch)
- OpenJDK Runtime Environment (Zulu 8.31.1.122-linux_aarch32hf) (build 1.8.0_181-b122)
- openHAB Version: OH2.4.0-1 (apt-get), text-based config
- binding = expire1,fritzboxtr0641,mqtt1,weather1,astro,exec,network,ntp,systeminfo,logreader
- ui = paper,basic,classic
- persistence = rrd4j,mapdb
- action = mail,mqtt
- transformation = map,javascript,xslt,scale,jsonpath
- misc = restdocs
I am getting this error:
No idea how to get rid of it
vzorglub
(Vincent Regaud)
2
This is telling you that postUpdate accepts 2 ways for typing the arguments
postUpdate(Item, State)
or
postUpdate(Item, Number)
VSCode is telling you that it doesn’t know with one to use as it can’t decide what type is ar_RainTotal.deltaSince(startOfDay, "rrd4j")
According to the docs:
<item>.deltaSince(AbstractInstant)
Gets the difference in value of the State of a given Item since a certain point in time
So you could try:
ar_RainToday.postUpdate(ar_RainTotal.deltaSince(startOfDay, "rrd4j%) as Number)
2 Likes
Max_G
(Max G)
3
And this got rid of the error.
Thank you!