mirror of
https://github.com/esphome/esphome.git
synced 2025-09-16 18:22:22 +01:00
feat(MQTT): Add QoS option for each MQTT component (#6279)
This commit is contained in:
@@ -490,6 +490,8 @@ def get_default_topic_for(data, component_type, name, suffix):
|
||||
async def register_mqtt_component(var, config):
|
||||
await cg.register_component(var, {})
|
||||
|
||||
if CONF_QOS in config:
|
||||
cg.add(var.set_qos(config[CONF_QOS]))
|
||||
if CONF_RETAIN in config:
|
||||
cg.add(var.set_retain(config[CONF_RETAIN]))
|
||||
if not config.get(CONF_DISCOVERY, True):
|
||||
|
Reference in New Issue
Block a user