Skip to content

Commit

Permalink
mini1g3 fix detatched
Browse files Browse the repository at this point in the history
  • Loading branch information
markirb committed Sep 11, 2024
1 parent 82596f1 commit 155e54b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/ShellyMini1Gen3/shelly_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ void CreateComponents(std::vector<std::unique_ptr<Component>> *comps,
FindOutput(1), mgos_sys_config_get_gdo1(), comps, accs,
svr, true);
} else {
CreateHAPSwitch(1, mgos_sys_config_get_sw1(), mgos_sys_config_get_in1(),
comps, accs, svr, true);
CreateHAPSwitch(
1, mgos_sys_config_get_sw1(), mgos_sys_config_get_in1(), comps, accs,
svr, mgos_sys_config_get_sw1_in_mode() != (int) InMode::kDetached);
}
}

Expand Down
5 changes: 3 additions & 2 deletions src/ShellyMini1PMGen3/shelly_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ void CreateComponents(std::vector<std::unique_ptr<Component>> *comps,
FindOutput(1), mgos_sys_config_get_gdo1(), comps, accs,
svr, true);
} else {
CreateHAPSwitch(1, mgos_sys_config_get_sw1(), mgos_sys_config_get_in1(),
comps, accs, svr, true);
CreateHAPSwitch(
1, mgos_sys_config_get_sw1(), mgos_sys_config_get_in1(), comps, accs,
svr, mgos_sys_config_get_sw1_in_mode() != (int) InMode::kDetached);
}
}

Expand Down

0 comments on commit 155e54b

Please sign in to comment.