Help with Hysteresis

I need some help configuring hysteresis on an item. I have a channel containing an illuminance value from the weatherflowsmartweather binding and I would like to use hysteresis to set a switch that will control landscape lights.

However the switch item is not being populated (it shows “Err” in the sitemap) and the log shows the following warning. I’ve tried multiple formats for the lower= and upper= parameters without success.

[ui.internal.items.ItemUIRegistryImpl] - Exception while formatting value 'ON' of item LandscapeAutomation with format '%.1f %unit%': Conversion = 'u'

Thing

UID: weatherflowsmartweather:tempest:HB-00148563:ST-00145952
label: Tempest Sensor
thingTypeUID: weatherflowsmartweather:tempest
configuration: {}
bridgeUID: weatherflowsmartweather:hub:HB-00148563
channels:
  - id: illuminance
    channelTypeUID: weatherflowsmartweather:illuminance
    label: Illuminance
    description: Illuminance
    configuration: {}

Item:

Switch LandscapeAutomation  "Landscape Automation {channel="weatherflowsmartweather:tempest:HB-00148563:ST-00145952:illuminance" [profile="system:hysteresis", lower="1000 lx", upper="4000 lx", inverted="true"]}

Does anyone have any suggestions to help resolve this?

Thank you.
Jim

  • Platform information:
    • Hardware: Synology DS1821+
    • OS: DSM 7.1
    • openHAB version: 4.1.3 running in Docker

The error looks like the binding silently pushed a State Description Pattern to the Item when you linked it. Binding developers like to “help” end users by pushing what they think the formatting should be for Items. Unfortunately that tends to break things when you use a type changing profile like Hysteresis.

If you set the State Description pattern metadata to %s that should make the warning in the logs go away. I can’t say whether that’s the only problem but it should fix the warning in the logs and the Err on the sitemap.

Thank you RIch, adding %s to the State Description did eliminate the warning messages. I’m not 100% sure, but I think the hysteresis is setting the switch properly also. I will know for sure after sunset :slight_smile: