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

Fix MQTT spam #17

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Fix MQTT spam #17

wants to merge 6 commits into from

Conversation

jonnor
Copy link
Owner

@jonnor jonnor commented Jan 12, 2020

Closes #14

Note that one can still get 1 per second when a user actively holds a button down. This should be rare enough to not be disruptive.

Before one had to update the list of not-running devices in the tests,
after adding new devices.
This had not been done recently so tests where failing.
Avoid needing to do this by computing the expected-not-running devices
based on the known tests devices and all configured devices
The argument definition a method is only evaluated once,
at module load time, so multiple instances of States()
actually shared instances of .lock and .opener

Caused problems when adding some new tests for States,
probably did not have any ill effects otherwise
This should avoid MQTT messages being spammed continiously in this case
Fixes #14
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.

Unecessary MQTT messages when door is unlocked
1 participant