[SOLVED] VScode: Ambiguous feature call

  • Platform information:
    • Hardware: Raspberry Pi 3 Model B Rev 1.2_
  • OS: Raspbian GNU/Linux 8 (stretch)
  • OpenJDK Runtime Environment (Zulu (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 :frowning:

This is telling you that postUpdate accepts 2 ways for typing the arguments

postUpdate(Item, State)
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)

And this got rid of the error. :+1:
Thank you!