Skip to content

Instantly share code, notes, and snippets.

View iclanton's full-sized avatar

Ian Clanton-Thuon iclanton

  • Microsoft
  • Seattle, WA
View GitHub Profile
@iclanton
iclanton / ha-auto-refresh.js
Created February 5, 2025 02:46
Script for automatically refreshing a Home Assistant dashboard on change
/*!
* Copyright (c) Ian Clanton-Thuon. All rights reserved. Licensed under the MIT license.
*/
/*!
* Copyright (c) ElChiniNet. Licensed under the Apache 2.0 license.
*/
var esm_e=function(e,t,n){var a;void 0===n&&(n={});var i=n.retries,r=void 0===i?10:i,o=n.delay,s=void 0===o?10:o,c=n.shouldReject,d=void 0===c||c,l=null!==(a=n.rejectMessage)&&void 0!==a?a:"Could not get the result after {{ retries }} retries";return new Promise((function(n,a){var i=0,o=function(){var c=e();t(c)?n(c):++i<r?setTimeout(o,s):d?a(new Error(l.replace(/\{\{\s*retries\s*\}\}/g,"".concat(r)))):n(c)};o()}))},t=function(){return t=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};function e(e,t,n,a){return new(n||(n=Promise))((function(i,r){function o(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:ne

Keybase proof

I hereby claim:

  • I am iclanton on github.
  • I am iclanton (https://keybase.io/iclanton) on keybase.
  • I have a public key ASDfbO3gdQmek2LS9TPPEbjfCUIhlkEyyoyPGPAisGuVTwo

To claim this, I am signing this object: