diff --git a/devices/philips/sml001_motion_sensor.json b/devices/philips/sml001_motion_sensor.json index b877d9749c..4baeca453c 100644 --- a/devices/philips/sml001_motion_sensor.json +++ b/devices/philips/sml001_motion_sensor.json @@ -399,6 +399,48 @@ { "name": "attr/uniqueid" }, + { + "name": "cap/measured_value/max", + "parse": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": "0x0002", + "eval": "Item.val = Attr.val / 100" + }, + "read": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": [ + "0x0001", + "0x0002" + ] + }, + "refresh.interval": 86400 + }, + { + "name": "cap/measured_value/min", + "parse": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": "0x0001", + "eval": "Item.val = Attr.val / 100" + } + }, + { + "name": "cap/measured_value/quantity", + "static": "temperature" + }, + { + "name": "cap/measured_value/substance", + "static": "air" + }, + { + "name": "cap/measured_value/unit", + "static": "degC" + }, { "name": "config/alert", "default": "none" @@ -433,14 +475,25 @@ "name": "state/lastupdated" }, { - "name": "state/temperature", + "name": "state/measured_value", + "awake": true, "parse": { "fn": "zcl:attr", "ep": 2, "cl": "0x0402", "at": "0x0000", - "eval": "Item.val = Attr.val + R.item('config/offset').val" - } + "eval": "Item.val = (Attr.val - R.item('config/offset').val) / 100" + }, + "read": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": "0x0000" + }, + "refresh.interval": 360 + }, + { + "name": "state/temperature" } ] } diff --git a/devices/philips/sml002_motion_sensor.json b/devices/philips/sml002_motion_sensor.json index 2570e36eb5..637ae77cf7 100644 --- a/devices/philips/sml002_motion_sensor.json +++ b/devices/philips/sml002_motion_sensor.json @@ -407,6 +407,48 @@ { "name": "attr/uniqueid" }, + { + "name": "cap/measured_value/max", + "parse": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": "0x0002", + "eval": "Item.val = Attr.val / 100" + }, + "read": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": [ + "0x0001", + "0x0002" + ] + }, + "refresh.interval": 86400 + }, + { + "name": "cap/measured_value/min", + "parse": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": "0x0001", + "eval": "Item.val = Attr.val / 100" + } + }, + { + "name": "cap/measured_value/quantity", + "static": "temperature" + }, + { + "name": "cap/measured_value/substance", + "static": "air" + }, + { + "name": "cap/measured_value/unit", + "static": "degC" + }, { "name": "config/alert", "default": "none" @@ -441,14 +483,25 @@ "name": "state/lastupdated" }, { - "name": "state/temperature", + "name": "state/measured_value", + "awake": true, "parse": { "fn": "zcl:attr", "ep": 2, "cl": "0x0402", "at": "0x0000", - "eval": "Item.val = Attr.val + R.item('config/offset').val" - } + "eval": "Item.val = (Attr.val - R.item('config/offset').val) / 100" + }, + "read": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": "0x0000" + }, + "refresh.interval": 360 + }, + { + "name": "state/temperature" } ] } diff --git a/devices/philips/sml003_motion_sensor.json b/devices/philips/sml003_motion_sensor.json index f6d06c1681..7727bcafa3 100644 --- a/devices/philips/sml003_motion_sensor.json +++ b/devices/philips/sml003_motion_sensor.json @@ -413,6 +413,48 @@ { "name": "attr/uniqueid" }, + { + "name": "cap/measured_value/max", + "parse": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": "0x0002", + "eval": "Item.val = Attr.val / 100" + }, + "read": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": [ + "0x0001", + "0x0002" + ] + }, + "refresh.interval": 86400 + }, + { + "name": "cap/measured_value/min", + "parse": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": "0x0001", + "eval": "Item.val = Attr.val / 100" + } + }, + { + "name": "cap/measured_value/quantity", + "static": "temperature" + }, + { + "name": "cap/measured_value/substance", + "static": "air" + }, + { + "name": "cap/measured_value/unit", + "static": "degC" + }, { "name": "config/alert", "default": "none" @@ -447,14 +489,25 @@ "name": "state/lastupdated" }, { - "name": "state/temperature", + "name": "state/measured_value", + "awake": true, "parse": { "fn": "zcl:attr", "ep": 2, "cl": "0x0402", "at": "0x0000", - "eval": "Item.val = Attr.val + R.item('config/offset').val" - } + "eval": "Item.val = (Attr.val - R.item('config/offset').val) / 100" + }, + "read": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": "0x0000" + }, + "refresh.interval": 360 + }, + { + "name": "state/temperature" } ] } diff --git a/devices/philips/sml004_motion_sensor.json b/devices/philips/sml004_motion_sensor.json index 1ff31eeea4..734fcd53cf 100644 --- a/devices/philips/sml004_motion_sensor.json +++ b/devices/philips/sml004_motion_sensor.json @@ -413,6 +413,48 @@ { "name": "attr/uniqueid" }, + { + "name": "cap/measured_value/max", + "parse": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": "0x0002", + "eval": "Item.val = Attr.val / 100" + }, + "read": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": [ + "0x0001", + "0x0002" + ] + }, + "refresh.interval": 86400 + }, + { + "name": "cap/measured_value/min", + "parse": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": "0x0001", + "eval": "Item.val = Attr.val / 100" + } + }, + { + "name": "cap/measured_value/quantity", + "static": "temperature" + }, + { + "name": "cap/measured_value/substance", + "static": "air" + }, + { + "name": "cap/measured_value/unit", + "static": "degC" + }, { "name": "config/alert", "default": "none" @@ -447,14 +489,25 @@ "name": "state/lastupdated" }, { - "name": "state/temperature", + "name": "state/measured_value", + "awake": true, "parse": { "fn": "zcl:attr", "ep": 2, "cl": "0x0402", "at": "0x0000", - "eval": "Item.val = Attr.val + R.item('config/offset').val" - } + "eval": "Item.val = (Attr.val - R.item('config/offset').val) / 100" + }, + "read": { + "fn": "zcl:attr", + "ep": 2, + "cl": "0x0402", + "at": "0x0000" + }, + "refresh.interval": 360 + }, + { + "name": "state/temperature" } ] }