UNPKG

homebridge-myplace

Version:

Exec Plugin bringing Advanatge Air MyPlace system to Homekit

58 lines (46 loc) 1.95 kB
<link rel="stylesheet" href="css/style.css"> <div class="card card-body"> <img src="images/MyPlace.png" alt="MyPlace" width="150px" class="center-it myplaceLogo"> </div> <div id="advErrorModal" class="modal fade" tabindex="-1" role="dialog"> <div class="modal-dialog modal-lg"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Error:</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body"> <p></p> </div> </div> </div> </div> <!-- jQuery must load first --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script> <!-- Then Bootstrap --> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script> <!-- Main --> <script src="js/main.js?v=0.0.7"></script> <!-- Inline JS --> <script> (async () => { // get the initial config - this is an array potentially containing multiple config blocks var pluginConfig = await homebridge.getPluginConfig(); const configSchema = await homebridge.getPluginConfigSchema(); if (!pluginConfig.length) { pluginConfig.push({}); } const configuration = pluginConfig[0]; configuration.devices = configuration.devices || []; function createForm(configSchema, configuration) { const configForm = homebridge.createForm(configSchema, configuration); configForm.onChange(async (changes) => { await homebridge.updatePluginConfig([changes]); }); } // ✅ Now call createForm inside the async function createForm(configSchema, configuration); })(); </script>