mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	| @@ -62,7 +62,7 @@ void TextSensor::add_on_raw_state_callback(std::function<void(std::string)> call | |||||||
| std::string TextSensor::get_state() const { return this->state; } | std::string TextSensor::get_state() const { return this->state; } | ||||||
| std::string TextSensor::get_raw_state() const { return this->raw_state; } | std::string TextSensor::get_raw_state() const { return this->raw_state; } | ||||||
| void TextSensor::internal_send_state_to_frontend(const std::string &state) { | void TextSensor::internal_send_state_to_frontend(const std::string &state) { | ||||||
|   this->state = this->raw_state; |   this->state = state; | ||||||
|   this->has_state_ = true; |   this->has_state_ = true; | ||||||
|   ESP_LOGD(TAG, "'%s': Sending state '%s'", this->name_.c_str(), state.c_str()); |   ESP_LOGD(TAG, "'%s': Sending state '%s'", this->name_.c_str(), state.c_str()); | ||||||
|   this->callback_.call(state); |   this->callback_.call(state); | ||||||
|   | |||||||
| @@ -390,8 +390,6 @@ void WebServer::handle_switch_request(AsyncWebServerRequest *request, const UrlM | |||||||
| #ifdef USE_BUTTON | #ifdef USE_BUTTON | ||||||
| void WebServer::handle_button_request(AsyncWebServerRequest *request, const UrlMatch &match) { | void WebServer::handle_button_request(AsyncWebServerRequest *request, const UrlMatch &match) { | ||||||
|   for (button::Button *obj : App.get_buttons()) { |   for (button::Button *obj : App.get_buttons()) { | ||||||
|     if (obj->is_internal()) |  | ||||||
|       continue; |  | ||||||
|     if (obj->get_object_id() != match.id) |     if (obj->get_object_id() != match.id) | ||||||
|       continue; |       continue; | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,6 +1,6 @@ | |||||||
| """Constants used by esphome.""" | """Constants used by esphome.""" | ||||||
|  |  | ||||||
| __version__ = "2021.12.0" | __version__ = "2021.12.1" | ||||||
|  |  | ||||||
| ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_" | ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_" | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user