-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Update legacy.ts #6316
Update legacy.ts #6316
Conversation
_TZE200_5toc8efa fix settings
src/lib/legacy.ts
Outdated
@@ -6712,15 +6728,16 @@ const toZigbee2 = { | |||
convertSet: async (entity, key, value: any, meta) => { | |||
if (['_TZE200_5toc8efa'].includes(meta.device.manufacturerName)) { | |||
await sendDataPointValue(entity, dataPoints.moesHeatingSetpoint, value * 10); | |||
} else { | |||
if (value <= 5) value = Math.round(value*10); | |||
await sendDataPointValue(entity, dataPoints.moesHeatingSetpoint, value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes the behaviour for all except _TZE200_5toc8efa
, please revert this change.
src/lib/legacy.ts
Outdated
convertSet: async (entity, key, value: any, meta) => { | ||
if (['_TZE200_5toc8efa'].includes(meta.device.manufacturerName)) { | ||
await sendDataPointValue(entity, dataPoints.moesDeadZoneTemp, value * 10); | ||
} | ||
await sendDataPointValue(entity, dataPoints.moesDeadZoneTemp, value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this an if else, otherwise you send the value twice, e.g.
if (['_TZE200_5toc8efa'].includes(meta.device.manufacturerName)) {
await sendDataPointValue(entity, dataPoints.moesDeadZoneTemp, value * 10);
} else {
await sendDataPointValue(entity, dataPoints.moesDeadZoneTemp, value);
}
src/lib/legacy.ts
Outdated
convertSet: async (entity, key, value: any, meta) => { | ||
if (['_TZE200_5toc8efa'].includes(meta.device.manufacturerName)) { | ||
await sendDataPointValue(entity, dataPoints.moesMinTempLimit, value * 10); | ||
} | ||
await sendDataPointValue(entity, dataPoints.moesMinTempLimit, value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make if/else as described above
convertSet: async (entity, key, value: any, meta) => { | ||
if (['_TZE200_5toc8efa'].includes(meta.device.manufacturerName)) { | ||
await sendDataPointValue(entity, dataPoints.moesMaxTempLimit, value * 10); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make if/else as described above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx i edit legacy.ts
_TZE200_5toc8efa fix settings