10 if (!newval.has_value()) {
12 ESP_LOGW(TAG,
"Value '%s' for tag %s is not a number",
val.c_str(), this->tag.c_str());
void publish_state(float state)
Publish a new state to the front-end.
void dump_config() override
TeleInfoSensor(const char *tag)
void publish_val(const std::string &val) override
ESPHOME_LOG_TAG(TAG, "teleinfo_sensor")
optional< T > parse_number(const char *str)
Parse an unsigned decimal number from a null-terminated string.