-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Add a smart water heater switch with touch function of model TS0601_b… #10373
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
base: master
Are you sure you want to change the base?
Conversation
bf7848c to
da8e480
Compare
| meta: { | ||
| tuyaDatapoints: [ | ||
| [1, "switch_1", tuya.valueConverter.onOff], | ||
| [21, "cur_current", tuya.valueConverterBasic.scale(0, 30000, 0, 30000)], |
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.
please remove the cur_ prefix for all
| e.switch(), | ||
| e.enum("level", ea.STATE_SET, ["T0", "T30", "T60", "T90", "T120", "TON"]).withDescription("LEVEL"), | ||
| e.numeric("countdown", ea.STATE_SET).withValueMin(0).withValueMax(7200).withUnit("s").withDescription("countdown"), | ||
| e.numeric("cur_current", ea.STATE).withUnit("mA").withDescription("Current"), |
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.
Use, e.current(), e.voltage(), e.power() here. Make sure to correct the current divisor (tuya.valueConverterBasic.scale(0, 30000, 0, 30000)) accordingly (A is expected not mA)
| extend: [tuya.modernExtend.tuyaBase({dp: true, forceTimeUpdates: true})], | ||
| exposes: [ | ||
| e.switch(), | ||
| e.enum("level", ea.STATE_SET, ["T0", "T30", "T60", "T90", "T120", "TON"]).withDescription("LEVEL"), |
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.
It's not quite clear to me what this does, could you extend the description?
| ], | ||
| meta: { | ||
| tuyaDatapoints: [ | ||
| [1, "switch_1", tuya.valueConverter.onOff], |
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.
| [1, "switch_1", tuya.valueConverter.onOff], | |
| [1, "state", tuya.valueConverter.onOff], |
Otherwise I don't expect it works
…oiler_6
Link to picture pull request: TODO