1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-10 23:32:23 +01:00

LibreTiny: enable MQTT, bump to v1.4.1 (#5419)

This commit is contained in:
Kuba Szczodrzyński
2023-09-26 23:23:21 +02:00
committed by GitHub
parent 607d0b4264
commit 2f7a378c7b
5 changed files with 87 additions and 6 deletions

View File

@@ -250,7 +250,7 @@ CONFIG_SCHEMA = cv.All(
}
),
validate_config,
cv.only_on(["esp32", "esp8266"]),
cv.only_on(["esp32", "esp8266", "bk72xx"]),
)
@@ -271,10 +271,10 @@ def exp_mqtt_message(config):
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
await cg.register_component(var, config)
# Add required libraries for ESP8266
if CORE.is_esp8266:
# Add required libraries for ESP8266 and LibreTiny
if CORE.is_esp8266 or CORE.is_libretiny:
# https://github.com/heman/async-mqtt-client/blob/master/library.json
cg.add_library("heman/AsyncMqttClient-esphome", "1.0.0")
cg.add_library("heman/AsyncMqttClient-esphome", "2.0.0")
cg.add_define("USE_MQTT")
cg.add_global(mqtt_ns.using)