mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	Do not call component update on failed components (#1392)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
		| @@ -266,7 +266,11 @@ template<typename... Ts> class UpdateComponentAction : public Action<Ts...> { | |||||||
|  public: |  public: | ||||||
|   UpdateComponentAction(PollingComponent *component) : component_(component) {} |   UpdateComponentAction(PollingComponent *component) : component_(component) {} | ||||||
|  |  | ||||||
|   void play(Ts... x) override { this->component_->update(); } |   void play(Ts... x) override { | ||||||
|  |     if (this->component_->is_failed()) | ||||||
|  |       return; | ||||||
|  |     this->component_->update(); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  protected: |  protected: | ||||||
|   PollingComponent *component_; |   PollingComponent *component_; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user