Skip to content

Commit 804491f

Browse files
committed
🐛 Fix Bluetooth power level reading using wrong register
Fixes issue where some devices report values like "27042/5" instead of the expected "2/5" power level display. Closes #62
1 parent b4188f7 commit 804491f

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"axios": "^1.13.2",
2626
"class-variance-authority": "^0.7.1",
2727
"clsx": "^2.1.1",
28-
"edilkamin": "1.13.1",
28+
"edilkamin": "1.13.2",
2929
"i18next": "^25.7.3",
3030
"lucide-react": "^0.562.0",
3131
"next": "^16",

src/utils/bluetooth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ export const setTemperature = async (
395395
*/
396396
export const readPowerLevel = async (deviceId: string): Promise<number> => {
397397
const response = await sendCommand(deviceId, readCommands.powerLevel);
398-
return parsers.number(response);
398+
return parsers.powerLevel(response);
399399
};
400400

401401
/**

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4784,10 +4784,10 @@ dunder-proto@^1.0.0, dunder-proto@^1.0.1:
47844784
es-errors "^1.3.0"
47854785
gopd "^1.2.0"
47864786

4787-
edilkamin@1.13.1:
4788-
version "1.13.1"
4789-
resolved "https://registry.yarnpkg.com/edilkamin/-/edilkamin-1.13.1.tgz#aab32edca00a31ee743c58bdaa042183357fb992"
4790-
integrity sha512-KWf6S1KhqupjKGb3wBfR5pmI9y1Ib4jfHAthOHR9gBn/lg0zzRvodho8gy0cx3Ic60gxlBvWFGdOiYcsyunvTA==
4787+
edilkamin@1.13.2:
4788+
version "1.13.2"
4789+
resolved "https://registry.yarnpkg.com/edilkamin/-/edilkamin-1.13.2.tgz#a6225493c68ae3b45b1043158bdb4e56c71f6160"
4790+
integrity sha512-BbgyblR9t7EQmEYWyGtAIlR32WmUrX39mdENTJS32eGh7nuj/dtKGPv+al4lDUlWQB+FSKVU5St472B6WF7Q4Q==
47914791
dependencies:
47924792
aws-amplify "^6.10.0"
47934793
pako "^2.1.0"

0 commit comments

Comments
 (0)