Skip to content

Conversation

@avzasorin-sd
Copy link
Contributor

@avzasorin-sd avzasorin-sd commented Sep 8, 2025

Adding new features for devices from SDevices:

  • covers mode (SBDV-00199)
  • child lock (SBDV-00196, SBDV-00199)
  • diagnostics and serial number (SBDV-00196, SBDV-00199, SBDV-00202)

PR with additional information about switching SBDV-00199 into covers mode: Koenkk/zigbee2mqtt.io#4126

return false;
}
function setMetaOption(device: Zh.Device, key: string, enabled: boolean) {
if (device != null && key != null) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this check is not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are right, this additional check was an artefact from times when dummyDevice was not implemented yet

}
function setMetaOption(device: Zh.Device, key: string, enabled: boolean) {
if (device != null && key != null) {
device.meta[key] = enabled;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
device.meta[key] = enabled;
device.meta[key] = enabled;
device.save();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. Also got rid of extra functions

const defaultResponseOptions = {disableDefaultResponse: false};

function checkMetaOption(device: Zh.Device, key: string) {
if (device != null) {
Copy link
Owner

@Koenkk Koenkk Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check should not be needed? I think this function can be simplified to just return !!(device.meta[key] ?? false)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@Koenkk Koenkk merged commit 7567b4f into Koenkk:master Sep 10, 2025
3 checks passed
@Koenkk
Copy link
Owner

Koenkk commented Sep 10, 2025

Thanks!

avzasorin-sd added a commit to avzasorin-sd/zigbee-herdsman-converters that referenced this pull request Sep 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants