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>
* 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
* - Removed cleaning the screen twice.
\Should be handled by `DisplayBuffer::init_internal_();`
- Made ili9341::initalize() protected and renamed
\ it to ili9341::initalize().
- ili9341::initalize() should only init the display
\ and set the width and heigth.
* removed to much
* clang format fixes
* removing trailing underscors for
protected virtual methods
* removed the "override" on display()
* clang fixes
* restored old changes
* Renamed the ili9341 platform to ili9xxx and added
multiple drivers as well. including PR #3848
* fixed most of the clang reported issues
* fixed reported issues
* last fixes
* Setting the right codeowners
* missing changes
* fixed naming Display() method.
* clang again
* clang fix
* fixes reported by @jesserockz & @gpambrozio
* a change to display.py removing an unneeded var
* re-introduce **backlight** option.
* update the ili9488 initialization
* update the ili9488 initialization and fix typo
* fixed typo
* add missing constants
* swap height and width back for the ili9488
* init fixes ili9488
* fixed lint issue
testing the init code
* oeps
* init fixes ili9488
* fixed wrong define
* fixed wrong define again
* removed some spaces
* revert to ili9341
* Remove parts that where used for
the switchplate
* lint fixes and removing unused function
* fix error and introducing 16bit color option
* fix error and introducing 16bit color option
* fix clang issue
* clang fix
* clang issue again
* is this what clang exprect
* clang fix
* clang fix
* try again
* let try again
* and again
* and the last clang fix
* remove the need of wifi
* update dimentions
* update ili8488 init code.
* update dimentions
* allow to change height and width
* dump color mode config
* fix
* fix
* modify logging
* referd back unrelated change
* code formatting commit and moving functions around
* add missing ;
* update code
* update code
* use the correct write_array for sending uint16_t
* fix panic loop
* fix panic loop
* - update the test file
- fixed sending display data
* clang fixes
* clang fixes
* clang fixes again
* remove .gitignore items
* remove .gitignore items
* make sure Update() can can not be called while
called
* clang correction
* adding a test yaml for the ili9341
* Update ili9341 example
* Make test ili9xxx/tests only local
* restore back old ili9341 driver code
* Add a new config for the M5Core
* fix clang request
* reverd to restore of the old ili9341
there is no proper way to say it is depricated.
* Remove the backlight/led pin from the config.
You need to use a proper light platform component
* Ili9488init changes (#88)
Fixed ILI9488 init settings, and adjusted pixel handling code to push pixels in 18 bit format.
This does not change the internal 16-bit representation.
* fixed some leftover clang issues from the merge.
* fixed the slang-tidy request.
* remove `backlight_pin` warning.
---------
Co-authored-by: JD Steffen <jdsteffen81@gmail.com>
* remove unused sensors on pzemdc
* add reset energy action for pzemdc
* fix lint errors
* remove trailing space on pzemdc.h
* make method reset_energy of pzemdc public
* Apply suggestions from code review
---------
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Use PSRam for BLE scan results.
* Format Document
* Use generic define `CONFIG_SPIRAM`.
* Formatting changes.
* Memory allocation is allowed to fail.
* Use mark_failed instead of abort.
---------
Co-authored-by: Your Name <you@example.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Add support for AS7341 spectral color sensor.
* Run clang-format and clang-tidy.
* Post-review changes.
* Apply suggestions from code review
---------
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Add delay between clock changes on sn74hc165
* Increase to 10us
* Add another delay after clock low
* Print input bits every second
* Fix pin order
* Remove log
* Fix for inverted pins
* formatting
* Add initial support for multiple devices
Re-introduce support for multiple I2C devices (it was suppressed in df37a7635f). Devices are identified by their I2C address, and the BME680 can only have the 0x76 or 0x77 address, so this adds support for a maximum of two devices.
* Reintegrate commit ebf13a0b
Reintegrate commit ebf13a0ba0 which was lost in my changes (I were working on old files)
* wrong commit
* wrong commit
* Reintegrate commit ebf13a0b
Reintegrate commit ebf13a0ba0 which was lost due to me working on old files
* Reintroduce newlines at end of files
* Reintroduce newlines at end of files
* Adhere to codebase standards
Obey the "All uses of class members and member functions should be prefixed with this-> to distinguish them from global functions in code review" rule of the Codebase Standards
* Fix formatting according to clang-format
* Perform the BSEC library reinitialization+snapshot only when more than one device is present
* Fix formatting according to clang-format
* Degrade abort message in restore_state_() from warning to verbose
This always happen at initial setup, so it's not a really useful message; when some real problems arise, we'll have a more useful warning from snapshot_state_()
Co-authored-by: Trevor North <trevor@freedisc.co.uk>
* Reduce peak stack usage to avoid bootloops on ESP8266
Achieved mainly by moving the work_buffer needed by the BSEC library to the heap, as a single global work buffer shared by all instances.
::set_config_ has been reverted to a code path similar to the original, as that reduces peak stack usage enough to be OK on ESP8266 even without moving the work_buffer to the heap.
* Fix formatting according to clang-format
* Add support for devices with the same i2c address
Devices are now identified using their index in the BME680BSECComponent::instances member, which became a vector. This allows adding two devices with the same i2c address (which should be placed on different i2c buses). Since a BME680 can only have an address of 0x76 or 0x77, a maximum of 2 devices could be added before this commit. Now there is no theoretical limit on the number of devices which could be added.
* Fix formatting according to clang-format
* Fix formatting according to clang-format
---------
Co-authored-by: Trevor North <trevor@freedisc.co.uk>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Add support for FS3000 sensor.
* add fs3000 to test yaml
* Clean up code with clang.
* Clean up sensor.py file.
* Update CODEOWNERS file.
* Apply suggestions from code review regarding sensor.py
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Apply suggestions from code review for basic issues regarding C++ code
- removed unnecessary default for FS3000Model
- use "this->" before any sensor update
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
* Move model setup to overall setup function.
* Remove unneeded CONF_ID from sensor.py
* Run clang-format
* Move set_model code to header file now that it is simplified
* Update fs3000.h
---------
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This lets downstream components respond to climate configuration
changes, which take place through ClimateCall objects, without also
being notified every time the state changes, which happens every time
the input sensor announces a new value.
FIXES https://github.com/esphome/feature-requests/issues/2136
* Bump esp-idf to 3.4.3 via platformio/espressif32 @ 5.3.0
The new version appears to improve the stability of
BLE + WiFi
* bump recommended version as well
* Initial stab at importing idf components
* Handle repo with multiple components
Allow components directly from yaml
* Actually use the refresh config var
* Update esphome/components/esp32/__init__.py
* Add standby switch
* Add support for arbitrary run duration in start_single_valve action
* Add divider feature
* Allow zero multiplier
* Fixes for #3740, misc. cleanup and polishing
* Integrate number components for multiplier, repeat and run duration
* Add various methods to get time remaining
* Add next_prev_ignore_disabled flag
* Optimize next/previous valve selection methods
* Add numbers_use_minutes flag
* Initialize switch states as they are set up
* Ensure SprinklerControllerSwitch has state if it's not restored
* Add repeat validation
* Misc. clean-up and tweaking
* Fix bugprone-integer-division
* More clean-up
* Set entity_category for standby_switch
* Set default entity_category for numbers
* More housekeeping
* Add run request tracking
* Fix time remaining calculation
* Use native unit_of_measurement for run duration numbers
* Unstack some ifs
* Add mopeka standard tank sensor.
* Enhance mopeka ble to find standard sensors.
* Updated `CODEOWNERS` file
* Move default from cpp to py.
* Format documents with esphome settings.
* Linter wants changes.
* Update name of `get_lpg_speed_of_sound`.
* manually update `CODEOWNERS`.
* Manually update CODEOWNER, because `build_codeowners.py. is failing.
* Add comments.
* Use percentage for `propane_butane_mix`.
* add config to `dump_config()`
* Formatting
* Use struct for data parsing and find best data.
* Add `this`.
* Consistant naming of configuration.
* Fix format issues.
* Make clang-tidy happy.
* Adjust loop variable.
---------
Co-authored-by: Your Name <you@example.com>
* adding Clipping support to the displaybuffer
- add rect structure
* removed unused define
* add missing property for storing the clipped areas
* include log header
* Move Rect method's code to cpp file
- removed obsolete remarks
* fixed reported issues
* make Rect class methods public
* clang fix
* Remove commented code
* Renaming clipping methods
* Multiple changes:
- replaced 32766 with VALUE_NO_SET
- fixed the way *_clipping(left, top, right, bottom) is stored
- add `is_clipping();`
- make sure that all clipped region are closed after `do_update_()`
- rename de parameters for `Rect::expand();`
* remove unneeded space
* replace define with static const uint8_t
* correcting my copy paste mistake
---------
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>