Skip to content

[Feature request]: Should 'Retain' be default #27216

Open
@lmcd

Description

@lmcd

Is your feature request related to a problem? Please describe

I'm using zigbee2mqtt in a completely new project.
Some low-power battery powered devices report their status very intermittently. Sometimes once an hour or so. With the default configuration of zigbee2mqtt, it's impossible to know the last state of the device until it eventually reports.

Zigbee2mqtt 'cheats' this for its own frontend, by explicitly sending last device states on websocket connection. It seems odd to me that there's an explicit exception for zigbee2mqtt's own frontend, but for everyone else, the 'Retain' option needs to be set on a per-device basis.

Are there any downsides to retaining device messages by default?

Describe the solution you'd like

Make 'Retain' default to ON.

Describe alternatives you've considered

None

Additional context

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions