@@ -24720,16 +24720,26 @@ export const definitions: DefinitionWithExtend[] = [
2472024720 extend: [tuya.modernExtend.tuyaBase({dp: true})],
2472124721 options: [exposes.options.invert_cover()],
2472224722 exposes: [
24723- e.battery(),
2472424723 e.cover_position().setAccess("position", ea.STATE_SET),
24725- e.enum("reverse_direction", ea.STATE_SET, ["forward", "back"]).withDescription("Reverse the motor direction"),
24726- e.text("work_state", ea.STATE),
24727- e.enum("click_control", ea.STATE_SET, ["up", "down"]).withDescription("Single motor steps"),
24728- e.enum("border", ea.STATE_SET, ["up", "down", "up_delete", "down_delete", "remove_top_bottom"]),
24729- e.binary("motor_fault", ea.STATE, true, false),
24724+ e.enum("mode", ea.STATE_SET, ["morning", "night"]).withDescription("Operating mode. morning=normal, night=slower and quieter"),
24725+ e.enum("motor_direction", ea.STATE_SET, ["forward", "back"]).withDescription("Motor rotation direction. Change if blind moves wrong way"),
24726+ e.binary("auto_power", ea.STATE_SET, true, false).withDescription("Auto-complete open/close when curtain is manually pulled"),
24727+ e.enum("work_state", ea.STATE, ["opening", "closing"]).withDescription("Current motor movement status"),
24728+ e.enum("countdown", ea.STATE_SET, ["cancel", "1h", "2h", "3h", "4h"]).withDescription("Countdown timer to trigger open/close"),
24729+ e.numeric("countdown_left", ea.STATE).withUnit("s").withDescription("Remaining countdown time in seconds"),
24730+ e.numeric("time_total", ea.STATE).withUnit("ms").withDescription("Full travel time in ms, populated after calibration"),
24731+ e
24732+ .enum("situation_set", ea.STATE, ["fully_open", "fully_close"])
24733+ .withDescription("Whether motor treats 100% as fully open or fully closed"),
24734+ e.binary("motor_fault", ea.STATE, true, false).withDescription("Motor hardware fault"),
24735+ e.battery(),
24736+ e
24737+ .enum("border", ea.SET, ["up", "down", "up_delete", "down_delete", "remove_top_bottom"])
24738+ .withDescription("Set or clear motor travel limits"),
24739+ e.numeric("position_best", ea.STATE_SET).withValueMin(0).withValueMax(100).withUnit("%").withDescription("Saved favourite position"),
24740+ e.enum("click_control", ea.SET, ["up", "down"]).withDescription("Single jog step up or down"),
2473024741 ],
2473124742 meta: {
24732- // All datapoints go in here
2473324743 tuyaDatapoints: [
2473424744 [
2473524745 1,
@@ -24742,15 +24752,53 @@ export const definitions: DefinitionWithExtend[] = [
2474224752 ],
2474324753 [2, "position", tuya.valueConverter.coverPosition],
2474424754 [3, "position", tuya.valueConverter.coverPosition],
24745- [5, "reverse_direction", tuya.valueConverterBasic.lookup({forward: tuya.enum(0), back: tuya.enum(1)})],
24755+ [
24756+ 4,
24757+ "mode",
24758+ tuya.valueConverterBasic.lookup({
24759+ morning: tuya.enum(0),
24760+ night: tuya.enum(1),
24761+ }),
24762+ ],
24763+ [
24764+ 5,
24765+ "motor_direction",
24766+ tuya.valueConverterBasic.lookup({
24767+ forward: tuya.enum(0),
24768+ back: tuya.enum(1),
24769+ }),
24770+ ],
24771+ [6, "auto_power", tuya.valueConverter.onOff],
2474624772 [
2474724773 7,
2474824774 "work_state",
24749- tuya.valueConverterBasic.lookup((options) =>
24750- options.invert_cover ? {opening: tuya.enum(0), closing: tuya.enum(1)} : {opening: tuya.enum(1), closing: tuya.enum(0)},
24751- ),
24775+ tuya.valueConverterBasic.lookup({
24776+ opening: tuya.enum(0),
24777+ closing: tuya.enum(1),
24778+ }),
2475224779 ],
24753- [12, "motor_fault", tuya.valueConverter.trueFalse1],
24780+ [
24781+ 8,
24782+ "countdown",
24783+ tuya.valueConverterBasic.lookup({
24784+ cancel: tuya.enum(0),
24785+ "1h": tuya.enum(1),
24786+ "2h": tuya.enum(2),
24787+ "3h": tuya.enum(3),
24788+ "4h": tuya.enum(4),
24789+ }),
24790+ ],
24791+ [9, "countdown_left", tuya.valueConverter.raw],
24792+ [10, "time_total", tuya.valueConverter.raw],
24793+ [
24794+ 11,
24795+ "situation_set",
24796+ tuya.valueConverterBasic.lookup({
24797+ fully_open: tuya.enum(0),
24798+ fully_close: tuya.enum(1),
24799+ }),
24800+ ],
24801+ [12, "motor_fault", {from: (v: number) => v !== 0}],
2475424802 [13, "battery", tuya.valueConverter.raw],
2475524803 [
2475624804 16,
@@ -24763,7 +24811,15 @@ export const definitions: DefinitionWithExtend[] = [
2476324811 remove_top_bottom: tuya.enum(4),
2476424812 }),
2476524813 ],
24766- [20, "click_control", tuya.valueConverterBasic.lookup({up: tuya.enum(0), down: tuya.enum(1)})],
24814+ [19, "position_best", tuya.valueConverter.raw],
24815+ [
24816+ 20,
24817+ "click_control",
24818+ tuya.valueConverterBasic.lookup({
24819+ up: tuya.enum(0),
24820+ down: tuya.enum(1),
24821+ }),
24822+ ],
2476724823 ],
2476824824 },
2476924825 },
0 commit comments