File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
devicetypes/smartthings/zigbee-metering-plug.src Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -85,13 +85,13 @@ def parse(String description) {
8585
8686 attrData. each {
8787 def map = [:]
88- if (it. clusterInt == zigbee. SIMPLE_METERING_CLUSTER && it. attrInt == ATTRIBUTE_HISTORICAL_CONSUMPTION ) {
88+ if (it. value && it . clusterInt == zigbee. SIMPLE_METERING_CLUSTER && it. attrInt == ATTRIBUTE_HISTORICAL_CONSUMPTION ) {
8989 log. debug " power"
9090 map. name = " power"
9191 map. value = zigbee. convertHexToInt(it. value)/ powerDiv
9292 map. unit = " W"
9393 }
94- else if (it. clusterInt == zigbee. SIMPLE_METERING_CLUSTER && it. attrInt == ATTRIBUTE_READING_INFO_SET ) {
94+ else if (it. value && it . clusterInt == zigbee. SIMPLE_METERING_CLUSTER && it. attrInt == ATTRIBUTE_READING_INFO_SET ) {
9595 log. debug " energy"
9696 map. name = " energy"
9797 map. value = zigbee. convertHexToInt(it. value)/ energyDiv
You can’t perform that action at this time.
0 commit comments