Commit graph

4515 commits

Author SHA1 Message Date
Jesse Hills
f0f6d3f1cd
Disallow uart0/1/2 as ids in config (#4446)
* Disallow uart0/1/2 as ids in config

* Update test files
2023-03-20 02:29:21 +00:00
Jesse Hills
0b383542da
Split test3.yaml (#4591) 2023-03-19 22:39:02 +00:00
Michael Bisbjerg
b2cec10601
Fix outdated filter string in platformio_api (#4587) 2023-03-19 19:11:18 +00:00
Sybren A. Stüvel
48658d5a55
Add a simple 'skip_initial' filter (#4582)
* 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
2023-03-19 19:08:51 +00:00
Peter Halicky
5207ca1d52
Add support for ESP32 CAM resolutions for 3MP and 5MP sensors (OV5640 for example). Also support (almost) arbitrary camera clock, some cameras/ESP chips need slightly lower clock than 20MHz to avoid image corruption. (#4580) 2023-03-19 19:03:38 +00:00
Fabian
7196fb8e82
add define __str__ method (#4576)
Co-authored-by: Your Name <you@example.com>
2023-03-19 18:55:12 +00:00
dependabot[bot]
48ada2eebb
Bump aioesphomeapi from 13.5.0 to 13.5.1 (#4572)
Bumps [aioesphomeapi](https://github.com/esphome/aioesphomeapi) from 13.5.0 to 13.5.1.
- [Release notes](https://github.com/esphome/aioesphomeapi/releases)
- [Commits](https://github.com/esphome/aioesphomeapi/compare/v13.5.0...v13.5.1)

---
updated-dependencies:
- dependency-name: aioesphomeapi
  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>
2023-03-19 18:54:18 +00:00
Nathaniel Wesley Filardo
0de5808ed2
climate: brown paper bag fix for on_configure (#4573)
I forgot this hunk in https://github.com/esphome/esphome/pull/4511 .
I'm sorry for the noise.
2023-03-19 18:54:00 +00:00
Kai Gerken
ebc544e4b4
Fix compile error on pzemdc.h (#4583) 2023-03-19 18:31:05 +00:00
Raph
a31fb3c987
Add option flip_x (#4555)
* Adding flip_x

* Adding flip_x

* Adding flip_x

* Adding flip_x

* Adding flip_x

* convert tab to space

* update format
2023-03-15 22:23:01 +00:00
Samuel Sieb
dfc7cd7f5d
allow using a binary output for the status led (#4532)
* allow using a binary output for the status led

* lint

* output status as well

* simplify

---------

Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-03-15 22:21:35 +00:00
Witold Krecicki
a8bb2a42a1
Add an option to force SPI into software mode, useful when (#4556)
reusing pins for different purposes.
2023-03-15 22:21:25 +00:00
R Huish
3d4c0e6667
Added missing PM_1_0 and PM_10_0 for PMS5003T and PMS5003ST (#4560)
* 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
2023-03-15 22:21:10 +00:00
Trent Houliston
25fb288016
Update the delta filter to take a percentage value as well as an absolute value (#4391) 2023-03-15 22:20:18 +00:00
Fabian
1b8b8cdd11
EntityBase: Icon string can stay in flash. (#4566)
* Icon string can stay in flash.

* Remove redundant const.

---------

Co-authored-by: Your Name <you@example.com>
2023-03-15 22:20:12 +00:00
NP v/d Spek
2f50e18eb5
fixing shrink and extend functions of the displaybuffer's Rect class (#4565)
* 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
2023-03-15 19:45:50 +00:00
Jesse Hills
215107e8ea
Mark esp32_touch supported only on standard esp32 variant (#4562)
* Mark esp32_touch supported only on standard esp32 variant

* Add back default
2023-03-15 07:42:33 +00:00
Keith Burzinski
d3f2b93c42
Remove switch actions during config; bump setup priority (#4563) 2023-03-15 05:21:23 +00:00
Stroe Andrei Catalin
ee7102fcd1
Added response for Tuya RSSI command (#4549)
* Added wifi rssi util
Added tuya mcu response to wifi rssi command

* Cleanup

* PR Comments

* PR Comments
2023-03-14 00:54:35 +00:00
DAVe3283
a44e38300b
Revert "Remove state class from uptime sensor (#4345)" (#4557)
This reverts commit 36c2e770bf.
Addresses esphome/issues#4193.
2023-03-14 00:52:19 +00:00
Eduardo Roldan
b00e20c29f
pipsolar component. Correct the sscanf format for QPIG command parsing to set pv_input_voltage as float (not int) (#4165) 2023-03-13 22:46:46 +00:00
Jesse Hills
d642aeba0f
Map gpio pins for touch on esp32-s2/s3 (#4552)
* Map gpio pins for touch on esp32-s2/s3

* fix value
2023-03-13 00:13:36 +00:00
NP v/d Spek
6a6aee510d
On the ILI9xxx display's enable the psram on esp32 and allow big screen (#4551)
* 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.
2023-03-13 00:13:19 +00:00
Jesse Hills
ea17a92dbc
Allow AUTO_LOAD to be a function (#4550) 2023-03-12 22:43:31 +00:00
Dorian Zedler
32a0a60480
Feat: add support for hex color in color component (#4493)
* 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>
2023-03-12 20:26:27 +00:00
Martin Murray
5a56644702
Add carbon dioxide device class to scd30 sensor schema. (#4547) 2023-03-12 20:16:48 +00:00
jakehdk
29113808ee
Add support for new clones of mpu6050 responding with 0x70 address (#4546)
Co-authored-by: jakehdk <Jake@Jakobs-MacBook-Pro.local>
2023-03-12 20:14:00 +00:00
Jesse Hills
6471361715
Format test files (#4541) 2023-03-09 01:54:51 +00:00
Carlos Garcia Saura
01687a9d57
Correct BME680 gas calculation and heater_off (#4498)
* 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
2023-03-09 00:34:06 +00:00
Oxan van Leeuwen
801fbf44c5
Revert storing Font glyphs in manually-allocated memory (#4516)
This partially reverts commit 62459a8ae1.
2023-03-09 00:14:34 +00:00
Oxan van Leeuwen
ba1416cc0e
Drop deprecated entity property base methods (#4539) 2023-03-09 00:08:45 +00:00
Oxan van Leeuwen
afc1c83af4
Mark unique_id() override as deprecated (#4538) 2023-03-09 00:06:20 +00:00
Oxan van Leeuwen
da056866ff
Drop broken logging macros (#4534) 2023-03-09 00:03:33 +00:00
NP v/d Spek
336c2d34e6
Renaming and extending the ili9341 to the ili9xxx component (#4275)
* - 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>
2023-03-08 23:03:49 +00:00
Russell Cloran
f3a969d35c
Add ESP32-S3 support in NeoPixelBus component (#4114)
* Add ESP32-S3 support in NeoPixelBus component

* Update NeoPixelBus version in platformio.ini
2023-03-08 22:35:40 +00:00
Jared Sanson
c12dd77c64
Fix ethernet clk_mode for GPIO0_OUT (#4307)
* Fix GPIO0_OUT definition for ethernet component

* Formatting

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-08 21:03:11 +00:00
Jesse Hills
4f138c600b
Bump version to 2023.4.0-dev 2023-03-09 09:09:39 +13:00
Kai Gerken
1087cb55b4
Added pzemdc reset energy action (#4481)
* 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>
2023-03-08 19:00:44 +00:00
J. Nick Koston
600f4be2c4
Bump esp-idf to 4.4.4 (#4528)
There are some nice BLE fixes and this uses about ~5000-8000 bytes
less RAM

https://github.com/espressif/esp-idf/releases/tag/v4.4.4
2023-03-08 18:25:25 +00:00
Fabian
5e6665494d
Use PSRam for BLE scan results. (#4486)
* 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>
2023-03-08 18:23:02 +00:00
Jesse Hills
2ef25f3153
Fix ethernet driver setting gpio 5 high when no power pin defined (#4531) 2023-03-08 07:12:07 +00:00
Morgan Robertson
bc28ea1fde
Add AS7341 spectral color sensor (#4331)
* 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>
2023-03-08 01:15:49 +00:00
Jesse Hills
623e31ddee
sn74hc165 fixes (#4457)
* 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
2023-03-08 01:11:12 +00:00
Oxan van Leeuwen
ceebe14628
Add ability to await safe mode in codegen (#4529)
* Add ability to await OTA safe mode

* Make pylint happy
2023-03-07 21:29:45 +00:00
DAVe3283
b29cc58144
Add absolute humidity component (#4519)
* Import Absolute Humidity component

https://PigLab.ReaperLegion.net/home-automation/hass/esphome/custom-components/absolute-humidity

* Fix terminology, add some docstrings

* Switch from double to float

https://github.com/esphome/esphome/pull/4519#pullrequestreview-1327615169
The additional precision doesn't matter in practice.

* Address code review suggestions

* Lint code
2023-03-07 20:47:25 +00:00
dependabot[bot]
1b328da265
Bump pylint from 2.16.2 to 2.16.4 (#4524)
Bumps [pylint](https://github.com/PyCQA/pylint) from 2.16.2 to 2.16.4.
- [Release notes](https://github.com/PyCQA/pylint/releases)
- [Commits](https://github.com/PyCQA/pylint/compare/v2.16.2...v2.16.4)

---
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>
2023-03-07 07:21:45 +00:00
dependabot[bot]
06ca5354b2
Bump pytest from 7.2.1 to 7.2.2 (#4505)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.1 to 7.2.2.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/7.2.1...7.2.2)

---
updated-dependencies:
- dependency-name: pytest
  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>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-07 07:21:23 +00:00
bisbastuner
356efdb92c
Add support for multiple devices in bme680_bsec (#3550)
* 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>
2023-03-07 07:15:40 +00:00
dependabot[bot]
bb5ab8b36d
Bump esptool from 4.5 to 4.5.1 (#4497)
Bumps [esptool](https://github.com/espressif/esptool) from 4.5 to 4.5.1.
- [Release notes](https://github.com/espressif/esptool/releases)
- [Commits](https://github.com/espressif/esptool/compare/v4.5...v4.5.1)

---
updated-dependencies:
- dependency-name: esptool
  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>
2023-03-07 06:38:05 +00:00
kahrendt
6ecf4ecac6
FS3000 sensor (#4502)
* 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>
2023-03-07 04:25:14 +00:00