json size of ha-sensors

This commit is contained in:
MichaelDvP
2020-11-15 17:30:15 +01:00
parent b782993eb4
commit fdaddcdbdd
2 changed files with 2 additions and 2 deletions

View File

@@ -719,7 +719,7 @@ void Mqtt::register_mqtt_ha_binary_sensor(const __FlashStringHelper * name, cons
snprintf_P(topic, sizeof(topic), PSTR("homeassistant/binary_sensor/ems-esp/%s/config"), entity); snprintf_P(topic, sizeof(topic), PSTR("homeassistant/binary_sensor/ems-esp/%s/config"), entity);
// queue MQTT publish // queue MQTT publish
publish(topic, doc.as<JsonObject>()); publish_retain(topic, doc.as<JsonObject>(), true);
} }
// HA config for a normal 'sensor' type // HA config for a normal 'sensor' type

View File

@@ -38,7 +38,7 @@
using uuid::console::Shell; using uuid::console::Shell;
#define EMSESP_MAX_JSON_SIZE_HA_CONFIG 256 // for small HA config payloads #define EMSESP_MAX_JSON_SIZE_HA_CONFIG 384 // for small HA config payloads
#define EMSESP_MAX_JSON_SIZE_SMALL 384 // for smaller json docs when using StaticJsonDocument #define EMSESP_MAX_JSON_SIZE_SMALL 384 // for smaller json docs when using StaticJsonDocument
#define EMSESP_MAX_JSON_SIZE_MEDIUM 768 // for medium json docs from ems devices, when using StaticJsonDocument #define EMSESP_MAX_JSON_SIZE_MEDIUM 768 // for medium json docs from ems devices, when using StaticJsonDocument
#define EMSESP_MAX_JSON_SIZE_LARGE 1024 // for large json docs from ems devices, like boiler or thermostat data. Using StaticJsonDocument #define EMSESP_MAX_JSON_SIZE_LARGE 1024 // for large json docs from ems devices, like boiler or thermostat data. Using StaticJsonDocument