I’m encountering an issue with configuring a switch item in OpenHAB that communicates via MQTT. I’m trying to create an item to monitor the status of a battery widget and toggle between on and off.
However, when I try to change the status, I get the following error:
Command '0' from channel 'mqtt:topic:nukihub:batteryCritical' not supported by type 'OnOffValue': No enum constant org.openhab.core.library.types.OnOffType.0
Error Explanation: The error message indicates that the value '0' is not supported by the OnOffType since it expects either ON or OFF (in uppercase), rather than '1' and '0'.
The version in your first post should be the correct one. When you make a change to your configuration file, is openHAB recognising the change? You can see the change happening in the log, and also if you look at the Thing in MainUI?
I’m on 4.2.3, and it works fine with the configuration shown in your latest post. Assuming that your channel is actually receiving real integers, rather than integer strings…