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

[FEATURE] Enable Last Will and Testament #15

Open
JacobChrist opened this issue Nov 5, 2023 · 2 comments
Open

[FEATURE] Enable Last Will and Testament #15

JacobChrist opened this issue Nov 5, 2023 · 2 comments

Comments

@JacobChrist
Copy link

Enabling the LWT (Last Will and Testament) feature requires adding three lines of code and add the very cool functionality of giving HA the ability to detect if the device looses power.

    device.enableSharedAvailability(); // [OPTIONAL] Enables the ability to set the on/off line status of the device
    device.setAvailability(true); // Set the device to on-line
    device.enableLastWill(); // [OPTIONAL] Allows HA to detect when the device losses power (and thus disable the controls in the HA UI)
@daniloc
Copy link
Owner

daniloc commented Nov 5, 2023

No shit? Great find. Probably makes any IoT device better behaved and match people's expectations. If you wanted to add this to a potential PR I'd be into it.

@JacobChrist
Copy link
Author

No shit and done.

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