Merge pull request #2199 from esphome/bump-2021.8.1

2021.8.1
This commit is contained in:
Jesse Hills 2021-08-24 14:40:24 +12:00 committed by GitHub
commit 1fac91a659
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 12 additions and 11 deletions

View file

@ -46,9 +46,14 @@ void AddressableLight::write_state(LightState *state) {
// don't use LightState helper, gamma correction+brightness is handled by ESPColorView
this->all() = esp_color_from_light_color_values(val);
this->schedule_show();
}
void AddressableLightTransformer::start() {
// don't try to transition over running effects.
if (this->light_.is_effect_active())
return;
auto end_values = this->target_values_;
this->target_color_ = esp_color_from_light_color_values(end_values);

View file

@ -52,7 +52,7 @@ enum class ColorMode : uint8_t {
/// Only on/off control.
ON_OFF = (uint8_t) ColorCapability::ON_OFF,
/// Dimmable light.
BRIGHTNESS = (uint8_t) ColorCapability::BRIGHTNESS,
BRIGHTNESS = (uint8_t)(ColorCapability::ON_OFF | ColorCapability::BRIGHTNESS),
/// White output only (use only if the light also has another color mode such as RGB).
WHITE = (uint8_t)(ColorCapability::ON_OFF | ColorCapability::BRIGHTNESS | ColorCapability::WHITE),
/// Controllable color temperature output.

View file

@ -60,6 +60,8 @@ void MQTTClimateComponent::send_discovery(JsonObject &root, mqtt::SendDiscoveryC
root["max_temp"] = traits.get_visual_max_temperature();
// temp_step
root["temp_step"] = traits.get_visual_temperature_step();
// temperature units are always coerced to Celsius internally
root["temp_unit"] = "C";
if (traits.supports_preset(CLIMATE_PRESET_AWAY)) {
// away_mode_command_topic

View file

@ -54,12 +54,6 @@ void MQTTJSONLightComponent::send_discovery(JsonObject &root, mqtt::SendDiscover
// legacy API
if (traits.supports_color_capability(ColorCapability::BRIGHTNESS))
root["brightness"] = true;
if (traits.supports_color_capability(ColorCapability::RGB))
root["rgb"] = true;
if (traits.supports_color_capability(ColorCapability::COLOR_TEMPERATURE))
root["color_temp"] = true;
if (traits.supports_color_capability(ColorCapability::WHITE))
root["white_value"] = true;
if (this->state_->supports_effects()) {
root["effect"] = true;

View file

@ -55,7 +55,7 @@ async def to_code(config):
if CONF_LAMBDA in config:
template_ = await cg.process_lambda(
config[CONF_LAMBDA], [], return_type=cg.optional.template(str)
config[CONF_LAMBDA], [], return_type=cg.optional.template(cg.std_string)
)
cg.add(var.set_template(template_))

View file

@ -80,7 +80,7 @@ void TuyaFan::write_state() {
}
if (this->speed_id_.has_value()) {
ESP_LOGV(TAG, "Setting speed: %d", this->fan_->speed);
this->parent_->set_integer_datapoint_value(*this->speed_id_, this->fan_->speed - 1);
this->parent_->set_enum_datapoint_value(*this->speed_id_, this->fan_->speed - 1);
}
}

View file

@ -1,6 +1,6 @@
"""Constants used by esphome."""
__version__ = "2021.8.0"
__version__ = "2021.8.1"
ESP_PLATFORM_ESP32 = "ESP32"
ESP_PLATFORM_ESP8266 = "ESP8266"

View file

@ -21,7 +21,7 @@ PYPI_URL = "https://pypi.python.org/pypi/{}".format(PROJECT_PACKAGE_NAME)
GITHUB_PATH = "{}/{}".format(PROJECT_GITHUB_USERNAME, PROJECT_GITHUB_REPOSITORY)
GITHUB_URL = "https://github.com/{}".format(GITHUB_PATH)
DOWNLOAD_URL = "{}/archive/v{}.zip".format(GITHUB_URL, const.__version__)
DOWNLOAD_URL = "{}/archive/{}.zip".format(GITHUB_URL, const.__version__)
here = os.path.abspath(os.path.dirname(__file__))