mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 09:18:00 +01:00
Apply suggestions from code review
Updated Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
db1ee1babc
commit
60f505f195
1 changed files with 2 additions and 3 deletions
|
@ -297,7 +297,7 @@ CONFIG_SCHEMA = cv.All(
|
||||||
cv.Optional(CONF_QOS, default=0): cv.mqtt_qos,
|
cv.Optional(CONF_QOS, default=0): cv.mqtt_qos,
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
cv.Optional(CONF_PUBLISH_NAN_AS_NONE): cv.boolean,
|
cv.Optional(CONF_PUBLISH_NAN_AS_NONE, default=False): cv.boolean,
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
validate_config,
|
validate_config,
|
||||||
|
@ -451,7 +451,6 @@ async def to_code(config):
|
||||||
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
|
trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var)
|
||||||
await automation.build_automation(trigger, [], conf)
|
await automation.build_automation(trigger, [], conf)
|
||||||
|
|
||||||
if CONF_PUBLISH_NAN_AS_NONE in config:
|
|
||||||
cg.add(var.set_publish_nan_as_none(config[CONF_PUBLISH_NAN_AS_NONE]))
|
cg.add(var.set_publish_nan_as_none(config[CONF_PUBLISH_NAN_AS_NONE]))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue