Skip to content

Commit 9a9add3

Browse files
committed
fix!: Renamed occupancy to presence for Tuya ZY-M100-24G #8229
1 parent 8ce9161 commit 9a9add3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/devices/tuya.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -10574,7 +10574,7 @@ const definitions: DefinitionWithExtend[] = [
1057410574
configure: tuya.configureMagicPacket,
1057510575
exposes: [
1057610576
e.enum('state', ea.STATE, ['none', 'presence', 'move']).withDescription('Presence state'),
10577-
e.occupancy(),
10577+
e.presence(),
1057810578
e.numeric('distance', ea.STATE).withUnit('m').withDescription('Target distance'),
1057910579
e.illuminance_lux(),
1058010580
e
@@ -10585,12 +10585,12 @@ const definitions: DefinitionWithExtend[] = [
1058510585
.withCategory('config')
1058610586
.withDescription('Motion sensitivity'),
1058710587
e
10588-
.numeric('occupancy_sensitivity', ea.STATE_SET)
10588+
.numeric('presence_sensitivity', ea.STATE_SET)
1058910589
.withValueMin(1)
1059010590
.withValueMax(10)
1059110591
.withValueStep(1)
1059210592
.withCategory('config')
10593-
.withDescription('Occupancy sensitivity'),
10593+
.withDescription('Presence sensitivity'),
1059410594
e
1059510595
.numeric('max_range', ea.STATE_SET)
1059610596
.withValueMin(1.5)
@@ -10600,22 +10600,22 @@ const definitions: DefinitionWithExtend[] = [
1060010600
.withCategory('config')
1060110601
.withDescription('Maximum range'),
1060210602
e
10603-
.numeric('occupancy_timeout', ea.STATE_SET)
10603+
.numeric('presence_timeout', ea.STATE_SET)
1060410604
.withValueMin(1)
1060510605
.withValueMax(1500)
1060610606
.withValueStep(1)
1060710607
.withUnit('s')
10608-
.withDescription('Occupancy timeout'),
10608+
.withDescription('Presence timeout'),
1060910609
],
1061010610
meta: {
1061110611
multiEndpoint: true,
1061210612
tuyaDatapoints: [
10613-
[112, 'occupancy', tuya.valueConverter.trueFalse1],
10614-
[106, 'motion_sensitivity', tuya.valueConverter.raw],
10615-
[111, 'occupancy_sensitivity', tuya.valueConverter.raw],
10613+
[112, 'presence', tuya.valueConverter.trueFalse1],
10614+
[106, 'motion_sensitivity', tuya.valueConverter.divideBy10FromOnly],
10615+
[111, 'presence_sensitivity', tuya.valueConverter.divideBy10FromOnly],
1061610616
[107, 'max_range', tuya.valueConverter.divideBy100],
1061710617
[109, 'distance', tuya.valueConverter.divideBy100],
10618-
[110, 'occupancy_timeout', tuya.valueConverter.raw],
10618+
[110, 'presence_timeout', tuya.valueConverter.raw],
1061910619
[104, 'illuminance_lux', tuya.valueConverter.raw],
1062010620
[102, 'illuminance_treshold_max', tuya.valueConverter.raw],
1062110621
[103, 'illuminance_treshold_min', tuya.valueConverter.raw],

0 commit comments

Comments
 (0)