1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-02 16:11:53 +00:00

Compare commits

...

9 Commits

Author SHA1 Message Date
Jesse Hills
1fac91a659 Merge pull request #2199 from esphome/bump-2021.8.1
2021.8.1
2021-08-24 14:40:24 +12:00
Jesse Hills
0a4837c1f0 Bump version to 2021.8.1 2021-08-24 14:26:28 +12:00
mtl010957
e7404183a0 Internally all temperature units are Celsius so just send it directly (#1840) 2021-08-24 14:26:28 +12:00
Samuel Sieb
44f8dcfb6e Fix template select lambda (#2198) 2021-08-24 14:26:27 +12:00
Chris Nussbaum
481e0e98f8 Tuya fan component uses enum datapoint type for speed instead of integer (#2182)
Co-authored-by: Chris Nussbaum <chris.nussbaum@protolabs.com>
2021-08-24 14:26:27 +12:00
puuu
9de40c26eb mqtt_light: remove legacy API config that is not compatible with HA 2021.8 (#2183) 2021-08-24 14:26:27 +12:00
Oxan van Leeuwen
ad953f02d1 Fix addressable light control without transitions & effects with transitions (#2187) 2021-08-24 14:26:27 +12:00
puuu
3869e56521 Light: include ON_OFF capability to BRIGHTNESS ColorMode (#2186) 2021-08-24 14:26:27 +12:00
Jesse Hills
63d87b17aa Fix pypi download url (#2177) 2021-08-24 14:26:27 +12:00
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__))