-
Notifications
You must be signed in to change notification settings - Fork 462
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
CHAD-14369 Add ezex valve sub-driver #1763
Conversation
Minimum allowed coverage is Generated by 🐒 cobertura-action against 71129df |
Channel deleted. |
Old version of this valve use the IAS Zone Status to report low battery and do not otherwise support the PowerConfiguration cluster, which is usually used for reporting the battery. The porting work done for the DTH missed this behavior because it was removed. This adds back in the old behavior, but only for devices that do not support PowerConfiguration, which should be rare, as the old behavior is not ideal.
6fd8573
to
71129df
Compare
See the Jira ticket for a detailed explanation. |
} | ||
} | ||
|
||
local function ias_zone_status_attr_handler(driver, device, zone_status, zb_rx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need emit the initial battery value to cloud?
The battery level for this device are only 3 levels?(100%, 50% 5%)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went into this a bit more in the Jira ticket, but very old versions of this device only ever reported their battery status using the IAS Zone Status
, which can report "low battery" or "normal battery". On the DTH, for a while, we interpreted these as 5% and 50%, but the device used a custom metadata that just reported "low" and "normal".
Eventually, it seems eZex did a firmware update and started using the PowerConfiguration
cluster. (and the behavior was removed from the DTH: SmartThingsCommunity/SmartThingsPublic@1fdbf08)
So only old versions (note how the can_handle
function is restricted to devices that do not support the PowerConfiguration
cluster) will use this handling, which will only ever report 5% or 50%, but this matches the old DTH handling of the same.
I expect that most customers in the field have the updated firmware that uses the standard Zigbee cluster for reporting battery level, so this should only ever be a corner case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as for initial state, for these specific old devices, a read of the IAS Zone Status will occur on add or refresh that will result in a battery value of 5% or 50%.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I got it. Thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, Steven! 🔥
This valve uses the IAS Zone Status to report low battery and does not otherwise support the PowerConfiguration cluster, which is usually used for reporting the battery. The porting work done for the DTH missed this behavior.
Check all that apply
Type of Change
Checklist
Description of Change
Summary of Completed Tests