Open guangmin0622 opened 1 week ago
The fan in the example is shown as a switch type on Homekit. Can it be changed to percentage type?
homekit_accessory_t accessories[] = { HOMEKIT_ACCESSORY( .id = 1, // 配件 ID .category = homekit_accessory_category_fan, // 配件類別為風扇 .services = (homekit_service_t[]) { HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics = (homekit_characteristic_t[]) { &name, // 配件名稱 HOMEKIT_CHARACTERISTIC(MANUFACTURER, ACCESSORY_MANUFACTURER), // 製造商 HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, ACCESSORY_SN), // 配件序列號 HOMEKIT_CHARACTERISTIC(MODEL, ACCESSORY_MODEL), // 配件型號 HOMEKIT_CHARACTERISTIC(IDENTIFY, accessory_identify), // 識別功能 NULL }), HOMEKIT_SERVICE(FAN, .primary=true, .characteristics = (homekit_characteristic_t[]) { &fan_on_characteristic, // 風扇開關特性 NULL }), NULL } ), NULL };
&rotation_speed,
The fan in the example is shown as a switch type on Homekit. Can it be changed to percentage type?
homekit_accessory_t accessories[] = { HOMEKIT_ACCESSORY( .id = 1, // 配件 ID .category = homekit_accessory_category_fan, // 配件類別為風扇 .services = (homekit_service_t[]) { HOMEKIT_SERVICE(ACCESSORY_INFORMATION, .characteristics = (homekit_characteristic_t[]) { &name, // 配件名稱 HOMEKIT_CHARACTERISTIC(MANUFACTURER, ACCESSORY_MANUFACTURER), // 製造商 HOMEKIT_CHARACTERISTIC(SERIAL_NUMBER, ACCESSORY_SN), // 配件序列號 HOMEKIT_CHARACTERISTIC(MODEL, ACCESSORY_MODEL), // 配件型號 HOMEKIT_CHARACTERISTIC(IDENTIFY, accessory_identify), // 識別功能 NULL }), HOMEKIT_SERVICE(FAN, .primary=true, .characteristics = (homekit_characteristic_t[]) { &fan_on_characteristic, // 風扇開關特性 NULL }), NULL } ), NULL };