mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							f9b3e61c0f
						
					
				
				
					commit
					9b28c732c6
				
			| @@ -31,7 +31,8 @@ void TimeBasedCover::loop() { | |||||||
|   this->recompute_position_(); |   this->recompute_position_(); | ||||||
|  |  | ||||||
|   if (this->is_at_target_()) { |   if (this->is_at_target_()) { | ||||||
|     if (this->has_built_in_endstop_ && (this->target_position_ == COVER_OPEN || this->target_position_ == COVER_CLOSED)) { |     if (this->has_built_in_endstop_ && | ||||||
|  |         (this->target_position_ == COVER_OPEN || this->target_position_ == COVER_CLOSED)) { | ||||||
|       // Don't trigger stop, let the cover stop by itself. |       // Don't trigger stop, let the cover stop by itself. | ||||||
|       this->current_operation = COVER_OPERATION_IDLE; |       this->current_operation = COVER_OPERATION_IDLE; | ||||||
|     } else { |     } else { | ||||||
|   | |||||||
| @@ -2,13 +2,13 @@ | |||||||
| #include "esphome/core/log.h" | #include "esphome/core/log.h" | ||||||
|  |  | ||||||
| namespace esphome { | namespace esphome { | ||||||
| namespace wifi_info_text_sensor { | namespace wifi_info { | ||||||
|  |  | ||||||
| static const char *TAG = "wifi_info"; | static const char *TAG = "wifi_info"; | ||||||
|  |  | ||||||
| void IPAddressWiFiInfo::dump_config() override { LOG_TEXT_SENSOR("", "WifiInfo IPAddress", this); } | void IPAddressWiFiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo IPAddress", this); } | ||||||
| void SSIDWiFiInfo::dump_config() override { LOG_TEXT_SENSOR("", "WifiInfo SSID", this); } | void SSIDWiFiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo SSID", this); } | ||||||
| void BSSIDWiFiInfo::dump_config() override { LOG_TEXT_SENSOR("", "WifiInfo BSSID", this); } | void BSSIDWiFiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo BSSID", this); } | ||||||
|  |  | ||||||
| }  // namespace wifi_info_text_sensor | }  // namespace wifi_info | ||||||
| }  // namespace esphome | }  // namespace esphome | ||||||
|   | |||||||
| @@ -18,6 +18,7 @@ class IPAddressWiFiInfo : public Component, public text_sensor::TextSensor { | |||||||
|   } |   } | ||||||
|   float get_setup_priority() const override { return setup_priority::AFTER_WIFI; } |   float get_setup_priority() const override { return setup_priority::AFTER_WIFI; } | ||||||
|   std::string unique_id() override { return get_mac_address() + "-wifiinfo-ip"; } |   std::string unique_id() override { return get_mac_address() + "-wifiinfo-ip"; } | ||||||
|  |   void dump_config() override; | ||||||
|  |  | ||||||
|  protected: |  protected: | ||||||
|   IPAddress last_ip_; |   IPAddress last_ip_; | ||||||
| @@ -34,6 +35,7 @@ class SSIDWiFiInfo : public Component, public text_sensor::TextSensor { | |||||||
|   } |   } | ||||||
|   float get_setup_priority() const override { return setup_priority::AFTER_WIFI; } |   float get_setup_priority() const override { return setup_priority::AFTER_WIFI; } | ||||||
|   std::string unique_id() override { return get_mac_address() + "-wifiinfo-ssid"; } |   std::string unique_id() override { return get_mac_address() + "-wifiinfo-ssid"; } | ||||||
|  |   void dump_config() override; | ||||||
|  |  | ||||||
|  protected: |  protected: | ||||||
|   std::string last_ssid_; |   std::string last_ssid_; | ||||||
| @@ -52,6 +54,7 @@ class BSSIDWiFiInfo : public Component, public text_sensor::TextSensor { | |||||||
|   } |   } | ||||||
|   float get_setup_priority() const override { return setup_priority::AFTER_WIFI; } |   float get_setup_priority() const override { return setup_priority::AFTER_WIFI; } | ||||||
|   std::string unique_id() override { return get_mac_address() + "-wifiinfo-bssid"; } |   std::string unique_id() override { return get_mac_address() + "-wifiinfo-bssid"; } | ||||||
|  |   void dump_config() override; | ||||||
|  |  | ||||||
|  protected: |  protected: | ||||||
|   wifi::bssid_t last_bssid_; |   wifi::bssid_t last_bssid_; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user