* 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.
Fix lower graph limit for negative values by rounding down instead of truncating.
Consistently handle the corner cases: empty trace, min=max (e.g. single value)
by drawing the grid lines for a single grid division.
There is a race condition where a BedJet unit previously had its BLE
"notify" flag enabled, and it continues to broadcast these notify
packets even after the ESP32 (and BLEClient) goes away, such as during
a crash or unplugging power.
BLEClient::setup_priority=AFTER_BLUETOOTH, while
BedJetHub::setup_priority=AFTER_WIFI. When the ESP32 starts back up
again, BLEClient::setup() happens first and will start receiving the
BLE notify packets almost immediately. Since we register the BLEClient
child from codegen, BedJetHub is registered as a child already by this
point, so BLEClient dispatches the notify status packet (and other gatt
events) to the BedJetHub handler, even though BedJetHub::setup() has
not been called yet.
We initialize BedJetHub::codec_ in setup(), so if BLEClient starts
dispatching gatt events before setup() is called, then codec_ will not
be initialized yet. This causes BedJetHub's gatt notify handler to call
`this->codec_->decode_notify()` on an uninitialized null pointer. Since
invoking a method does not have to dereference the pointer, that method
invocation is allowed; but later trying to access memory on that
instance results in a StoreProhibited panic.
Changing the BedJetHub's setup_priority to BLUETOOTH causes it to be
setup before BLEClient, so that by the time BLEClient starts to receive
BLE packets, BedJetHub is ready to receive them.
* Add push to talk voice assistant
* Refactor most code into voice_assistant
* Make voice_assistant the component and remove push_to_talk (can be done in yaml)
* Fix component setup
* Always AF_INET to match serverside
* Fix microphone and media player co-existence
* Format
* Update codeowners
* Update test file
* Fix endifs
* nullptr not NULL
* clang-tidy
* Format
* fixup: Add VA event data
* Generate proto
* Parse and log events
* Add default to switch
* Fix
* Add mic/va to test5
* limit configuration to 64 binary sensors to match code limitation
* remove superfluous debug logging
* improve state publishing logic eliminating NAN being sent on boot in certain cases
* adjust type for bitmask shift to match mask variable type
* Synchronise Device Classes from Home Assistant
* Remove count do the `DEVICE_CLASSES` list is also updated
* Format file
---------
Co-authored-by: esphomebot <esphome@nabucasa.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Move EntityBase Object Id from memory to flash.
* Sprinkler use common `setup_entity` method.
* Remove `EntityBase` from Sprinkler.
* Support for entity names set to None
* change so gh PR picks up commit.
---------
Co-authored-by: Your Name <you@example.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* feat: Add support to unsubscribe from BLE advertisements
* Fix tests & clang
---------
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Add ability to clear the gatt cache
With BlueZ we can fully clear the cache when something goes wrong with the services, however since this is also a cache on the ESP32 we need to be able to clear the on device cache as well for the proxies since if something goes wrong with the service resolution it can cache the bad resolution on NVS forever.
Our current client implementation is limited to clearing the memory cache in Home Assistant 89355e0879/homeassistant/components/esphome/bluetooth/client.py (L512)
related issue https://github.com/esphome/issues/issues/4156https://github.com/esphome/aioesphomeapi/pull/410
* naming
* lint
* lint
* naming
* naming
* naming
* 88 now that 87 is taken
* make const
* Update esphome/components/api/api_frame_helper.cpp
Animation resizing in RGB24 format is causing an error "Image cannot be resized to a bigger size". Other image types do not show the issue, and the only difference is the "image.thumbnail" call.
Removed the call and tested; the animation is shown with the desired size.
* Remove EntityBase form sprinkler
* remove unneeded method
* Set name correctly
Move some timers to `setup` that rely on this->name_
* Fix SprinklerControllerSwitch setup
* Update esphome/components/sprinkler/__init__.py
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
---------
Co-authored-by: Samuel Sieb <samuel-github@sieb.net>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
* Add a simple 'skip' filter
This filter simply skips the first `send_first_at` values, then passes
everything as-is. This is quite useful when you know the first few sensor
readings should be ignored.
Example YAML:
```yaml
sensor:
- platform: sgp30
id: mysensor_sgp30
eco2:
id: mysensor_sgp30_co2
name: "eCO₂"
accuracy_decimals: 0
filters:
- skip:
send_first_at: 41
```
* Rename the filter to `skip_initial` and simplify the schema
New usage:
```yaml
filters:
- skip_initial: 41
```
* Apply clang-format
* Added missing PM_1_0 and PM_10_0 for PMS5003T
Added missing PM_1_0 and PM_10_0 for PMS5003T
* Revert "Added missing PM_1_0 and PM_10_0 for PMS5003T"
This reverts commit 86084f7c61.
* Added tests for PMS5003T
* Added missing PM_1_0 and PM_10_0 for PMS5003T PMS5003ST
* Added missing PM_1_0 and PM_10_0 for PMS5003T
* lint: Trailing whitespace fixed
* tab character removed
* Clang format suggested edit
* fixing rectangle's `shrink` and `extend`
* fixed the rect::shrink and rect::inside methods
and added rect:equal() method
* fixed internal clang issue again. When would is
this going to be fixed :(
* fixed internal clang issue again. When would is
this going to be fixed :(
* remove trailing space
* enable the psram on esp32 and allow big screen
* update CODEOWNERS
* small update
* update CODEOWNERS again.
* Removed the M5STACK because it is a ESP32 device.
* i removed the wrong model
* update the error message.
* Feat: add support for hex color in color component
* Chore: move hex color validator to color component
* Chore: add test
* Chore: fix formatting
* Chore: make linter happy
* Chore: make linter happy
* Fix: parse correct offsets
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
* Chore: use cv.Invalid
* Fix: remove # because it indicates a comment in yaml
* Fix: only allow hex if no other color value is set
* Fix: tests
* Fix: mutual exclusion of raw and hex colors
* Chore: format file
* Update __init__.py
---------
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Fix missing data array
* Fix incorrect bit offset
* Correct variable types
* Do same conversions as in original library
* Correct clang-format
* Move out float conversion for clarity
* Added check for heater stability
* Correct clang format
* Allow reporting gas resistance when heater is disabled
* Correct clang format
* Better error reporting by @DAVe3283
* Correct signed operation, range switching error was positive all the time