Browse Source

Publish slampher as light to Home Assistant (#494)

rfm69
Xose Pérez 6 years ago
parent
commit
5115204b53
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      code/espurna/homeassistant.ino

+ 3
- 3
code/espurna/homeassistant.ino View File

@ -112,10 +112,10 @@ void _haSendSwitch(unsigned char i) {
root.printTo(output);
}
#if LIGHT_PROVIDER == LIGHT_PROVIDER_NONE
String component = String("switch");
#else
#if (LIGHT_PROVIDER != LIGHT_PROVIDER_NONE) || (defined(ITEAD_SLAMPHER))
String component = String("light");
#else
String component = String("switch");
#endif
String topic = getSetting("haPrefix", HOMEASSISTANT_PREFIX) +


Loading…
Cancel
Save