Commit graph

5738 commits

Author SHA1 Message Date
Eduardo Roldan
8a705bf4b0
pipsolar component. Correct the sscanf format for QPIG command parsing to set pv_input_voltage as float (not int) (#4165) 2023-03-14 14:11:55 +13: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
6a89180deb
Merge pull request #4553 from esphome/bump-2023.3.0b3
2023.3.0b3
2023-03-13 15:31:04 +13:00
Jesse Hills
65d2b806cc
Bump version to 2023.3.0b3 2023-03-13 13:32:21 +13:00
Jesse Hills
c149a3033c
Map gpio pins for touch on esp32-s2/s3 (#4552)
* Map gpio pins for touch on esp32-s2/s3

* fix value
2023-03-13 13:32:21 +13:00
NP v/d Spek
4b7c233f1a
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 13:32:21 +13:00
Jesse Hills
6e8e9c2aa9
Allow AUTO_LOAD to be a function (#4550) 2023-03-13 13:32:21 +13:00
Dorian Zedler
b6f628ee40
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-13 13:32:21 +13:00
Martin Murray
bf79a700b7
Add carbon dioxide device class to scd30 sensor schema. (#4547) 2023-03-13 13:32:21 +13:00
jakehdk
cdeb6e750f
Add support for new clones of mpu6050 responding with 0x70 address (#4546)
Co-authored-by: jakehdk <Jake@Jakobs-MacBook-Pro.local>
2023-03-13 13:32:21 +13: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
dd226360bb
Merge pull request #4542 from esphome/bump-2023.3.0b2
2023.3.0b2
2023-03-09 19:03:39 +13:00
Jesse Hills
1a9aedf152
Bump version to 2023.3.0b2 2023-03-09 15:47:57 +13:00
Carlos Garcia Saura
d82c6df57e
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 15:47:57 +13:00
Oxan van Leeuwen
7c91b4474a
Revert storing Font glyphs in manually-allocated memory (#4516)
This partially reverts commit 62459a8ae1.
2023-03-09 15:47:57 +13:00
Oxan van Leeuwen
a4f21db272
Drop broken logging macros (#4534) 2023-03-09 15:47:57 +13:00
NP v/d Spek
58a8e1859e
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-09 15:47:57 +13:00
Russell Cloran
2bed5b18c1
Add ESP32-S3 support in NeoPixelBus component (#4114)
* Add ESP32-S3 support in NeoPixelBus component

* Update NeoPixelBus version in platformio.ini
2023-03-09 15:47:57 +13:00
Jared Sanson
fb5eb57345
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-09 15:47:57 +13: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
Jesse Hills
63db42a1d4
Merge pull request #4536 from esphome/bump-2023.3.0b1
2023.3.0b1
2023-03-09 10:43:40 +13: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
f58ffe41f8
Bump version to 2023.3.0b1 2023-03-09 09:09:39 +13:00
Jesse Hills
4f138c600b
Bump version to 2023.4.0-dev 2023-03-09 09:09:39 +13:00
Jesse Hills
445d2e372c
Merge branch 'dev' into bump-2023.3.0b1 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