fix wifi info (#709)

* fix wifi info

* lint time based cover
This commit is contained in:
Guillermo Ruffino 2019-08-29 21:34:29 -03:00 committed by GitHub
parent f9b3e61c0f
commit 9b28c732c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View file

@ -31,7 +31,8 @@ void TimeBasedCover::loop() {
this->recompute_position_();
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.
this->current_operation = COVER_OPERATION_IDLE;
} else {

View file

@ -2,13 +2,13 @@
#include "esphome/core/log.h"
namespace esphome {
namespace wifi_info_text_sensor {
namespace wifi_info {
static const char *TAG = "wifi_info";
void IPAddressWiFiInfo::dump_config() override { LOG_TEXT_SENSOR("", "WifiInfo IPAddress", this); }
void SSIDWiFiInfo::dump_config() override { LOG_TEXT_SENSOR("", "WifiInfo SSID", this); }
void BSSIDWiFiInfo::dump_config() override { LOG_TEXT_SENSOR("", "WifiInfo BSSID", this); }
void IPAddressWiFiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo IPAddress", this); }
void SSIDWiFiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo SSID", this); }
void BSSIDWiFiInfo::dump_config() { LOG_TEXT_SENSOR("", "WifiInfo BSSID", this); }
} // namespace wifi_info_text_sensor
} // namespace wifi_info
} // namespace esphome

View file

@ -18,6 +18,7 @@ class IPAddressWiFiInfo : public Component, public text_sensor::TextSensor {
}
float get_setup_priority() const override { return setup_priority::AFTER_WIFI; }
std::string unique_id() override { return get_mac_address() + "-wifiinfo-ip"; }
void dump_config() override;
protected:
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; }
std::string unique_id() override { return get_mac_address() + "-wifiinfo-ssid"; }
void dump_config() override;
protected:
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; }
std::string unique_id() override { return get_mac_address() + "-wifiinfo-bssid"; }
void dump_config() override;
protected:
wifi::bssid_t last_bssid_;