Skip to content

Conversation

@AudreynHeadburn
Copy link
Contributor

…ic local time sync

This PR fixes the incorrect local time offset used by the Moes ZHT-SR (TS0601 / _TZE204_lpedvtvr) smart ring thermostat.

Previously, the device used timeStart: "2000", causing the internal day-of-week calculation to drift and show the wrong weekday after pairing or reboot.

Changes:

  • Updated extend line to use the correct epoch base: from: tuya.modernExtend.tuyaBase({ dp: true, timeStart: "2000" })
    to: tuya.modernExtend.tuyaBase({ dp: true, timeStart: "1970" })
  • Added onEvent: tuya.onEventSetLocalTime to automatically push the current local time when the device (re)joins.

This resolves the persistent "wrong weekday" issue (e.g., device showing Wednesday when it was actually Saturday).

All other exposes and datapoints remain unchanged.

Link to picture pull request: TODO

AudreynHeadburn and others added 3 commits November 8, 2025 17:31
…ic local time sync

This PR fixes the incorrect local time offset used by the Moes ZHT-SR (TS0601 / _TZE204_lpedvtvr) smart ring thermostat.

Previously, the device used `timeStart: "2000"`, causing the internal day-of-week calculation to drift and show the wrong weekday after pairing or reboot.

Changes:
- Updated `extend` line to use the correct epoch base:
  from: `tuya.modernExtend.tuyaBase({ dp: true, timeStart: "2000" })`
  to:   `tuya.modernExtend.tuyaBase({ dp: true, timeStart: "1970" })`
- Added `onEvent: tuya.onEventSetLocalTime` to automatically push the current local time when the device (re)joins.

This resolves the persistent "wrong weekday" issue (e.g., device showing Wednesday when it was actually Saturday).

All other exposes and datapoints remain unchanged.
… sync

This PR fixes the incorrect local time offset used by the Moes ZHT-SR (TS0601 / _TZE204_lpedvtvr) smart ring thermostat.

Previously, the device used `timeStart: "2000"`, causing the internal day-of-week calculation to drift and show the wrong weekday after pairing or reboot.

Changes:
- Updated `extend` line to use the correct epoch base:
  from: `tuya.modernExtend.tuyaBase({ dp: true, timeStart: "2000" })`
  to:   `tuya.modernExtend.tuyaBase({ dp: true, timeStart: "1970" })`
- Added `onEvent: (tuya as any).onEventSetLocalTime,` to automatically push the current local time when the device (re)joins.

This resolves the persistent "wrong weekday" issue (e.g., device showing Wednesday when it was actually Saturday).

All other exposes and datapoints remain unchanged.
Copy link
Contributor Author

@AudreynHeadburn AudreynHeadburn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed:
onEvent: tuya.onEventSetLocalTime,
to:
onEvent: (tuya as any).onEventSetLocalTime,

extend: [tuya.modernExtend.tuyaBase({dp: true, timeStart: "2000"})],
extend: [tuya.modernExtend.tuyaBase({dp: true, timeStart: "1970"})],

onEvent: (tuya as any).onEventSetLocalTime,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be needed, can you test without?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Koenkk,
I’m a little confused by your comment. The suggested change fixes the incorrect date on the MOES Thermostat. Without this change it won’t work and always syncs the date with Wednesday.

I thought I could help others with my small fix.

Nico

@Koenkk Koenkk merged commit 94081a8 into Koenkk:master Nov 9, 2025
3 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Nov 9, 2025

Thanks!

jacky202509 pushed a commit to jacky202509/zigbee-herdsman-converters that referenced this pull request Nov 13, 2025
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Koen Kanters <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants