The first two should result in a “door locked”: ON State, the last in a “door locked”: OFF.
I tried an enum as config:
- id: lockState
channelTypeUID: mqtt:switch
label: Smartlock Status
description: Status Nuki Smartlock
configuration:
stateTopic: devices/NukiHub/lock/state
off: "[unlocked, unlatched]"
on: locked
but results in:
2024-09-12 09:34:08.641 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command 'unlatched' from channel 'mqtt:topic:synology:nukiHub:lockState' not supported by type 'OnOffValue': No enum constant org.openhab.core.library.types.OnOffType.unlatched
or is it simply not possible to add more than one “condition”
I’m using UI-configuration. and regardless if I insert the enum in the “configure Channel” dialogue or directly in code - afters “Save”-ing the quotes are added.
that’s a good idea for item values, for my use case this would be enough. thanks!
I’d still like to know, if there’s a possibility to throw in multiple values for additional ON/OFF configuration!
funnily enough, if I save this in the “code”-section, it will automagically change into:
- id: lockState
channelTypeUID: mqtt:switch
label: Smartlock Status
description: Status Nuki Smartlock
configuration:
stateTopic: devices/NukiHub/lock/state
off: "[unlocked, unlatched]"
on: locked
and thus resulting into:
2024-09-13 11:13:57.704 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command 'unlatched' from channel 'mqtt:topic:synology:nukiHub:lockState' not supported by type 'OnOffValue': No enum constant org.openhab.core.library.types.OnOffType.unlatched
ok. Thanks for the help, I can wait. “Unlatch” is not a really long state, as it only applies to like 3secs. My inner Monk™ desires to reduce WARNings and be as smooth as possible!