Skip to content

Commit deaf344

Browse files
committed
chore: release v2.7.3
- (o0shojo0o) hotfix for Aqara presence detector FP1
1 parent 8db2be1 commit deaf344

File tree

5 files changed

+38
-30
lines changed

5 files changed

+38
-30
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,9 @@ This adapter allows to control the data points of the devices of a Zigbee2MQTT i
3232
Placeholder for the next version (at the beginning of the line):
3333
### **WORK IN PROGRESS**
3434
-->
35+
### 2.7.3 (2023-02-18)
3536

36-
### **WORK IN PROGRESS**
37-
38-
- (o0shojo0o) fix crash with invalid exposes
37+
- (o0shojo0o) hotfix for Aqara presence detector FP1
3938

4039
### 2.7.2 (2023-02-01)
4140

io-package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
{
22
"common": {
33
"name": "zigbee2mqtt",
4-
"version": "2.7.2",
4+
"version": "2.7.3",
55
"news": {
6+
"2.7.3": {
7+
"en": "hotfix for Aqara presence detector FP1",
8+
"de": "hotfix für Aqara Präsenzmelder FP1",
9+
"ru": "hotfix для детектора присутствия Aqara FP1",
10+
"pt": "hotfix para detector de presença Aqara FP1",
11+
"nl": "quality over Quanteur FP1",
12+
"fr": "hotfix pour détecteur de présence Aqara FP1",
13+
"it": "hotfix per rilevatore di presenza Aqara FP1",
14+
"es": "hotfix para detector de presencia Aqara FP1",
15+
"pl": "hotfix",
16+
"uk": "hotfix для датчика присутності Aqara FP1",
17+
"zh-cn": "aqara存在侦查员FP1"
18+
},
619
"2.7.2": {
720
"en": "rework of the detection of removed devices",
821
"de": "nacharbeiten der erkennung von entfernten geräten",
@@ -80,19 +93,6 @@
8093
"pl": "tekst do akcji #84 (https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/84)",
8194
"uk": "javaScript licenses API Веб-сайт Go1.13.8",
8295
"zh-cn": "行动案文[84](http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/84)"
83-
},
84-
"2.4.4": {
85-
"en": "better state identification ([#79](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/79))",
86-
"de": "bessere Zustandserkennung #[79](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/79)",
87-
"ru": "лучшая государственная идентификация #[79](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/79)",
88-
"pt": "melhor identificação do estado #[79](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/79)",
89-
"nl": "identificatie van de staat is beter",
90-
"fr": "meilleure identification de l ' État #[79](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/79)",
91-
"it": "migliore identificazione dello stato #[79](https://github.com/o0shojo0o/ioBroker.zigbee2mqt/issues/79)",
92-
"es": "mejor identificación estatal #[79](https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/79)",
93-
"pl": "zobacz też: #79 (https:/github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/79)",
94-
"uk": "[79] (https://github.com/o0shojo0o/ioBroker.zigbee2mqtt/issues/79)",
95-
"zh-cn": "更好的国家辨认(http://github.com/oshojo0o/ioBroker.zigbee2mqt/issues/79)"
9696
}
9797
},
9898
"titleLang": {

lib/exposes.js

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -966,43 +966,52 @@ function createDeviceFromExposes(devicesMessag, config) {
966966

967967
case 'composite':
968968
for (const prop of expose.features) {
969-
const st = genState(prop);
969+
// let state;
970+
// if (prop.type == 'list' && prop.features) {
971+
// const listName = prop.name;
972+
973+
// for (const feature of prop.features) {
974+
// genState(feature, 'state', `${listName}_${feature.name}`, prop.description);
975+
// }
976+
// }
977+
978+
const state = genState(prop);
970979
// Workaround for FP1 new state (region_upsert)
971-
if (!st) {
980+
if (!state) {
972981
break;
973982
}
974-
st.prop = expose.property;
975-
st.inOptions = true;
983+
state.prop = expose.property;
984+
state.inOptions = true;
976985
// I'm not fully sure, as it really needed, but
977-
st.setterOpt = (value, options) => {
986+
state.setterOpt = (value, options) => {
978987
const result = {};
979988
options[prop.property] = value;
980989
result[expose.property] = options;
981990
return result;
982991
};
983992
// if we have a composite expose, the value have to be an object {expose.property : {prop.property: value}}
984993
if (prop.access & z2mAccess.SET) {
985-
st.setter = (value, options) => {
994+
state.setter = (value, options) => {
986995
const result = {};
987996
options[prop.property] = value;
988997
result[expose.property] = options;
989998
return result;
990999
};
991-
st.setattr = expose.property;
1000+
state.setattr = expose.property;
9921001
}
9931002
// if we have a composite expose, the payload will be an object {expose.property : {prop.property: value}}
9941003
if (prop.access & z2mAccess.STATE) {
995-
st.getter = payload => {
1004+
state.getter = payload => {
9961005
if ((payload.hasOwnProperty(expose.property)) && (payload[expose.property] !== null) && payload[expose.property].hasOwnProperty(prop.property)) {
9971006
return !isNaN(payload[expose.property][prop.property]) ? payload[expose.property][prop.property] : undefined;
9981007
} else {
9991008
return undefined;
10001009
}
10011010
};
10021011
} else {
1003-
st.getter = _payload => { return undefined; };
1012+
state.getter = _payload => { return undefined; };
10041013
}
1005-
pushToStates(st, prop.access);
1014+
pushToStates(state, prop.access);
10061015
}
10071016
break;
10081017
default:

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iobroker.zigbee2mqtt",
3-
"version": "2.7.2",
3+
"version": "2.7.3",
44
"description": "Zigbee2MQTT adapter for ioBroker",
55
"author": {
66
"name": "Dennis Rathjen",

0 commit comments

Comments
 (0)