You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe The Bug:
Home app thinks the Ac Fan value is in Percentage 0-100, but the actual hardware is in Integer 0-5
To Reproduce:
Have an connected AC with range from 0-5 of fan speed, Open home app and click to edit the fan speed,
Set the speed to “60%” on the slider
Observe that the value displayed is “3%” that corresponds to 60% (3) in a 0-5 scale
Expected behavior:
The plugin should either report the value in Percentage to the home app, 60% (and internally round to the nearest speed supported) or if possible, tell the Home app the available range so the value is both in a 0-5 scale
Logs:
Not Applicable
Plugin Config:
Not Applicable
Screenshots:
Environment:
Plugin Version: V2.0.0 Beta-4
Homebridge Version: 2
Node.js Version: 22.13.1
NPM Version:
Operating System: Ubuntu
The text was updated successfully, but these errors were encountered:
I've spent the last two seeks working with Git hub's copilot to improve some plugins I use and this is one of them.
I found that the plugin does not currently translate the devices "windSpeed" values into the correct scale for HomeKit.
I'm currently working to implement a fix that will create a 3 segment slider in HomeKit and translate its position to my model of AC.
The API for the AC has the possible values, but not what the model actually has, so this needs the user to config or another method defined.
The AC I have for example looks like this:
`class Helper {
// ...existing code...
// Add after the category() method
static FanSpeedMap = {
OFF: { device: 0, homekit: 0 },
LOW: { device: 2, homekit: 33 },
MEDIUM: { device: 4, homekit: 66 },
HIGH: { device: 6, homekit: 100 }
};
static deviceToHomekitFanSpeed(deviceSpeed) {
// Convert string to number if needed
const speed = parseInt(deviceSpeed);
for (const [key, mapping] of Object.entries(this.FanSpeedMap)) {
if (mapping.device === speed) {
return mapping.homekit;
}
}
return 0; // Default to OFF if no match
}
static homekitToDeviceFanSpeed(homekitSpeed) {
// Convert string to number if needed
const speed = parseInt(homekitSpeed);
if (speed === 0) return this.FanSpeedMap.OFF.device;
if (speed <= 33) return this.FanSpeedMap.LOW.device;
if (speed <= 66) return this.FanSpeedMap.MEDIUM.device;
return this.FanSpeedMap.HIGH.device;
}
static getFanSpeedSteps() {
return {
minValue: 0,
maxValue: 100,
minStep: 45 // Forces 3-position slider
};
}
Describe The Bug:
Home app thinks the Ac Fan value is in Percentage 0-100, but the actual hardware is in Integer 0-5
To Reproduce:
Have an connected AC with range from 0-5 of fan speed, Open home app and click to edit the fan speed,
Set the speed to “60%” on the slider
Observe that the value displayed is “3%” that corresponds to 60% (3) in a 0-5 scale
Expected behavior:
The plugin should either report the value in Percentage to the home app, 60% (and internally round to the nearest speed supported) or if possible, tell the Home app the available range so the value is both in a 0-5 scale
Logs:
Plugin Config:
Screenshots:
Environment:
The text was updated successfully, but these errors were encountered: