docs: @Override
    protected Integer convert(JsonValue jsonValue) {
      if (jsonValue instanceof JsonNumber) {
        return ((JsonNumber) jsonValue).intValue();
      } else if (jsonValue == JsonObject.TRUE) {
        return 1; // For at least one enum type (locks), homekit will send a true instead of 1
      } else if (jsonValue == JsonObject.FALSE) {
        return 0;
      } else {
        throw new IndexOutOfBoundsException("Cannot convert " + jsonValue.getClass() + " to int");
      }
    }