WebThingsIO / zigbee-adapter

Zigbee adapter add-on for WebThings Gateway
Mozilla Public License 2.0
46 stars 29 forks source link

Stop all properties being removed by default #335

Closed benfrancis closed 2 months ago

benfrancis commented 2 months ago

Fixes https://github.com/WebThingsIO/gateway/issues/3126 for the Zigbee adapter.

In previous versions of the gateway all properties had a visible member which was set to true by default. The Zigbee adapter currently assumes that all properties have a visible member and removes from Thing Descriptions if it doesn't evaluate to true. The latest version of the gateway never adds a visible member to property descriptions.

This tweak makes sure that properties are not removed by default, and instead only removed if a visible member is explicitly set to false.

Invisible properties should eventually be re-factored out altogether, see #334.