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

Emulation state toggle #304

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Emulation state toggle #304

wants to merge 13 commits into from

Conversation

PaulWieland
Copy link
Contributor

  • Remove auto detection of security + 1 wall panels
  • Add web UI switch to enable or disable emulation mode
  • Restore switch state from flash
  • Quiet down the debug logging of sec +1 states, should only log upon change of state

PaulWieland and others added 8 commits July 11, 2024 16:36
change wall panel emulation states from WAITING | ACTIVE to ENABLED | DISABLED.

Add set mode to protocol so the GUI switch can toggle the state between enabled or disabled.

Default mode is disabled. Removed code that watches for a wall panel to simplify.
@bdraco
Copy link
Member

bdraco commented Jul 11, 2024

The change looked a lot bigger than it is, but that was only because the branch was out of sync with main. I merged it in to get it back in sync

Comment on lines 197 to 200
// auto last_state = this->light_state;
// if(last_state == light_state){
// return;
// }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover debug code?

Comment on lines 209 to 210
// static LockState last_state = LockState::UNKNOWN;
// if(light_state != last_state){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover debug code?

Comment on lines 222 to 224
// if(obstruction_state != last_state){
// ESP_LOGD(TAG, "Obstruction: state=%s", ObstructionState_to_string(*this->obstruction_state));
// }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover debug code?

Comment on lines +26 to +28
bool value = false;
this->pref_ = global_preferences->make_preference<float>(this->get_object_id_hash());
this->pref_.load(&value);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since esp8266 stores prefs in flash this may cause all prefs to be lost when a new one is added since they are restored in order

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