Skip to content

Commit

Permalink
Publish slampher as light to Home Assistant (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoseperez committed Mar 2, 2018
1 parent 191e805 commit 5115204
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/espurna/homeassistant.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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) +
Expand Down

0 comments on commit 5115204

Please sign in to comment.