From b845fe5a82b6e2d560ff380631f2a2b52aec7b4c Mon Sep 17 00:00:00 2001 From: jagmandan Date: Sun, 5 Oct 2025 07:44:34 -0700 Subject: [PATCH] fix: Unable to control BB-V2-0 thermostats (#139) This change was identified while investigating why my BB-V2-0 Mysa would not respond to device state commands from Home Assistant (using mysq2mqtt). The id type was previously in unix time (seconds), but should be in milliseconds per the reference here: https://github.com/dlenski/mysotherm/blob/main/mysa_messages.md Making this update corrected the behavior and commands now work successfully. --- src/api/MysaApiClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/MysaApiClient.ts b/src/api/MysaApiClient.ts index 4f08a6d..b6a5fff 100644 --- a/src/api/MysaApiClient.ts +++ b/src/api/MysaApiClient.ts @@ -374,7 +374,7 @@ export class MysaApiClient { this._logger.debug(`Sending request to set device state for '${deviceId}'...`); const payload = serializeMqttPayload({ msg: InMessageType.CHANGE_DEVICE_STATE, - id: now.unix(), + id: now.valueOf(), time: now.unix(), ver: '1.0', src: {