mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	Merge branch 'integration' into memory_api
This commit is contained in:
		| @@ -59,11 +59,10 @@ void MQTTSensorComponent::send_discovery(JsonObject root, mqtt::SendDiscoveryCon | ||||
|     root[MQTT_FORCE_UPDATE] = true; | ||||
|  | ||||
|   if (this->sensor_->get_state_class() != STATE_CLASS_NONE) { | ||||
|     auto state_class_s = state_class_to_string(this->sensor_->get_state_class()); | ||||
| #ifdef USE_STORE_LOG_STR_IN_FLASH | ||||
|     root[MQTT_STATE_CLASS] = (const __FlashStringHelper *) state_class_s; | ||||
|     root[MQTT_STATE_CLASS] = (const __FlashStringHelper *) state_class_to_string(this->sensor_->get_state_class()); | ||||
| #else | ||||
|     root[MQTT_STATE_CLASS] = LOG_STR_ARG(state_class_s); | ||||
|     root[MQTT_STATE_CLASS] = LOG_STR_ARG(state_class_to_string(this->sensor_->get_state_class())); | ||||
| #endif | ||||
|   } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user