mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	no real good option but to disable them all manually
This commit is contained in:
		| @@ -32,12 +32,15 @@ void MQTTJSONLightComponent::setup() { | |||||||
| MQTTJSONLightComponent::MQTTJSONLightComponent(LightState *state) : state_(state) {} | MQTTJSONLightComponent::MQTTJSONLightComponent(LightState *state) : state_(state) {} | ||||||
|  |  | ||||||
| bool MQTTJSONLightComponent::publish_state_() { | bool MQTTJSONLightComponent::publish_state_() { | ||||||
|   return this->publish_json(this->get_state_topic_(), |   return this->publish_json(this->get_state_topic_(), [this](JsonObject root) { | ||||||
|                             [this](JsonObject root) { LightJSONSchema::dump_json(*this->state_, root); }); |     // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) false positive with ArduinoJson | ||||||
|  |     LightJSONSchema::dump_json(*this->state_, root); | ||||||
|  |   }); | ||||||
| } | } | ||||||
| LightState *MQTTJSONLightComponent::get_state() const { return this->state_; } | LightState *MQTTJSONLightComponent::get_state() const { return this->state_; } | ||||||
|  |  | ||||||
| void MQTTJSONLightComponent::send_discovery(JsonObject root, mqtt::SendDiscoveryConfig &config) { | void MQTTJSONLightComponent::send_discovery(JsonObject root, mqtt::SendDiscoveryConfig &config) { | ||||||
|  |   // NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks) false positive with ArduinoJson | ||||||
|   root["schema"] = "json"; |   root["schema"] = "json"; | ||||||
|   auto traits = this->state_->get_traits(); |   auto traits = this->state_->get_traits(); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user