From 5115204b53a33a7e69f26c0f8c3de99bfb360319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Fri, 2 Mar 2018 19:13:43 +0100 Subject: [PATCH] Publish slampher as light to Home Assistant (#494) --- code/espurna/homeassistant.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/espurna/homeassistant.ino b/code/espurna/homeassistant.ino index a869a2ad..dc81d6d0 100644 --- a/code/espurna/homeassistant.ino +++ b/code/espurna/homeassistant.ino @@ -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) +