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

[HA Discovery] Save the BLE settings and change switch to optimistic false #1364

Merged
merged 1 commit into from
Dec 19, 2022

Conversation

1technophile
Copy link
Owner

@1technophile 1technophile commented Dec 15, 2022

Description:

The current way of saving settings is through the retain flag of the MQTT commands, unfortunately if several commands are issues they may overwrite each other. So as to prevent it, we now leverage the memory saving introduced earlier to store the BLE settings. Also leverage the config status publication to show the state through the button position (optimistic false)

image

This could be breaking for people that were using before /commands/BTtoMQTT/config so as to retrieve the status of the BT configuration.

Checklist:

  • The pull request is done against the latest development branch
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • I accept the DCO.

…false

The current way of saving settings is through the retain flag of the MQTT commands, unfortunately if several commands are issues they may overwrite each other. So as to prevent it, we now leverage the memory saving introduced earlier to store the BLE settings.
Also leverage the config status publication to show the state through the button position (optimistic false)
@1technophile 1technophile changed the title [HA discovery] Save the BLE settings and change switch to optimistic false [HA Discovery] Save the BLE settings and change switch to optimistic false Dec 15, 2022
@1technophile
Copy link
Owner Author

@BadWolf42 this is changing the topic on which the BT config dump was published for information. I think it is better to have it there as this dump is more status information rather than a command. Let me know if any comments.

@BadWolf42
Copy link
Contributor

Hello @1technophile,
I do not understand all the modifications you made, but I agree with the purpose of this change if I got it right:
"Configuration information should not be published on the same topic than the one used to change configuration".
I did not change the config dump on my initial commit as was too much change at once, gade you made it :)
Bad

@1technophile
Copy link
Owner Author

@BadWolf42, the modifications enable to save the BLE settings each time a switch or a change of configuration is triggered in HA

@1technophile 1technophile merged commit 25d9215 into development Dec 19, 2022
@1technophile 1technophile deleted the save-ble-settings branch December 19, 2022 14:44
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