mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 17:27:59 +01:00
Fix lint + test
This commit is contained in:
parent
a0bd95a790
commit
819bb7b8ed
4 changed files with 6 additions and 2 deletions
|
@ -454,6 +454,7 @@ async def to_code(config):
|
|||
if CONF_PUBLISH_NAN_AS_NONE in config:
|
||||
cg.add(var.set_publish_nan_as_none(config[CONF_PUBLISH_NAN_AS_NONE]))
|
||||
|
||||
|
||||
MQTT_PUBLISH_ACTION_SCHEMA = cv.Schema(
|
||||
{
|
||||
cv.GenerateID(): cv.use_id(MQTTClientComponent),
|
||||
|
|
|
@ -608,7 +608,9 @@ void MQTTClientComponent::set_log_message_template(MQTTMessage &&message) { this
|
|||
const MQTTDiscoveryInfo &MQTTClientComponent::get_discovery_info() const { return this->discovery_info_; }
|
||||
void MQTTClientComponent::set_topic_prefix(const std::string &topic_prefix) { this->topic_prefix_ = topic_prefix; }
|
||||
const std::string &MQTTClientComponent::get_topic_prefix() const { return this->topic_prefix_; }
|
||||
void MQTTClientComponent::set_publish_nan_as_none(bool publish_nan_as_none) { this->publish_nan_as_none_ = publish_nan_as_none; }
|
||||
void MQTTClientComponent::set_publish_nan_as_none(bool publish_nan_as_none) {
|
||||
this->publish_nan_as_none_ = publish_nan_as_none;
|
||||
}
|
||||
bool MQTTClientComponent::is_publish_nan_as_none() const { return this->publish_nan_as_none_; }
|
||||
void MQTTClientComponent::disable_birth_message() {
|
||||
this->birth_message_.topic = "";
|
||||
|
|
|
@ -690,6 +690,7 @@ CONF_PRIORITY = "priority"
|
|||
CONF_PROJECT = "project"
|
||||
CONF_PROTOCOL = "protocol"
|
||||
CONF_PUBLISH_INITIAL_STATE = "publish_initial_state"
|
||||
CONF_PUBLISH_NAN_AS_NONE = "publish_nan_as_none"
|
||||
CONF_PULL_MODE = "pull_mode"
|
||||
CONF_PULLDOWN = "pulldown"
|
||||
CONF_PULLUP = "pullup"
|
||||
|
@ -955,7 +956,6 @@ CONF_X_GRID = "x_grid"
|
|||
CONF_Y_GRID = "y_grid"
|
||||
CONF_YEAR = "year"
|
||||
CONF_ZERO = "zero"
|
||||
CONF_PUBLISH_NAN_AS_NONE = "publish_nan_as_none"
|
||||
|
||||
TYPE_GIT = "git"
|
||||
TYPE_LOCAL = "local"
|
||||
|
|
|
@ -60,6 +60,7 @@ mqtt:
|
|||
- mqtt.publish:
|
||||
topic: some/topic
|
||||
payload: Good-bye
|
||||
publish_nan_as_none: false
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
|
|
Loading…
Reference in a new issue