1
0
mirror of https://github.com/esphome/esphome.git synced 2025-06-15 04:45:43 +01:00
Commit Graph

3362 Commits

Author SHA1 Message Date
adb7aa6950 Thermostat preset with modes ()
* Rework HOME/AWAY support to being driven via a map of ClimatePreset/ThermostatClimateTargetTempConfig
This opens up to theoretically being able to support other presets (ECO, SLEEP, etc)

* Add support for additional presets
Configuration takes the form;
```
climate:
  platform: preset
  ...
  preset:
    [eco | away | boost | comfort | home | sleep | activity]:
      default_target_temperature_low: 20
      default_target_temperature_high: 24
```

These will be available in the Home Assistant UI and, like the existing Home/Away config will reset the temperature in line with these defaults when selected. The existing away_config/home_config is still respected (although preset->home/preset->away will be applied after them and override them if both styles are specified)

* Add support for specifying MODE, FAN_MODE and SWING_MODE on a preset
When switching presets these will implicitly flow through to the controller. However calls to climate.control which specify any of these will take precedence even when changing the mode (think of the preset version as the default for that preset)

* Add `preset_change` mode trigger
When defined this trigger will fire when the preset for the thermostat has been changed. The intent of this is similar to `auto_mode` - it's not intended to be used to control the preset's state (eg. communicate with the physical thermostat) but instead might be used to update a visual indicator, for instance.

* Apply lint, clang-format, and clang-tidy fixes

* Additional clang-format fixes

* Wrap log related strings in LOG_STR_ARG

* Add support for custom presets
This also changes the configuration syntax to;
```yaml
  preset:
    # Standard preset
    - name: [eco | away | boost | comfort | home | sleep | activity]
      default_target_temperature_low: 20
      ...
    # Custom preset
    - name: My custom preset
      default_target_temperature_low: 18
```

For the end user there is no difference between a custom and built in preset. For developers custom presets are set via `climate.control` `custom_preset` property instead of the `preset`

* Lint/clang-format/clang-tidy fixes

* Additional lint/clang-format/clang-tidy fixes

* Clang-tidy changes

* Sort imports

* Improve configuration validation for presets
- Unify temperature validation across default, away, and preset configuration
- Validate modes for presets have the required actions

* Trigger a refresh after changing internals of the thermostat

* Apply formatting fixes

* Validate mode, fan_mode, and swing_mode on presets

* Add preset temperature validation against visual min/max configuration

* Apply code formatting fixes

