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

No configuration for expire_after #159

Closed
PM04290 opened this issue Apr 13, 2023 · 4 comments
Closed

No configuration for expire_after #159

PM04290 opened this issue Apr 13, 2023 · 4 comments

Comments

@PM04290
Copy link

PM04290 commented Apr 13, 2023

Some times, for example for push button or else, it would be interesting to set expire_after parameter on mqtt configuration, for sensor and binary_sensor; as it is possible to do in the configuration of zigbee2mqtt, for example: https://www.zigbee2mqtt.io/guide/configuration/devices-groups.html

real case example :
push button who send pressed time : 350ms, 1500ms, 5200ms, etc...
actually if i want to do the same function i must send a 0 (zero) value after few millisecond, so expire_after in HA save this action and is better for mqtt bandwidth :)

@dawidchyrzynski dawidchyrzynski added the selected for development Feature will be implemented in the next version label Jan 30, 2024
@dawidchyrzynski dawidchyrzynski removed the selected for development Feature will be implemented in the next version label Feb 6, 2024
@dawidchyrzynski
Copy link
Owner

This feature will be available in the upcoming version of the library. Please refer to the linked Pull Request for more information.

@PM04290
Copy link
Author

PM04290 commented Feb 7, 2024

As there were no more modifications I had to Fork the library, I added expire_after and state_class; but the most important thing was changing the mqtt connection.
I would prefer to use this library if it will continue to live.

@dawidchyrzynski
Copy link
Owner

@PM04290 the new features are already available on the develop branch. Feel free to try them.

but the most important thing was changing the mqtt connection.

Could you please provide additional details? I'm unsure about what you're referring to.

@PM04290
Copy link
Author

PM04290 commented Feb 7, 2024

Because of multiple disconnect callback when mqtt is OFF, i must put comment on callback process; only when pubsubclient detect them, with adding onDisconnect callback.
image
image
image

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

No branches or pull requests

2 participants