mirror of
https://github.com/esphome/esphome.git
synced 2024-12-01 11:14:13 +01:00
commit
1e0daefa16
5 changed files with 18 additions and 8 deletions
|
@ -104,7 +104,8 @@ void CurrentBasedCover::loop() {
|
||||||
ESP_LOGD(TAG, "'%s' - Close position reached. Took %.1fs.", this->name_.c_str(), dur);
|
ESP_LOGD(TAG, "'%s' - Close position reached. Took %.1fs.", this->name_.c_str(), dur);
|
||||||
this->direction_idle_(COVER_CLOSED);
|
this->direction_idle_(COVER_CLOSED);
|
||||||
}
|
}
|
||||||
} else if (now - this->start_dir_time_ > this->max_duration_) {
|
}
|
||||||
|
if (now - this->start_dir_time_ > this->max_duration_) {
|
||||||
ESP_LOGD(TAG, "'%s' - Max duration reached. Stopping cover.", this->name_.c_str());
|
ESP_LOGD(TAG, "'%s' - Max duration reached. Stopping cover.", this->name_.c_str());
|
||||||
this->direction_idle_();
|
this->direction_idle_();
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,11 +137,10 @@ def validate_weight_name(value):
|
||||||
|
|
||||||
|
|
||||||
def download_gfonts(value):
|
def download_gfonts(value):
|
||||||
wght = value[CONF_WEIGHT]
|
name = (
|
||||||
if value[CONF_ITALIC]:
|
f"{value[CONF_FAMILY]}:ital,wght@{int(value[CONF_ITALIC])},{value[CONF_WEIGHT]}"
|
||||||
wght = f"1,{wght}"
|
)
|
||||||
name = f"{value[CONF_FAMILY]}@{value[CONF_WEIGHT]}"
|
url = f"https://fonts.googleapis.com/css2?family={name}"
|
||||||
url = f"https://fonts.googleapis.com/css2?family={value[CONF_FAMILY]}:wght@{wght}"
|
|
||||||
|
|
||||||
path = _compute_gfonts_local_path(value)
|
path = _compute_gfonts_local_path(value)
|
||||||
if path.is_file():
|
if path.is_file():
|
||||||
|
|
|
@ -3,7 +3,11 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include "esphome/core/macros.h"
|
||||||
|
|
||||||
|
#if defined(USE_ESP_IDF) || defined(USE_LIBRETINY) || USE_ARDUINO_VERSION_CODE > VERSION_CODE(3, 0, 0)
|
||||||
#include <lwip/ip_addr.h>
|
#include <lwip/ip_addr.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if USE_ARDUINO
|
#if USE_ARDUINO
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#include "esphome/core/log.h"
|
|
||||||
#include "tuya_text_sensor.h"
|
#include "tuya_text_sensor.h"
|
||||||
|
#include "esphome/core/log.h"
|
||||||
|
|
||||||
namespace esphome {
|
namespace esphome {
|
||||||
namespace tuya {
|
namespace tuya {
|
||||||
|
@ -19,6 +19,12 @@ void TuyaTextSensor::setup() {
|
||||||
this->publish_state(data);
|
this->publish_state(data);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case TuyaDatapointType::ENUM: {
|
||||||
|
std::string data = to_string(datapoint.value_enum);
|
||||||
|
ESP_LOGD(TAG, "MCU reported text sensor %u is: %s", datapoint.id, data.c_str());
|
||||||
|
this->publish_state(data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
ESP_LOGW(TAG, "Unsupported data type for tuya text sensor %u: %#02hhX", datapoint.id, (uint8_t) datapoint.type);
|
ESP_LOGW(TAG, "Unsupported data type for tuya text sensor %u: %#02hhX", datapoint.id, (uint8_t) datapoint.type);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"""Constants used by esphome."""
|
"""Constants used by esphome."""
|
||||||
|
|
||||||
__version__ = "2023.10.3"
|
__version__ = "2023.10.4"
|
||||||
|
|
||||||
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
|
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"
|
||||||
VALID_SUBSTITUTIONS_CHARACTERS = (
|
VALID_SUBSTITUTIONS_CHARACTERS = (
|
||||||
|
|
Loading…
Reference in a new issue