1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-19 00:05:43 +00:00

[ruff] Enable RET and fix all violations (#9929)

This commit is contained in:
J. Nick Koston
2025-07-31 16:10:56 -10:00
committed by GitHub
parent 7a4738ec4e
commit f13e742bd5
39 changed files with 81 additions and 139 deletions

View File

@@ -312,14 +312,13 @@ CONFIG_SCHEMA = cv.All(
def exp_mqtt_message(config):
if config is None:
return cg.optional(cg.TemplateArguments(MQTTMessage))
exp = cg.StructInitializer(
return cg.StructInitializer(
MQTTMessage,
("topic", config[CONF_TOPIC]),
("payload", config.get(CONF_PAYLOAD, "")),
("qos", config[CONF_QOS]),
("retain", config[CONF_RETAIN]),
)
return exp
@coroutine_with_priority(40.0)