Skip to content

vscode extension shows error wrongly with temperature variable in rules #320

@Spiev

Description

@Spiev

Good morning everyone!

I use a "virtual" temperature item to set a target temperature with the type "number:temperature". In the rules I use this item to compare the "target" with the "current" temperature. If target is higher, I switch on the powerplug of the electric heater.

The current temperature comes from an LoraWan device. The powerplug is an zigbee device from ikea.

Everything works fine. Except that vscode extension shows me an error. In my unterstanding, this is wrong. vscode extension error:
[{
"resource": "/c:/repo/openHAB/rules/noahheater.rules",
"owner": "generated_diagnostic_collection_name#0",
"code": "org.eclipse.xtext.xbase.validation.IssueCodes.incompatible_types",
"severity": 8,
"message": "Type mismatch: cannot convert from State to Number",
"startLineNumber": 7,
"startColumn": 32,
"endLineNumber": 7,
"endColumn": 50
}]

image
image
image
image

Here the technical informations from my system, which runs on a Raspberry Pi 3 Model B Plus Rev 1.3.

runtimeInfo:
version: 3.4.2
buildString: Release Build
locale: de-DE
systemInfo:
configFolder: /etc/openhab
userdataFolder: /var/lib/openhab
logFolder: /var/log/openhab
javaVersion: 11.0.18
javaVendor: Raspbian
osName: Linux
osVersion: 5.15.84-v7+
osArchitecture: arm
availableProcessors: 4
freeMemory: 132686304
totalMemory: 300888064
startLevel: 100
bindings:

  • mqtt
  • shelly
  • tado
  • tr064
  • tradfri
  • zigbee
    clientInfo:
    device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: false
    macos: false
    windows: true
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: windows
    pixelRatio: 1.5749999284744263
    prefersColorScheme: light
    isSecureContext: true
    locationbarVisible: true
    menubarVisible: true
    navigator:
    cookieEnabled: true
    deviceMemory: 8
    hardwareConcurrency: 8
    language: en-GB
    languages:
    • en-GB
    • en-US
    • en
    • de
      onLine: true
      platform: Win32
      screen:
      width: 1646
      height: 1098
      colorDepth: 24
      support:
      touch: false
      pointerEvents: true
      observer: true
      passiveListener: true
      gestures: false
      intersectionObserver: true
      themeOptions:
      dark: light
      filled: true
      pageTransitionAnimation: default
      bars: filled
      homeNavbar: default
      homeBackground: default
      expandableCardAnimation: default
      userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
      like Gecko) Chrome/110.0.0.0 Safari/537.36
      timestamp: 2023-03-03T08:12:00.146Z

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions