diff --git a/code/espurna/homeassistant.ino b/code/espurna/homeassistant.ino index e80fe2db..ce164184 100644 --- a/code/espurna/homeassistant.ino +++ b/code/espurna/homeassistant.ino @@ -430,6 +430,19 @@ void _haConfigure() { const bool enabled = getSetting("haEnabled", HOMEASSISTANT_ENABLED).toInt() == 1; _ha_send_flag = (enabled != _ha_enabled); _ha_enabled = enabled; + + // https://github.com/xoseperez/espurna/issues/1273 + // https://gitter.im/tinkerman-cat/espurna?at=5df8ad4655d9392300268a8c + // TODO: ensure that this is called before _lightConfigure() + // in case useCSS value is ever cached by the lights module + #if LIGHT_PROVIDER != LIGHT_PROVIDER_NONE + if (enabled) { + if (getSetting("useCSS", LIGHT_USE_CSS).toInt() == 1) { + setSetting("useCSS", 0); + } + } + #endif + _haSend(); } diff --git a/code/html/index.html b/code/html/index.html index 83909788..0bdcdc7b 100644 --- a/code/html/index.html +++ b/code/html/index.html @@ -536,7 +536,12 @@
-