Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

Commit

Permalink
v1.1.11
Browse files Browse the repository at this point in the history
- More Auto-Discovery fix for HA version >= 0.84 #286
- Suggestions from home-assistant/core#19420
  • Loading branch information
debsahu committed Dec 18, 2018
1 parent c755fa2 commit 4df3667
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 2 additions & 4 deletions Arduino/McLighting/request_handlers.h
Original file line number Diff line number Diff line change
Expand Up @@ -936,11 +936,10 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
ha_send_data.detach();
mqtt_client.subscribe(mqtt_ha_state_in.c_str(), qossub);
#ifdef MQTT_HOME_ASSISTANT_SUPPORT
DynamicJsonDocument jsonBuffer(JSON_ARRAY_SIZE(strip.getModeCount()) + JSON_OBJECT_SIZE(12));
DynamicJsonDocument jsonBuffer(JSON_ARRAY_SIZE(strip.getModeCount()) + JSON_OBJECT_SIZE(12) + 1500);
JsonObject json = jsonBuffer.to<JsonObject>();
json["name"] = HOSTNAME;
#ifdef MQTT_HOME_ASSISTANT_0_84_SUPPORT
json["platform"] = "mqtt";
json["schema"] = "json";
#else
json["platform"] = "mqtt_json";
Expand Down Expand Up @@ -1021,11 +1020,10 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t * payload, size_t lenght
uint16_t packetIdSub2 = amqttClient.subscribe((char *)mqtt_ha_state_in.c_str(), qossub);
DBG_OUTPUT_PORT.printf("Subscribing at QoS %d, packetId: ", qossub); DBG_OUTPUT_PORT.println(packetIdSub2);
#ifdef MQTT_HOME_ASSISTANT_SUPPORT
DynamicJsonDocument jsonBuffer(JSON_ARRAY_SIZE(strip.getModeCount()) + JSON_OBJECT_SIZE(12));
DynamicJsonDocument jsonBuffer(JSON_ARRAY_SIZE(strip.getModeCount()) + JSON_OBJECT_SIZE(12) + 1500);
JsonObject json = jsonBuffer.to<JsonObject>();
json["name"] = HOSTNAME;
#ifdef MQTT_HOME_ASSISTANT_0_84_SUPPORT
json["platform"] = "mqtt";
json["schema"] = "json";
#else
json["platform"] = "mqtt_json";
Expand Down
2 changes: 1 addition & 1 deletion Arduino/McLighting/version.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define SKETCH_VERSION "2.1.10"
#define SKETCH_VERSION "2.1.11"
4 changes: 4 additions & 0 deletions Arduino/McLighting/version_info.ino
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,8 @@
*
* 16 Dec 2018 v 1.1.10
* - more ArduinoJson library memory managment fixes
*
* 18 Dec 2018 v 2.1.11
* - More Auto-Discovery fix for HA version >= 0.84 #286
* - Suggestions from https://github.com/home-assistant/home-assistant/issues/19420
*/

0 comments on commit 4df3667

Please sign in to comment.