Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read metering temperature #1825

Merged
merged 4 commits into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions Modules/readAttributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1335,12 +1335,30 @@ def ReadAttributeRequest_0702_0000(self, key):


def ReadAttributeRequest_0702_0017(self, key):
# Cluster 0x0702 Metering / Specific 0x0017 (Device Temperature)
ListOfEp = getListOfEpForCluster(self, key, "0702")
for EPout in ListOfEp:
listAttributes = [0x0017]
self.log.logging("ReadAttributes", "Debug", "Request InletTemperature on 0x0702 cluster: " + key + " EPout = " + EPout, nwkid=key)
ReadAttributeReq(self, key, ZIGATE_EP, EPout, "0702", listAttributes, ackIsDisabled=is_ack_tobe_disabled(self, key))
"""
Reads the InletTemperature (Attribute 0x0017) from the Metering cluster (0x0702).

Parameters:
self: The instance of the class.
key: The network identifier for the device.
"""

# Define the cluster and attribute
cluster_id = "0702"
listAttributes = [0x0017]

# Get the list of endpoints for the cluster
endpoints = getListOfEpForCluster(self, key, cluster_id)
for endpoint in endpoints:
self.log.logging(
"ReadAttributes",
"Debug",
f"Requesting InletTemperature (Attribute {listAttributes}) on cluster {cluster_id} for key {key}, EP = {endpoint}.",
nwkid=key
)

# Send the read attribute request
ReadAttributeReq(self, key, ZIGATE_EP, endpoint, cluster_id, listAttributes, ackIsDisabled=is_ack_tobe_disabled(self, key))


def ReadAttributeRequest_0702_multiplier_divisor(self, key):
Expand Down
Loading