* Fix preset temperature validation
2022-05-24 22:44:26 -05:00
cd35ead890 [scd4x] Fix not passing arguments to templatable value for perform_forced_calibration () 2022-05-24 13:00:06 +12:00
9dc804ee27 Output a true RMS voltage % () 2022-05-24 12:52:54 +12:00
a8ceeaa7b0 esp32: fix NVS () 2022-05-23 20:56:26 +12:00
7092f7663e midea: New power_toggle action. Auto-use remote transmitter. () 2022-05-23 20:51:45 +12:00
d9d2edeb08 Fix compile issues on windows () 2022-05-19 21:21:42 +12:00
dda1ddcb26 Add missing import to bedjet () 2022-05-19 16:23:40 +12:00
f0c890f160 Remove deprecated fan speeds ()
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-05-19 12:50:44 +12:00
4f52d43347 add support user-defined modbus functions () 2022-05-19 12:49:12 +12:00
0ed7db979b Add support for SGP41 ()
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-05-19 12:47:33 +12:00
9c78049359 feat: esp32-camera add stream event () 2022-05-19 12:23:50 +12:00
7882105661 Update bedjet_const.h to remove blank spaces before speed steps, fixes Unknown Error when using climate.set_fan_mode in HA () 2022-05-19 10:25:42 +12:00
c000e1d6dd Ili9341 8bit indexed mode pt1 () 2022-05-19 10:23:00 +12:00
9b6b9c1fa2 Retry Tuya init commands ()
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2022-05-17 20:15:02 +12:00
609a2ca592 ESP32: Only save to NVS if data was changed () 2022-05-17 10:59:36 +12:00
6dabf24bf3 MQTT cover: send state even if position is available () 2022-05-16 15:35:27 +12:00
93e2506279 Mark improv_serial and ESP-IDF usb based serial on c3/s2/s3 unsupported () 2022-05-16 13:05:20 +12:00
f62d5d3b9d Add Tuya select () 2022-05-16 07:49:40 +12:00
0665acd190 Tuya status gpio support () 2022-05-16 07:44:14 +12:00
fea05e9d33 Increase JSON buffer size on overflow () 2022-05-15 19:53:43 +12:00
7a03c7d56f Bump pylint from 2.13.8 to 2.13.9 ()
Bumps [pylint](https://github.com/PyCQA/pylint) from 2.13.8 to 2.13.9.
- [Release notes](https://github.com/PyCQA/pylint/releases)
- [Changelog](https://github.com/PyCQA/pylint/blob/main/ChangeLog)
- [Commits](https://github.com/PyCQA/pylint/compare/v2.13.8...v2.13.9)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-15 19:46:36 +12:00
2dc2aec954 Bump esptool from 3.3 to 3.3.1 ()
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-13 13:44:24 +12:00
39c6c2417a Remove duplicate convert_to_8bit_color_ function. ()
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
2022-05-12 22:18:51 +12:00
03d5a0ec1d Update captive portal canHandle function () 2022-05-12 16:57:50 +12:00
1c873e0034 Make custom_fan and custom_preset templatable as per documentation () 2022-05-12 16:54:45 +12:00
bcb47c306c Tcs34725 automatic sampling settings for improved dynamics and accuracy ()
Co-authored-by: Daniel Cousens <413395+dcousens@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-05-12 16:53:33 +12:00
01c4d3c225 Use heat mode for heat. Move EXT HT to custom presets. ()
* Use heat mode for heat. Move EXT HT to custom presets.

* Fix syntax error.
2022-05-12 15:26:14 +12:00
c2aaae4818 Shelly dimmer: Use unique_ptr to handle the lifetime of stm32_t ()
Co-authored-by: Martin <25747549+martgras@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-05-12 10:26:51 +12:00
3f678e218d On epoch sync, restore local TZ ()
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2022-05-12 09:25:00 +12:00
f8a1bd4e79 Bump version to 2022.6.0-dev 2022-05-11 12:50:42 +12:00
40ad9f4911 Add deep_sleep.allow YAML action () 2022-05-11 12:47:50 +12:00
4116caff6a Implement allow_deep_sleep () 2022-05-11 11:44:52 +12:00
0b69f72315 Enable api transport encryption for new projects ()
* Enable api transport encryption for new projects

* Format
2022-05-11 11:38:05 +12:00
c569f5ddcf Code cleanup fixes for the number component ()
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2022-05-11 11:02:49 +12:00
62f9e181e0 Code cleanup fixes for the select component ()
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2022-05-11 10:58:28 +12:00
235a97ea10 Make retry scheduler efficient () 2022-05-11 07:54:00 +12:00
e541ae400c Esp32c3 deepsleep fix () 2022-05-10 22:03:59 +12:00
4822abde86 Fix BLE280 setup when the sensor is marked as failed. () 2022-05-10 22:03:40 +12:00
b7e52812f8 Fix tests () 2022-05-10 22:02:58 +12:00
69118120d9 added prev_frame for animation () 2022-05-10 21:56:29 +12:00
7cba0c6fb0 Fix cover set position by force pushing position_id datapoint (simila… () 2022-05-10 21:42:31 +12:00
5fac67ce15 CAN bus: on_frame remote_transmission_request () 2022-05-10 21:39:18 +12:00
98c733108e PMSX003: Add support for specifying the update interval and spinning down ()
Co-authored-by: Otto Winter <otto@otto-winter.com>
2022-05-10 21:35:43 +12:00
782186e13d extend scd4x ()
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-05-10 21:25:44 +12:00
4e1f6518e8 Delonghi Penguino PAC W120HP ir support () 2022-05-10 21:22:22 +12:00
53e0fe8e51 Add SML (Smart Message Language) platform for energy meters ()
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-05-10 21:05:49 +12:00
0e547390da add support for Sen5x sensor series ()
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-05-10 20:15:02 +12:00
86b52df839 tca9548a fix channel selection () 2022-05-10 17:17:55 +12:00
d685fdf54a mask deprecated adc_gpio_init() for esp32-s2 () 2022-05-10 17:16:16 +12:00
d9caab4108 Number enhancement ()
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-05-10 16:58:56 +12:00