Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the fan to percentage type #260

Open
guangmin0622 opened this issue Nov 17, 2024 · 1 comment
Open

Change the fan to percentage type #260

guangmin0622 opened this issue Nov 17, 2024 · 1 comment

Comments

@guangmin0622
Copy link

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
};

@LouisLee985
Copy link

&rotation_speed,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants