Configuring HomeKit item enum metadata via UI

Hello,

I’m trying to configure my HomeKit setup to support the Linear z wave garage door controllers, which have a set of states that don’t match the default per the HomeKit documentation. The docs state that the enum values can be overridden at the item metadata level, but I’m doing this all via the UI, and just can’t seem to figure out how to create those metadata records so that they work. I’m sure I’m just overlooking this in the documentation but cannot seem to find it. Can someone point me in the right direction? Here are the enum values I’m trying to configure:

255 (open)
254 (opening)
253 (stopped)
252 (closing)
0 (closed)

Thank you!

you can do it in “Code” tab.
looks like this (Mapping of HEATING to HEAT, and OFF to OFF)

1 Like

Thank you! What’s the “directionality” of this? Is it:

255: OPEN

or would it be

OPEN: 255

Thank you!

Looks like it’s most likely OPEN: 255 as the proper format. Thank you!

1 Like

Final question, I hope. I’ve got the mapping working and it can open the doors it appears, but it doesn’t show proper state. The error says:

Wrong value 255.0 for GarageDoorOpener characteristic of the item SecondGarageDoor_BarrierState. Expected one of following [255.0, 0.0]. Returning CLOSED.

Wrong value 255.0 for GarageDoorOpener characteristic of the item SecondGarageDoor_BarrierState. Expected one of following [255.0, 0.0, 254.0, 252.0, 253.0]. Returning CLOSED.

I’m confused by this, as 255.0 is clearly an expected value per the log entry itself. Do I need to modify this Number item in some way to remove the decimals? My config looks like this:

value: GarageDoorOpener.CurrentDoorState,GarageDoorOpener.TargetDoorState
config:
  OPENING: 254
  CLOSING: 252
  CLOSED: 0
  STOPPED: 253
  OPEN: 255

Thank you!

hmm. strange. try to remove decimals or add “”, e.g. opening: “254”

The quotes seemed to fix it! I don’t fully understand why that would work, seems like a bug, but I do have one of the doors working properly now. The other is failing it’s secure Z-Wave pairing so that’s another but separate issue.

Thank you so much for the help!

1 Like