1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-07 18:41:53 +00:00

Compare commits

...

56 Commits

Author SHA1 Message Date
Jesse Hills
ccbfa20bb9 Merge pull request #3918 from esphome/bump-2022.10.0
2022.10.0
2022-10-19 11:13:16 +13:00
Jesse Hills
58cd754e07 Fix bad merge 2022-10-19 10:50:32 +13:00
Jesse Hills
d1263e583b Bump version to 2022.10.0 2022-10-19 10:30:22 +13:00
Jesse Hills
67c911c37f Merge branch 'beta' into bump-2022.10.0 2022-10-19 10:30:21 +13:00
Jesse Hills
288e3c3e3e Merge pull request #3909 from esphome/bump-2022.10.0b2
2022.10.0b2
2022-10-15 09:12:58 +13:00
Jesse Hills
a84378c6c2 Bump version to 2022.10.0b2 2022-10-15 08:37:11 +13:00
Jesse Hills
b6073408f4 Remove address type map from bluetooth proxy (#3905) 2022-10-15 08:37:11 +13:00
Frédéric Jouault
b2d91ac5de Send true and not RSSI in ble_presence (#3904) 2022-10-15 08:37:11 +13:00
Sergey Dudanov
8bf34e09f4 Modbus QWORD fix (#3856) 2022-10-15 08:37:11 +13:00
Guillermo Ruffino
be914f2c15 fix never calling preset change trigger (#3864)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2022-10-15 08:37:11 +13:00
Jesse Hills
e8de6a3a67 Merge pull request #3883 from esphome/bump-2022.9.4
2022.9.4
2022-10-07 16:56:22 +13:00
Jesse Hills
3c320c4c83 Bump version to 2022.9.4 2022-10-07 16:34:39 +13:00
Jesse Hills
3b83f967e4 Dont add wifi block to yaml if discovered device uses ethernet (#3882) 2022-10-07 16:34:39 +13:00
Jesse Hills
5e96b8ef7c Bump esphome-dashboard to 20221007.0 (#3881) 2022-10-07 16:34:39 +13:00
Jesse Hills
5df0e82c37 Add network type to mdns service message (#3880) 2022-10-07 16:34:38 +13:00
Jesse Hills
2d58239b74 Merge pull request #3876 from esphome/bump-2022.9.3
2022.9.3
2022-10-06 09:57:39 +13:00
Jesse Hills
6b52f62531 Bump version to 2022.9.3 2022-10-06 09:22:01 +13:00
Jesse Hills
1001d9c04e Bluetooth Proxy active connections (#3817) 2022-10-06 09:22:00 +13:00
Jesse Hills
119c3f6f46 Merge pull request #3853 from esphome/bump-2022.9.2
2022.9.2
2022-09-29 16:18:21 +13:00
Jesse Hills
d2c1c7507c Bump version to 2022.9.2 2022-09-29 16:00:55 +13:00
Guillermo Ruffino
efdb3d1f40 Bump dashboard to 20220925.0 (#3846) 2022-09-29 16:00:55 +13:00
Jesse Hills
9dbc32b85f Merge pull request #3839 from esphome/bump-2022.9.1
2022.9.1
2022-09-22 07:51:52 +12:00
Jesse Hills
66226abb48 Bump version to 2022.9.1 2022-09-22 07:40:15 +12:00
Jesse Hills
34bef2f2ca Revert "fix spi timing issues" (#3838) 2022-09-22 07:40:15 +12:00
Jesse Hills
fdd4ca6837 Merge pull request #3837 from esphome/bump-2022.9.0
2022.9.0
2022-09-21 15:59:34 +12:00
Jesse Hills
9655362f23 Bump version to 2022.9.0 2022-09-21 15:34:02 +12:00
Jesse Hills
130c9fad22 Merge branch 'beta' into bump-2022.9.0 2022-09-21 15:34:02 +12:00
Jesse Hills
041eb8f6cc Merge pull request #3783 from esphome/bump-2022.8.3
2022.8.3
2022-09-06 18:54:28 +12:00
Jesse Hills
733a84df75 Bump version to 2022.8.3 2022-09-06 16:50:17 +12:00
Jesse Hills
acd0b50b40 Fix HA addon auth using HA credentials (#3758) 2022-09-06 16:50:11 +12:00
Jesse Hills
60e46d485e Merge pull request #3781 from esphome/bump-2022.8.2
2022.8.2
2022-09-06 15:38:46 +12:00
Jesse Hills
5bf0c92318 Bump version to 2022.8.2 2022-09-06 13:12:00 +12:00
Avirsaam
39d493c278 Update modbus_controller.cpp (#3768) 2022-09-06 13:12:00 +12:00
anatoly-savchenkov
d2ce62aa13 Ignore NaN states in the integration component (#3767) 2022-09-06 13:12:00 +12:00
Jesse Hills
c8eb30ef27 Initial bluetooth_proxy support (#3736) 2022-09-06 13:11:54 +12:00
Jesse Hills
31ad75d01b Merge pull request #3757 from esphome/bump-2022.8.1
2022.8.1
2022-09-01 13:59:03 +12:00
Jesse Hills
aa2eb29274 Bump version to 2022.8.1 2022-09-01 11:26:52 +12:00
Keith Burzinski
22eb4f9cb9 Fix SPI HW selection for ESP32 variants (#3728) 2022-09-01 11:26:51 +12:00
Samuel Sieb
3acc8e7479 fix grow password setting (#3722)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2022-09-01 11:26:51 +12:00
Jesse Hills
adc8c1aa38 Merge pull request #3721 from esphome/bump-2022.8.0
2022.8.0
2022-08-17 13:31:24 +12:00
Jesse Hills
3a82f500d4 Bump version to 2022.8.0 2022-08-17 12:58:30 +12:00
Jesse Hills
7d1d4831a8 Merge branch 'beta' into bump-2022.8.0 2022-08-17 12:58:29 +12:00
Jesse Hills
ab86ddcf02 Merge pull request #3692 from esphome/bump-2022.6.3
2022.6.3
2022-08-08 11:48:35 +12:00
Jesse Hills
bf8eddb13b Bump version to 2022.6.3 2022-08-08 08:24:12 +12:00
Samuel Sieb
e5eaf7a3fe Use correct struct members. (#3672) 2022-08-08 08:24:12 +12:00
Samuel Sieb
50f32a3aa5 Use application/json instead of text/json (#3671) 2022-08-08 08:24:11 +12:00
Bryan Berg
eb878710c1 Add CO device class to binary_sensor (#3656) 2022-08-08 08:24:11 +12:00
Samuel Sieb
311980e0e4 Update inkbird_ibsth1_mini.cpp (#3664) 2022-08-08 08:24:11 +12:00
Javier Peletier
df73170e5a modbus: fix queue deduplicator erasing custom commands (#3650) 2022-08-08 08:24:11 +12:00
Jesse Hills
ccc13cc9e1 Merge pull request #3596 from esphome/bump-2022.6.2
2022.6.2
2022-06-23 11:30:31 +12:00
Jesse Hills
020b2c05c8 Bump version to 2022.6.2 2022-06-23 10:34:10 +12:00
Joe
4c37c17df1 Fix 2 small issues in BLEClient (#3544) 2022-06-23 10:34:09 +12:00
Sergey Dudanov
8f67acadd8 Media Player: added play_media action (#3579)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-06-23 10:34:09 +12:00
kahrendt
ca13c4c1a6 Fix wrong type for voc_state*_ in sgp4x component (#3581)
Co-authored-by: Martin <25747549+martgras@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-06-23 10:34:09 +12:00
ShellAddicted
d0c646c721 Fix: Make MQTT over TLS actually work (#3580) 2022-06-23 10:34:09 +12:00
lkomurcu
8a055675af Move gas mbus config option being a define to being a build flag since its used in external libraries. (#3575) 2022-06-23 10:34:09 +12:00
7 changed files with 62 additions and 64 deletions

View File

@@ -58,7 +58,7 @@ class BLEPresenceDevice : public binary_sensor::BinarySensorInitiallyOff,
case MATCH_BY_SERVICE_UUID:
for (auto uuid : device.get_service_uuids()) {
if (this->uuid_ == uuid) {
this->publish_state(device.get_rssi());
this->publish_state(true);
this->found_ = true;
return true;
}
@@ -83,7 +83,7 @@ class BLEPresenceDevice : public binary_sensor::BinarySensorInitiallyOff,
return false;
}
this->publish_state(device.get_rssi());
this->publish_state(true);
this->found_ = true;
return true;
}

View File

@@ -26,16 +26,9 @@ bool BluetoothProxy::parse_device(const esp32_ble_tracker::ESPBTDevice &device)
device.get_rssi());
this->send_api_packet_(device);
this->address_type_map_[device.address_uint64()] = device.get_address_type();
if (this->address_ == 0)
return true;
if (this->state_ == espbt::ClientState::DISCOVERED) {
ESP_LOGV(TAG, "Connecting to address %s", this->address_str().c_str());
return true;
}
BLEClientBase::parse_device(device);
return true;
}
@@ -216,20 +209,6 @@ void BluetoothProxy::bluetooth_device_request(const api::BluetoothDeviceRequest
switch (msg.request_type) {
case api::enums::BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT: {
this->address_ = msg.address;
if (this->address_type_map_.find(this->address_) != this->address_type_map_.end()) {
// Utilise the address type cache
this->remote_addr_type_ = this->address_type_map_[this->address_];
} else {
this->remote_addr_type_ = BLE_ADDR_TYPE_PUBLIC;
}
this->remote_bda_[0] = (this->address_ >> 40) & 0xFF;
this->remote_bda_[1] = (this->address_ >> 32) & 0xFF;
this->remote_bda_[2] = (this->address_ >> 24) & 0xFF;
this->remote_bda_[3] = (this->address_ >> 16) & 0xFF;
this->remote_bda_[4] = (this->address_ >> 8) & 0xFF;
this->remote_bda_[5] = (this->address_ >> 0) & 0xFF;
this->set_state(espbt::ClientState::DISCOVERED);
esp_ble_gap_stop_scanning();
break;
}
case api::enums::BLUETOOTH_DEVICE_REQUEST_TYPE_DISCONNECT: {

View File

@@ -45,7 +45,6 @@ class BluetoothProxy : public BLEClientBase {
protected:
void send_api_packet_(const esp32_ble_tracker::ESPBTDevice &device);
std::map<uint64_t, esp_ble_addr_type_t> address_type_map_;
int16_t send_service_{-1};
bool active_;
};

View File

@@ -571,24 +571,16 @@ int64_t payload_to_number(const std::vector<uint8_t> &data, SensorValueType sens
static_cast<int32_t>(((value & 0x7FFF) << 16 | (value & 0xFFFF0000) >> 16) | sign_bit), bitmask);
} break;
case SensorValueType::U_QWORD:
// Ignore bitmask for U_QWORD
value = get_data<uint64_t>(data, offset);
break;
case SensorValueType::S_QWORD:
// Ignore bitmask for S_QWORD
value = get_data<int64_t>(data, offset);
// Ignore bitmask for QWORD
value = get_data<uint64_t>(data, offset);
break;
case SensorValueType::U_QWORD_R:
// Ignore bitmask for U_QWORD
value = get_data<uint64_t>(data, offset);
value = static_cast<uint64_t>(value & 0xFFFF) << 48 | (value & 0xFFFF000000000000) >> 48 |
static_cast<uint64_t>(value & 0xFFFF0000) << 32 | (value & 0x0000FFFF00000000) >> 32 |
static_cast<uint64_t>(value & 0xFFFF00000000) << 16 | (value & 0x00000000FFFF0000) >> 16;
break;
case SensorValueType::S_QWORD_R:
// Ignore bitmask for S_QWORD
value = get_data<int64_t>(data, offset);
break;
case SensorValueType::S_QWORD_R: {
// Ignore bitmask for QWORD
uint64_t tmp = get_data<uint64_t>(data, offset);
value = (tmp << 48) | (tmp >> 48) | ((tmp & 0xFFFF0000) << 16) | ((tmp >> 16) & 0xFFFF0000);
} break;
case SensorValueType::RAW:
default:
break;

View File

@@ -974,9 +974,19 @@ void ThermostatClimate::change_preset_(climate::ClimatePreset preset) {
auto config = this->preset_config_.find(preset);
if (config != this->preset_config_.end()) {
ESP_LOGI(TAG, "Switching to preset %s", LOG_STR_ARG(climate::climate_preset_to_string(preset)));
this->change_preset_internal_(config->second);
ESP_LOGI(TAG, "Preset %s requested", LOG_STR_ARG(climate::climate_preset_to_string(preset)));
if (this->change_preset_internal_(config->second) || (!this->preset.has_value()) ||
this->preset.value() != preset) {
// Fire any preset changed trigger if defined
Trigger<> *trig = this->preset_change_trigger_;
assert(trig != nullptr);
trig->trigger();
this->refresh();
ESP_LOGI(TAG, "Preset %s applied", LOG_STR_ARG(climate::climate_preset_to_string(preset)));
} else {
ESP_LOGI(TAG, "No changes required to apply preset %s", LOG_STR_ARG(climate::climate_preset_to_string(preset)));
}
this->custom_preset.reset();
this->preset = preset;
} else {
@@ -988,9 +998,19 @@ void ThermostatClimate::change_custom_preset_(const std::string &custom_preset)
auto config = this->custom_preset_config_.find(custom_preset);
if (config != this->custom_preset_config_.end()) {
ESP_LOGI(TAG, "Switching to custom preset %s", custom_preset.c_str());
this->change_preset_internal_(config->second);
ESP_LOGI(TAG, "Custom preset %s requested", custom_preset.c_str());
if (this->change_preset_internal_(config->second) || (!this->custom_preset.has_value()) ||
this->custom_preset.value() != custom_preset) {
// Fire any preset changed trigger if defined
Trigger<> *trig = this->preset_change_trigger_;
assert(trig != nullptr);
trig->trigger();
this->refresh();
ESP_LOGI(TAG, "Custom preset %s applied", custom_preset.c_str());
} else {
ESP_LOGI(TAG, "No changes required to apply custom preset %s", custom_preset.c_str());
}
this->preset.reset();
this->custom_preset = custom_preset;
} else {
@@ -998,39 +1018,46 @@ void ThermostatClimate::change_custom_preset_(const std::string &custom_preset)
}
}
void ThermostatClimate::change_preset_internal_(const ThermostatClimateTargetTempConfig &config) {
bool ThermostatClimate::change_preset_internal_(const ThermostatClimateTargetTempConfig &config) {
bool something_changed = false;
if (this->supports_two_points_) {
this->target_temperature_low = config.default_temperature_low;
this->target_temperature_high = config.default_temperature_high;
if (this->target_temperature_low != config.default_temperature_low) {
this->target_temperature_low = config.default_temperature_low;
something_changed = true;
}
if (this->target_temperature_high != config.default_temperature_high) {
this->target_temperature_high = config.default_temperature_high;
something_changed = true;
}
} else {
this->target_temperature = config.default_temperature;
if (this->target_temperature != config.default_temperature) {
this->target_temperature = config.default_temperature;
something_changed = true;
}
}
// Note: The mode, fan_mode, and swing_mode can all be defined on the preset but if the climate.control call
// also specifies them then the control's version will override these for that call
if (config.mode_.has_value()) {
this->mode = *config.mode_;
// Note: The mode, fan_mode and swing_mode can all be defined in the preset but if the climate.control call
// also specifies them then the climate.control call's values will override the preset's values for that call
if (config.mode_.has_value() && (this->mode != config.mode_.value())) {
ESP_LOGV(TAG, "Setting mode to %s", LOG_STR_ARG(climate::climate_mode_to_string(*config.mode_)));
this->mode = *config.mode_;
something_changed = true;
}
if (config.fan_mode_.has_value()) {
this->fan_mode = *config.fan_mode_;
if (config.fan_mode_.has_value() && (this->fan_mode != config.fan_mode_.value())) {
ESP_LOGV(TAG, "Setting fan mode to %s", LOG_STR_ARG(climate::climate_fan_mode_to_string(*config.fan_mode_)));
this->fan_mode = *config.fan_mode_;
something_changed = true;
}
if (config.swing_mode_.has_value()) {
if (config.swing_mode_.has_value() && (this->swing_mode != config.swing_mode_.value())) {
ESP_LOGV(TAG, "Setting swing mode to %s", LOG_STR_ARG(climate::climate_swing_mode_to_string(*config.swing_mode_)));
this->swing_mode = *config.swing_mode_;
something_changed = true;
}
// Fire any preset changed trigger if defined
if (this->preset != preset) {
Trigger<> *trig = this->preset_change_trigger_;
assert(trig != nullptr);
trig->trigger();
}
this->refresh();
return something_changed;
}
void ThermostatClimate::set_preset_config(climate::ClimatePreset preset,

View File

@@ -168,7 +168,8 @@ class ThermostatClimate : public climate::Climate, public Component {
/// Applies the temperature, mode, fan, and swing modes of the provided config.
/// This is agnostic of custom vs built in preset
void change_preset_internal_(const ThermostatClimateTargetTempConfig &config);
/// Returns true if something was changed
bool change_preset_internal_(const ThermostatClimateTargetTempConfig &config);
/// Return the traits of this controller.
climate::ClimateTraits traits() override;

View File

@@ -1,6 +1,6 @@
"""Constants used by esphome."""
__version__ = "2022.10.0b1"
__version__ = "2022.10.0"
ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"