openhab-core: Switch item with linked channel and hysteresis profile leads to error on the item

I’m using openHAB 3.0 with docker on a linux host system.

My use case is an alarm indicating that the humidity in my bathroom is over a certain upper value. When this happens the bathroom fan is turned on to bring the humidity down. The fan should stay on until the humidity drops below a certain lower value.

For this I configured a switch item carrying the alarm value and linked it to the humidity sensor with a channel configured for the hysteresis profile.

The expected outcome should be a switch item handling the alarm value with the hysteresis in place. The current outcome is that the item goes into an error state.

The item configuration is:

image

The channel link configuration is:

image

As you can see in the screen shots, the state is “Err”. The probable cause might be the following log entry:

2020-12-30 00:41:22.012 [WARN ] [e.internal.SseItemStatesEventBuilder] - Exception while formatting value 'OFF' of item Badezimmer_Sicherheit_Feuchtigkeitsalarm with format '%.0f': f != java.lang.String

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 31 (6 by maintainers)

Commits related to this issue

Most upvoted comments

It’s going to require some kind of framework policy decision. Should linking an Item to a channel always allow the binding to ‘force-feed’ presentation metadata pattern and options? If not, why not? When there are multiple links, perhaps? And/or when target Item type does not match channel type?

Or add an option to the linking process, supply by default but allow denial by user selection?

This is all in “advanced use” area, but recent proliferation of system profiles and binding-specific profiles make it likely to come up more often.