* Split display_buffer sub-components into own files
Move the Image, Animation and Font classes to their own h/cpp pairs,
instead of having everything into the display_buffer h/cpp files.
* Fixed COLOR_ON duplicate definition
* Prep-work for datetime entities
* Fix some includes and remove some restrictions on printing time on displays
* format
* format
* More formatting
* Move function contents
* Ignore clang-tidy
Support for optional PowerSupply component for ST7789V
This commit makes the power supply required if the model configured in the ST7789V component is set to ADAFRUIT_S2_TFT_FEATHER_240X135. There are at least two boards from Adafruit with this configuration but with a different pin out.
This also adds the board pins definition for the board I have. There is discussion on the forums about the other board's documentation not matching reality and I don't have a physical board to confirm.
* Add support for TMP1075 temperature sensor
TMP1075 is a temperature sensor with I2C interface in industry standard
LM75 form factor and pinout.
https://www.ti.com/product/TMP1075
Example YAML:
```yaml
sensor:
- platform: tmp1075
name: TMP1075 Temperature
id: radiator_temp
update_interval: 10s
i2c_id: i2c_bus_1
conversion_rate: 27.5ms
alert:
limit_low: 50
limit_high: 75
fault_count: 1
polarity: active_high
```
* Add myself as codeowner of the TMP1075 component
* Include '°C' unit when logging low/high limit setting
* Reformat
No functional changes.
* Fix logging: use %.4f for temperatures, not %d
* Fix config initialisation
* Use relative include for `tmp1075.h`
* Apply formatting changes suggested by script/clang-tidy for ESP32
* Add YAML to test1.yaml
* Fix test1.yaml by giving TMP1075 a name
* Less verbose logging (debug -> verbose level)
* Schema: reduce accuracy_decimals to 2
* I2C address as hexadecimal
* Proper name for enum in Python
The enum on the C++ side was renamed (clang-tidy) but I forgot to take that
into account in the Python code.
* Expose 'alert function' to the code generator/YAML params and remove 'shutdown'
Shutdown mode doesn't work the way I expect it, so remove it until someone
actually asks for it.
Also 'alert mode' was renamed to 'alert function' for clarity.
* Move simple setters to header file
* Remove `load_config_();` function
* Add "stop" trait to Cover
* Add `supports_stop` to Cover protobuf msg
* Run `script/api_protobuf/api_protobuf.py`
... followed by `script/clang-format -i`
* Add `has_stop` field to template Cover
* Set `has_stop` during Cover codegen
* Set `supports_stop` trait on all other Cover types
* Bump APIVersion to 1.8
---------
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Update real_time_clock.cpp
* Update real_time_clock.h
* Update sun.h
* Update sun.h
* Update sun.h
* Enable the sunAtLocation to be used externally
* Enable the sunAtLocation to be used externally
* Update sun.h
* Update sun.h
* update
* update
* update to only use one function
* Update sun.h
* Update sun.cpp
* requirements: add pyparsing >= 3.0
ESP-IDF >= 5.0 requires pyparsing's rest_of_file, which was introduced
in version 3.0.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* esp32: fix build with ESP-IDF >= 5
We need to include esp_timer.h to be able to use esp_timer_get_time().
This header existed in ESP-IDF < 5 so we don't need if guards.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* ota: fix build with ESP-IDF >= 5
As of version 5, esp_task_wdt_init() takes a struct as argument. We also
need to include spi_flash_mmap.h.
[split unrelated change into separate commits, maintain ESP-IDF < 5
compat, use esp_task_wdt_reconfigure, add commit message]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* core: fix build with ESP-IDF >= 5
These header files already existed in ESP-IDF < 5 so skip if guards.
[add commit message]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* wifi: fix build with ESP-IDF >= 5
ESP-IDF 4.1 introduced the esp-netif API as successor to the tcp_adapter
API. The tcp_adapter API was removed in ESP-IDF 5.0.0. Part of the wifi
component was already migrated to the new API. Migrate the leftover uses
of the old API to the new API to fix build on ESP-IDF >= 5.
The version of ESP-IDF currently in use (4.4.4) supports the new API, so
we don't need any if guards to maintain backwards compatibility.
Also replace xQueueHandle, which is a pre FreeRTOS v8.0.0 data type,
with QueueHandle_t, so we don't need to enable backward compatibility
(CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY).
This reverts part of commit d42f35de5d to wifi_component_esp_idf.cpp,
as the esp-netif API handles that internally.
[replace pre FreeRTOS v8.0.0 data type, add commit message]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* mdns: fix build with ESP-IDF >= 5
In ESP-IDF 5.0.0, the mdns component was removed and moved to another
repository. Since the mdns component in esphome is always built, we
need to add the mdns component from the esp-protocols repository. This
component depends on ESP-IDF >= 5.0, so we need to add a version guard.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* docker: install python3-venv
As of version 6.0.1, platform-espressif32 requires python3-venv.
Switching between esp-idf 4.4.4 and 5.0 causes problems with esp-idf
python dependencies installed by PlatformIO. They've solved this by
using venv. Install python3-venv so that platform-espressif32 6.0.1 and
later can be used, and we don't need to wipe the dependencies manually
when switching esp-idf versions.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
---------
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Co-authored-by: Stijn Tintel <stijn@linux-ipv6.be>
* initial support for Bayesian type
* Cast bool state of binary_sensor to uint64_t
* Rename channels to observations with Bayesian
* Improve/standardize comments for all types
* Use black to correct sensor.py formatting
* Add SUM and BAYESIAN binary sensor map tests
* Remove unused variable
* Update esphome/components/binary_sensor_map/binary_sensor_map.cpp
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
---------
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
The controller of the 2.13" waveshare/ttgo epaper displays operates with a 128x250 buffer,
while only 122x250 pixels are shown. While this can be ignored for rotations 0/270°,
with roations 90/180°, 6 pixels are cut-off from the top or left edge.
This change introduces a distinction between object width and controller width,
resulting in pixel-perfect rotations.