Removed ENABLE_HA_HOSTNAME_CHIPID
As per discussion in https://github.com/toblum/McLighting/issues/149 removed ENABLE_HA_HOSTNAME_CHIPID. No point in sending HOSTNAME+ChipID to HA, just use this feature to create unique ID for MQTT clients.
This commit is contained in:
parent
a27611b813
commit
cd4805a728
2 changed files with 2 additions and 11 deletions
|
@ -58,7 +58,6 @@ uint32_t autoParams[][4] = { // color, speed, mode, duration (seconds)
|
|||
#endif
|
||||
|
||||
#ifdef ENABLE_HOMEASSISTANT
|
||||
//#define ENABLE_HA_HOSTNAME_CHIPID // Uncomment/comment to add ESPChipID to end of HA hostname
|
||||
String mqtt_ha = "home/" + String(HOSTNAME) + "_ha/";
|
||||
String mqtt_ha_state_in = mqtt_ha + "state/in";
|
||||
String mqtt_ha_state_out = mqtt_ha + "state/out";
|
||||
|
|
|
@ -1044,11 +1044,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
|
|||
#ifdef MQTT_HOME_ASSISTANT_SUPPORT
|
||||
DynamicJsonBuffer jsonBuffer(JSON_ARRAY_SIZE(strip.getModeCount()) + JSON_OBJECT_SIZE(11));
|
||||
JsonObject& json = jsonBuffer.createObject();
|
||||
#ifdef ENABLE_HA_HOSTNAME_CHIPID
|
||||
json["name"] = String(String(HOSTNAME) + "-" + String(ESP.getChipId()));
|
||||
#else
|
||||
json["name"] = HOSTNAME;
|
||||
#endif
|
||||
json["name"] = HOSTNAME;
|
||||
json["platform"] = "mqtt_json";
|
||||
json["state_topic"] = mqtt_ha_state_out;
|
||||
json["command_topic"] = mqtt_ha_state_in;
|
||||
|
@ -1128,11 +1124,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
|
|||
#ifdef MQTT_HOME_ASSISTANT_SUPPORT
|
||||
DynamicJsonBuffer jsonBuffer(JSON_ARRAY_SIZE(strip.getModeCount()) + JSON_OBJECT_SIZE(11));
|
||||
JsonObject& json = jsonBuffer.createObject();
|
||||
#ifdef ENABLE_HA_HOSTNAME_CHIPID
|
||||
json["name"] = String(String(HOSTNAME) + "-" + String(ESP.getChipId()));
|
||||
#else
|
||||
json["name"] = HOSTNAME;
|
||||
#endif
|
||||
json["name"] = HOSTNAME;
|
||||
json["platform"] = "mqtt_json";
|
||||
json["state_topic"] = mqtt_ha_state_out;
|
||||
json["command_topic"] = mqtt_ha_state_in;
|
||||
|
|
Loading…
Reference in a new issue