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

Berry Zigbee fix attributes #22684

Merged
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file.
- TLS disable ECDSA for MQTT to ensure we don't break fingerprints after #22649

### Fixed
- Berry Zigbee fix wrong attributes

### Removed

Expand Down
2 changes: 0 additions & 2 deletions lib/libesp32/berry_tasmota/src/embedded/zigbee_zb_coord.be
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ class zb_coord : zb_coord_ntv
if zcl_attribute_list_ptr != nullptr
attr_list = self.zcl_attribute_list(zcl_attribute_list_ptr)
end

#print(format(">ZIG: cmd=%s data_type=%s data=%s idx=%i", event_type, data_type, str(data), idx))

var i = 0
while i < size(self._handlers)
Expand Down
14 changes: 9 additions & 5 deletions lib/libesp32/berry_tasmota/src/embedded/zigbee_zcl_attribute.be
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,13 @@ class zcl_attribute_list : zcl_attribute_list_ntv
var v

# shortaddr
if (v := self.shortaddr) != nil
v = self.shortaddr
if v != nil
items.push(f'"Device":"0x{v:04X}"')
end
# groupaddr
if (v := self.groupaddr) != nil
v = self.groupaddr
if v != nil
items.push(f'"Group":"0x{v:04X}"')
end

Expand All @@ -223,13 +225,15 @@ class zcl_attribute_list : zcl_attribute_list_ntv
end

# Endpoint
if (v := self.src_ep) != nil
v = self.src_ep
if v != nil
items.push(f'"Endpoint":{v}')
end

# LQI
if (v := self.lqi) != nil
items.push(f'"LinkQuality":{v}')
v := self.lqi
if v != nil
items.push(f'"LinkQuality":{v:i}')
end

var s = "{" + items.concat(",") + "}"
Expand Down
Loading