Compare commits

...

2322 Commits

Author SHA1 Message Date
Jesse Hills
4180eae68f Merge pull request #6374 from esphome/bump-2024.3.0b2
2024.3.0b2
2024-03-15 17:06:14 +13:00
Jesse Hills
83cc7b9d48 Bump version to 2024.3.0b2 2024-03-15 14:23:12 +13:00
Jimmy Hedman
ca85a41a72 Don't try to get IPv6 addresses when disabled (#6366) 2024-03-15 14:23:12 +13:00
Samuel Sieb
92fbc61c46 fix servo restore (#6370) 2024-03-15 14:23:12 +13:00
Attila Farago
76c4bfbed3 Allow button press action in web_server to be executed via GET method (#5938) 2024-03-15 14:23:12 +13:00
Clyde Stubbs
e33e09a685 SPI: Revert clk_pin to standard output pin schema (#6368) 2024-03-15 14:23:12 +13:00
Jesse Hills
c4f4d25041 Merge pull request #6364 from esphome/bump-2024.3.0b1
2024.3.0b1
2024-03-13 17:28:50 +13:00
Jesse Hills
0ebb6efee6 Bump version to 2024.3.0b1 2024-03-13 16:33:42 +13:00
Jesse Hills
a7fec07bc4 Merge branch 'release' into dev 2024-03-13 16:31:57 +13:00
kev300
de43678525 add possibility to provide different conversion times for Bus Voltage… (#6327)
Co-authored-by: Kevin Hübner <k.huebner@ceyoniq.com>
2024-03-13 16:25:38 +13:00
Chris Feenstra
64a47f840e Added Kamstrup Multical 40x component (#4200)
Co-authored-by: Chris Feenstra <chris@cfeenstra.nl>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: cfeenstra1024 <git@cfeenstra.nl>
2024-03-13 16:01:22 +13:00
Ettore Beltrame
b34b10888b Emmeti infrared climate support (#5197)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-13 14:16:02 +13:00
Mark Spicer
3abf2f1d14 feat: Add HTU31D Support (#5805)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-13 14:04:59 +13:00
Sorin Iordachescu
77214a677b ADE7953: Add the ability to use accumulating energy registers, more precise power reporting (#6311)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-13 12:17:06 +13:00
Clyde Stubbs
c7305e15a7 Add driver for quad SPI AMOLED displays (#6354)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-13 12:14:57 +13:00
Landon Rohatensky
2df9c30446 download font from url on build (#5254)
Co-authored-by: guillempages <guillempages@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: clydebarrow <2366188+clydebarrow@users.noreply.github.com>
2024-03-13 12:07:40 +13:00
M-A
d3a028f7fa Make USE_HOST compilable on msys2 (#6359) 2024-03-13 07:22:28 +11:00
Clyde Stubbs
f264151537 touchscreen driver fixes (#6356) 2024-03-13 07:20:16 +13:00
Manuel Kasper
f5b02056b9 Require reset_pin for certain waveshare_epaper models in YAML validation (#6357) 2024-03-12 21:35:29 +11:00
Clyde Stubbs
b0a192d6a5 Add getter for font glyph data (#6355) 2024-03-12 17:26:31 +13:00
Citric Lee
4bbde8357a Add Seeed Studio mmWave Kit MR24HPC1 (#5761)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Peter Pan <twinkle-pirate@hotmail.com>
2024-03-12 16:33:40 +13:00
Anton Viktorov
5b28bd3d97 VEML7700 and VEML6030 light sensors (#6067)
* VEML7700 and VEML6030 light sensors

* VEML7700 and VEML6030 light sensors - CODEOWNERS

* VEML7700 and VEML6030 light sensors - tidy up

* VEML7700 and VEML6030 light sensors - tidy up

* VEML7700 tidy up

* VEML7700 tidy up 4

* VEML7700 tidying up more

* VEML7700 after review. non-blocking approach

* VEML7700 CONSTANT_CASE

* VEML7700 merge fix

* VEML7700 pragma pack changed to attribute

* VEML7700 pragma pack -> attribute

* Minor publish split

* minor

* LOGD->LOGV

* new school tests added

* Discard changes to tests/test1.yaml

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2024-03-11 21:51:01 -05:00
Clyde Stubbs
782d662c20 SPI schema now uses typed_schema with type key (#6353) 2024-03-12 15:50:24 +13:00
mrtoy-me
51ab15c40e hydreon_rgxx - add resolution option (#6077)
Co-authored-by: functionpointer <suspendfunction@gmail.com>
2024-03-12 15:31:58 +13:00
Clyde Stubbs
1dd14254b3 Drivers for RGB 16 bit parallel displays (#5872)
Co-authored-by: clydebarrow <366188+clydebarrow@users.noreply.github.com>
2024-03-12 11:55:23 +13:00
RubyBailey
8cb689b58c Mitsubishi Climate updates (#3886)
Co-authored-by: Blair McBride <blair@theunfocused.net>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: RubyBailey <ruby_bailey11@hotmail.com>
Co-authored-by: X-Ryl669 <boite.pour.spam@gmail.com>
Co-authored-by: OlympusMonds <OlympusMonds@users.noreply.github.com>
2024-03-12 10:01:05 +13:00
Manuel Kasper
a96762220a Add support for Waveshare 2.13" V2 display (#6337)
* Add support for Waveshare 2.13" V2 display

* Fix clang-tidy error, add comment about BUSY in deep sleep

* Add test

* Add nullptr check and move tests to separate file

* Fix GPIO pins in test
2024-03-12 05:38:59 +11:00
dependabot[bot]
32be12423a Bump pytest from 8.0.2 to 8.1.1 (#6346)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-12 07:25:19 +13:00
dependabot[bot]
0ecd938570 Bump aioesphomeapi from 23.1.0 to 23.1.1 (#6348)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-12 07:25:11 +13:00
Mike La Spina
cd89c38a07 Refactor ATM90E32 to reduce blocking time and improve accuracy. (#5670)
Co-authored-by: descipher <120155735+GelidusResearch@users.noreply.github.com>
2024-03-12 07:23:13 +13:00
Fabio Pugliese Ornellas
430ee43b93 Mhz19 warmup (#6214) 2024-03-12 07:17:47 +13:00
Clyde Stubbs
e4df422798 font: add anti-aliasing and other features (#6198)
* Pack glyph bits

* Use unsigned chars for unicode strings.

* Implement multi-bit glyphs

* clang-format

* Allow extra glyphs to be added to a font

* Allow .otf and .woff file extensions

* Add printf versions with background color;
Add tests

* Whitespace...

* Move font test to new framework

* CI fix

* CI fix

* CODEOWNERS

* File extensions tested as case-insensitive
2024-03-11 04:03:39 -05:00
Clyde Stubbs
11b31483c3 Touchscreen: add support for CST226 controller chip (#6151)
---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-11 18:35:20 +11:00
Clyde Stubbs
221f04b9a5 ili9xxx: Add support for GC9A01A display (#6351)
* Add support for GCA901A display


---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-11 07:19:35 +00:00
Clyde Stubbs
dfb14fc6ea Add state listeners to rotary_encoder (#6035) 2024-03-11 20:13:41 +13:00
Clyde Stubbs
501973e07b Add ble_presence binary sensor timeout config value. (#6024)
* Add binary sensor timeout config value.

* Add test
2024-03-11 17:38:47 +11:00
swoboda1337
1662f833b0 AM2315C Temperature + Humidity Sensor (#6266)
Co-authored-by: Jonathan Swoboda <jonathan.swoboda>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-11 19:33:43 +13:00
Clyde Stubbs
c559ccbb83 ILI9XXX: Lazily allocate buffer (#6352) 2024-03-11 16:52:05 +11:00
Clyde Stubbs
d6bcc465a8 Add CST816 touchscreen driver (#5941)
* Add CST816 touchscreen
2024-03-11 16:34:46 +11:00
OdileVidrine
9c95e570c7 Check permissions (#6255) 2024-03-11 13:33:31 +13:00
Rodrigo Martín
6a8a2aaefb feat(MQTT): Add QoS option for each MQTT component (#6279) 2024-03-11 13:12:52 +13:00
dentra
c899a33d1a web_server_idf: support x-www-form-urlencoded POST requests (#6037)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-11 13:09:36 +13:00
NP v/d Spek
725b0c81e8 cleanup ili9xxx component by removing data rate define (#6350) 2024-03-10 23:38:40 +00:00
alexborro
8850b959e9 [Fingerprint_grow] Implements Sleep Mode feature (#6116) 2024-03-11 12:04:16 +13:00
chbmuc
247baa414a Add IRK support to allow tracking of devices with random MAC addresses (#6335)
* Add IRK support to allow tracking of devices with random MAC addresses

* make CONF_IRK a local definition

* Add tests

---------

Co-authored-by: clydebarrow <2366188+clydebarrow@users.noreply.github.com>
2024-03-10 22:58:50 +00:00
tomaszduda23
d4489ac373 dump config after logging CDC port is opened by host (#6169) 2024-03-11 11:43:33 +13:00
Samuel Sieb
6a46548a8b add template fan (#6310) 2024-03-10 15:42:02 -07:00
NewoPL
0cdd0b295e fix: modbus_textsensor response is too long in some cases (#6333) 2024-03-11 11:15:32 +13:00
dependabot[bot]
3e2ce363a2 Bump docker/build-push-action from 5.0.0 to 5.2.0 in /.github/actions/build-image (#6347) 2024-03-11 11:11:42 +13:00
dependabot[bot]
db813bbf04 Bump actions/cache from 4.0.0 to 4.0.1 (#6306)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-11 11:09:40 +13:00
Solomon
c52052563f ads1118 component (#5711)
Co-authored-by: Solomon <solomon.gorkhover@finnpartners.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-11 11:09:05 +13:00
Jesse Hills
89b3bc7d70 Set dependabot to look at composite actions versions (#6343) 2024-03-11 10:36:44 +13:00
dependabot[bot]
1253583c2d Bump docker/setup-buildx-action from 3.0.0 to 3.1.0 (#6295)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 10:22:31 +13:00
dependabot[bot]
732fcc16f3 Bump pytest-asyncio from 0.23.5 to 0.23.5.post1 (#6334)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 10:21:39 +13:00
dependabot[bot]
5015436295 Bump aioesphomeapi from 23.0.0 to 23.1.0 (#6332)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 10:20:53 +13:00
Dmitry
fc0d5abc54 Add AGS10 Sensor (#6070) 2024-03-11 10:19:09 +13:00
RFDarter
1e96a19d09 Add datetime date entities (#6191)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-11 07:52:22 +13:00
rafalw
4ec2b37cc6 Update bang_bang to log two decimal places in config dump (#6304)
change of precision to two decimal places
2024-03-09 21:14:57 -06:00
Clyde Stubbs
0bc645ded7 Fix build failures on host platform caused by #6167 (#6338)
* Fix build failures for logger component on host platform

* Add climits header

* Restore logger functionality on host

* Install libsodium in ci
2024-03-09 21:08:58 -06:00
sandronidi
90f416bd0d DFPlayer: refix Bug created with PR 4758 (#5861) 2024-03-08 23:16:21 -03:00
Jimmy Hedman
13736b5c57 Update mDNS for IDF >= 5.0 (#6328) 2024-03-07 11:26:39 +13:00
Jesse Hills
833affc1bf Merge pull request #6326 from esphome/bump-2024.2.2
2024.2.2
2024-03-06 10:28:28 +13:00
Jesse Hills
e2b197dc2c Bump version to 2024.2.2 2024-03-06 09:34:48 +13:00
Jesse Hills
f39dc49f49 Add wake word phrase to voice assistant start command (#6290) 2024-03-06 09:34:47 +13:00
Samuel Sieb
b0a25401f7 auto load output for now (#6309)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2024-03-06 09:34:47 +13:00
Jesse Hills
37d2b3c797 Merge pull request from GHSA-9p43-hj5j-96h5 2024-03-06 09:34:26 +13:00
Samuel Sieb
63cce916e2 fix tmp102 negative calculation (#6320) 2024-03-06 09:34:08 +13:00
星野SKY
1aab87b41c handling with the negative temperature in the sensor tmp102 (#6316) 2024-03-06 09:33:55 +13:00
puuu
a3fc1acdcb CSE7766: Fix energy calculation (#6286)
Co-authored-by: DAVe3283 <DAVe3283+GitHub@gmail.com>
2024-03-06 09:32:23 +13:00
Jesse Hills
b3ff23ec76 Merge pull request from GHSA-9p43-hj5j-96h5 2024-03-06 08:09:45 +13:00
Jesse Hills
01fc0578bd Add wake word phrase to voice assistant start command (#6290) 2024-03-06 07:41:18 +13:00
Samuel Sieb
96446446b2 auto load output for now (#6309)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2024-03-06 07:40:27 +13:00
Jesse Hills
357ac3b85f Improv: support connecting to hidden networks (#6322) 2024-03-05 13:02:05 +13:00
Nate Clark
626221c5a8 Add toggle command to cover web_server endpoint (#6319) 2024-03-05 10:55:10 +13:00
Pavlo Dudnytskyi
81b8451b8a Additional sensors and binary sensors support for Haier Climate (#6257)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Pavlo Dudnytskyi <pdudnytskyi@astrata.eu>
2024-03-05 10:54:01 +13:00
tomaszduda23
de2d5a65b5 Separate logger implementations for each hardware platform into different files (#6167)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2024-03-05 10:52:52 +13:00
Dan Jackson
d5bfcd3bcf Support for MS8607 PHT (Pressure Humidity Temperature) sensor (#3307)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-05 10:49:57 +13:00
Andy Barcinski
f3ed091395 x9c: fix off by 1 error (#6318) 2024-03-05 09:18:18 +13:00
Samuel Sieb
56837b0947 fix tmp102 negative calculation (#6320) 2024-03-04 07:33:39 +00:00
星野SKY
bc74dd4980 handling with the negative temperature in the sensor tmp102 (#6316) 2024-03-04 14:02:40 +13:00
CptSkippy
0298adb1d8 aht10: Added new CMD and renamed existing CMD to match datasheet (#6303) 2024-03-04 09:00:18 +13:00
星野SKY
11cae03769 Fix return value in core/automation.h (#6314) 2024-03-01 23:53:12 -06:00
mathieu-mp
4aeb8e8081 Add regular polygon shapes to display component (#6108) 2024-03-01 16:49:26 +13:00
dependabot[bot]
082e76131b Bump aioesphomeapi from 22.0.0 to 23.0.0 (#6293)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-01 16:47:18 +13:00
Jimmy Hedman
cf7cc179fb Fix numbering of sensors (#6305) 2024-03-01 14:02:33 +13:00
Jeroen van Oort
4a9d7771fe Adding W5500 support to ethernet component (#4424)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-03-01 13:46:08 +13:00
DAVe3283
f53f91e191 CSE7766 Apparent Power & Power Factor calculations (#6292) 2024-02-29 10:12:02 +13:00
dependabot[bot]
ad7866b80e Bump peter-evans/create-pull-request from 6.0.0 to 6.0.1 (#6302)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-29 09:55:30 +13:00
Jesse Hills
3c651f4091 Add on_update trigger for Project versions (#6298) 2024-02-28 02:01:56 -06:00
NP v/d Spek
5393a09872 Touchscreen component and driver fixes (#5997)
* Introduce calibration settings for all touchscreen drivers.
this will override the common values.
The x,y coordinates only calculated when the right calibrations are set.

* resolve issues reported by CI

* remove unneeded spaces and newlines

* Forgot to remove some obsolete code

* remove get_setup_priority from xpt2046

* remove media_player changes.

* media_player: removed to much,

* Update suggestions

* referd back the `get_setup_priority` removal so it can be moved into a othe PR.

* tt21100: restore init read

* fix spacing

* load native display dimensions instead of using internal dimensons.
and load it only onse on setup

* moved `update_touches()` to protexted section

* adding Clydes PR#6049

* add multitouch test script

* Update all Touchscreen replacing `get_*_internal` to `get_native_*`

* fixed some CI recomendations

* couple of fixes

* make sure the display is running before  touchscreen is setup

* fix clang

* revert back last changes

* xpt2046: change log level for testing

* logging information

* add test file

* fix polling issue with the for example the xpt2046

* fixed some CI issues

* fixed some CI issues

* restore mirror parameter discriptions

* same for the swap_xy

* same for the transform

* remove the above const from const.py

* and put  the above const bacl const.py

* Merge branch 'nvds-touchscreen-fix1' of https://github.com/nielsnl68/esphome into nvds-touchscreen-fix1

* and put  the above const bacl const.py

* [tt21100] making interupt pin optional

* [tt21100] making interupt pin optional (now complete)

* update the display part based on @clyde'
s changes.

* fix issue with ft6x36 touvhscreen

* reverd back touch check. add comment

* add some extra checks to the ft6x36

* add an other log and a typo fixed

* okay an other fix.

* add an extra check like others do
and fix data type

* [ft6336] fix update race when ts is touched.

* [touchscreen] update some log's with a verbose level.

* fix clang issues

* fix the clang issues

* fix the clang issues

* fix virtual issue.

* fix the clang issues

* an other clang issues

* remove anti-aliased fonts support. It does not belong here.

* remove anti-aliased fonts support. It does not belong here.

* rename test script

* Moving the test files to there right location.

* rename the test files

* clean up the code

* add a new line

* clang fixings

* clang fixings

* remove comment

* remove comment

* Update esphome/components/touchscreen/__init__.py

Co-authored-by: guillempages <guillempages@users.noreply.github.com>

* Update esphome/components/touchscreen/__init__.py

Co-authored-by: guillempages <guillempages@users.noreply.github.com>

* Update esphome/components/touchscreen/__init__.py

Co-authored-by: guillempages <guillempages@users.noreply.github.com>

* Update esphome/components/touchscreen/touchscreen.cpp

* Update esphome/components/touchscreen/touchscreen.cpp

* [ft63x6] add threshold

---------

Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
Co-authored-by: guillempages <guillempages@users.noreply.github.com>
2024-02-28 02:42:11 +00:00
NP v/d Spek
c43c9ad1c5 Add RTTTL volume control. (#5968)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-02-28 11:31:33 +13:00
Darek
37138d4f28 Waveshare e-ink 2IN9_V2 - fix full and partial update based on vendor SDK and examples (#5481)
Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
2024-02-28 07:29:56 +11:00
Jimmy Hedman
f73518dbeb Improve dualstack and IPv6 support (#5449)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-02-27 21:16:20 +13:00
dependabot[bot]
5e04914a11 Bump pytest from 8.0.1 to 8.0.2 (#6288)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-27 16:49:33 +13:00
puuu
9b77f97d87 CSE7766: Fix energy calculation (#6286)
Co-authored-by: DAVe3283 <DAVe3283+GitHub@gmail.com>
2024-02-27 16:47:45 +13:00
dougiteixeira
323849c821 Add device class support to text sensor (#6202)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-02-26 11:29:39 +13:00
Alexander Puzynia
a8ab745479 Allow to specify global build directory (#6276) 2024-02-26 11:26:08 +13:00
Jesse Hills
cc115e7cc9 Merge pull request #6284 from esphome/bump-2024.2.1
2024.2.1
2024-02-26 09:04:36 +13:00
Jesse Hills
badac933ae Bump version to 2024.2.1 2024-02-26 07:52:25 +13:00
Keith Burzinski
b1b8217713 Fix thermostat supplemental actions (#6282) 2024-02-26 07:52:25 +13:00
Samuel Sieb
f3174c58bc fix throttle average nan handling (#6275)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2024-02-26 07:52:25 +13:00
Samuel Sieb
e66e135a63 make output optional for speed fan (#6274)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2024-02-26 07:52:25 +13:00
Jesse Hills
d814ed1d4a Merge pull request from GHSA-8p25-3q46-8q2p 2024-02-26 07:52:08 +13:00
J. Nick Koston
84c6e52be2 dashboard: move storage json update to a background task in edit save (#6280)
* dashboard: move storage json update to a background task in edit save

* dashboard: move storage json update to a background task in edit save

* fix typing

* docs
2024-02-26 07:50:28 +13:00
Keith Burzinski
2cf6393161 Fix RP2040 SPI pin validation (#6277) 2024-02-26 07:47:24 +13:00
Samuel Sieb
5a7759f1c4 allow multiple emc2101 (#6272) 2024-02-26 07:47:24 +13:00
Daniel Baulig
db5205931b web_server: Add a position property for cover entities that have the supports position trait (#6269) 2024-02-26 07:47:24 +13:00
Jesse Hills
62d59cffcc Bump zeroconf timeout to 3000 (#6270) 2024-02-26 07:47:24 +13:00
Jesse Hills
2e7129e816 Add missing timeout to "async_request" (#6267) 2024-02-26 07:47:24 +13:00
Keith Burzinski
b5e633a2f3 Fix test_build_components for macOS sed (#6278) 2024-02-26 07:37:35 +13:00
Keith Burzinski
4a3627c93e Fix thermostat supplemental actions (#6282) 2024-02-26 07:28:52 +13:00
Samuel Sieb
77916d051e fix throttle average nan handling (#6275)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2024-02-26 07:26:35 +13:00
Samuel Sieb
98552a0eaa make output optional for speed fan (#6274)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2024-02-26 07:23:01 +13:00
J. Nick Koston
83a1fc5fdb dashboard: move storage json update to a background task in edit save (#6280)
* dashboard: move storage json update to a background task in edit save

* dashboard: move storage json update to a background task in edit save

* fix typing

* docs
2024-02-24 23:39:47 -05:00
Keith Burzinski
4a54af0d57 Fix RP2040 SPI pin validation (#6277) 2024-02-24 00:31:20 -06:00
Samuel Sieb
15af08f6b7 allow multiple emc2101 (#6272) 2024-02-22 20:17:10 -06:00
Jesse Hills
a748610071 Merge pull request from GHSA-8p25-3q46-8q2p 2024-02-23 07:38:24 +13:00
Stefan Rado
58c0d8c267 Add Uponor Smatrix component (#5769)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-02-22 16:03:14 +13:00
LouDou
76a3ffc8a9 Allow ESP8266 to use multiple i2c busses (#6145)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-02-22 14:51:05 +13:00
dependabot[bot]
fd03d875e8 Bump aioesphomeapi from 21.0.2 to 22.0.0 (#6263)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-22 14:48:12 +13:00
Sybren A. Stüvel
ea44166814 Improve the error message on OTA version mismatch (#6259) 2024-02-22 14:35:21 +13:00
Daniel Baulig
481f067625 web_server: Add a position property for cover entities that have the supports position trait (#6269) 2024-02-22 14:33:28 +13:00
Jesse Hills
a3fa1e6c52 Bump zeroconf timeout to 3000 (#6270) 2024-02-22 14:26:00 +13:00
Jesse Hills
127cbde2a2 Add missing timeout to "async_request" (#6267) 2024-02-21 17:51:06 -06:00
Jesse Hills
75af4c3d62 Fix yamllint (#6253) 2024-02-21 17:14:30 +13:00
Stephen Tierney
e847039ffd LTR390 - Multiple bugfixes (#6161) 2024-02-21 17:10:04 +13:00
dependabot[bot]
d96090095a Bump pyupgrade from 3.15.0 to 3.15.1 (#6247)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-02-21 16:57:51 +13:00
dependabot[bot]
256d886d77 Bump voluptuous from 0.14.1 to 0.14.2 (#6181)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-02-21 16:57:38 +13:00
dependabot[bot]
f4eb525c97 Bump frenck/action-yamllint from 1.4.2 to 1.5.0 (#6236)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21 16:46:35 +13:00
dependabot[bot]
f4552f5062 Bump peter-evans/create-pull-request from 5.0.2 to 6.0.0 (#6159)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21 15:58:10 +13:00
dependabot[bot]
57f53a0f16 Bump codecov/codecov-action from 3 to 4 (#6160)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21 15:56:28 +13:00
dependabot[bot]
b75caf5ea7 Bump pytest from 7.4.4 to 8.0.1 (#6246)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21 15:54:32 +13:00
dependabot[bot]
07c3ee75e5 Bump black from 23.12.1 to 24.2.0 (#6221)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-02-21 15:53:50 +13:00
Jesse Hills
2d22a2d1c2 Merge pull request #6252 from esphome/bump-2024.2.0
2024.2.0
2024-02-21 13:48:58 +13:00
Jesse Hills
c92968da8a Bump version to 2024.2.0 2024-02-21 12:51:13 +13:00
Jesse Hills
86580d07cb Merge pull request #6249 from esphome/bump-2024.2.0b3
2024.2.0b3
2024-02-21 11:38:08 +13:00
Jesse Hills
03ea71034f Bump version to 2024.2.0b3 2024-02-21 10:57:43 +13:00
sibowler
7bf676abfa Tuya Fan component fix to handle enum datapoint type (#6135) 2024-02-21 10:57:43 +13:00
Michael Hansen
fb16e6b027 Voice Assistant: add on_idle trigger and fix nevermind (#6141) 2024-02-21 10:57:43 +13:00
SmartShackMaster
4eb04afa62 Clear UART read buffer before sending next command (#6200) 2024-02-21 10:57:43 +13:00
Keith Burzinski
841a831c63 Fix tm1651 enum (#6248) 2024-02-21 10:57:43 +13:00
Samuel Sieb
ae4af2966a hold interrupt disable for dallas one-wire (#6244)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2024-02-21 10:57:43 +13:00
Stephen Cox
4d8b5edb1c Provide example devcontainer config for mdns and USB passthrough (#6094) 2024-02-21 10:49:59 +13:00
sibowler
924389ba74 Tuya Fan component fix to handle enum datapoint type (#6135) 2024-02-21 10:40:17 +13:00
Michael Hansen
4b04df2f6b Voice Assistant: add on_idle trigger and fix nevermind (#6141) 2024-02-21 10:38:33 +13:00
SmartShackMaster
1f432ec7de Clear UART read buffer before sending next command (#6200) 2024-02-21 10:27:17 +13:00
Keith Burzinski
2948d87a66 Add some components to the new testing framework (D) (#6175) 2024-02-21 08:40:13 +13:00
Keith Burzinski
5ef1bab23e Fix tm1651 enum (#6248) 2024-02-21 08:12:08 +13:00
Kevin P. Fleming
edd1678463 New component: ADE7880 voltage/current/power/energy sensor (#5242) 2024-02-20 12:24:44 +13:00
Samuel Sieb
5d144cff02 hold interrupt disable for dallas one-wire (#6244)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2024-02-20 08:13:12 +13:00
dependabot[bot]
c39f6d0738 Bump pytest-asyncio from 0.23.3 to 0.23.5 (#6201)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-19 08:13:52 -06:00
Jesse Hills
6ced54ea8e Merge pull request #6243 from esphome/bump-2024.2.0b2
2024.2.0b2
2024-02-19 17:36:12 +13:00
Jesse Hills
e0e3489335 Bump version to 2024.2.0b2 2024-02-19 17:01:01 +13:00
Jesse Hills
cc1813f5b9 Fix xl9535 pin reads (#6242) 2024-02-19 17:01:01 +13:00
Jesse Hills
6eb3c65445 Add optional minimum esphome version to microWakeWord manifest (#6240) 2024-02-19 17:01:01 +13:00
Marcel Hetzendorfer
29ec40db5f WRGB Use correct multiplier (#6237) 2024-02-19 17:01:01 +13:00
marshn
61a45dcebe Fix to RF receiver for Drayton Digistat heating controller (#6235) 2024-02-19 17:01:01 +13:00
kahrendt
7aa2c494c8 Add more debugging logs to microWakeWord (#6238) 2024-02-19 17:01:01 +13:00
Keith Burzinski
373569d86d AUTO_LOAD sensor for shelly_dimmer (#6223) 2024-02-19 17:01:01 +13:00
Jesse Hills
967259a212 Fix xl9535 pin reads (#6242) 2024-02-19 03:44:18 +00:00
Carlos Ortega
342fb72b6a Prevent network config on rpipico board (#5832)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-02-19 14:29:41 +13:00
Anton Viktorov
e1345ae7e3 INA226 - fixed improper work with signed values, added configurable ADC parameters (#6172) 2024-02-19 14:24:59 +13:00
Ivan Kravets
062db622f3 Adjust HeatpumpIR dependency (#6222) 2024-02-19 11:55:46 +13:00
Jesse Hills
e3e670c084 Add optional minimum esphome version to microWakeWord manifest (#6240) 2024-02-19 11:52:37 +13:00
bisbastuner
142b33fc90 Add support for 1.8V-powered devices (#6234) 2024-02-19 07:44:24 +13:00
Marcel Hetzendorfer
8a52ba3ea3 WRGB Use correct multiplier (#6237) 2024-02-19 07:40:20 +13:00
marshn
acbcb9d2be Fix to RF receiver for Drayton Digistat heating controller (#6235) 2024-02-19 07:38:32 +13:00
kahrendt
db9d837d29 Add more debugging logs to microWakeWord (#6238) 2024-02-18 18:50:24 +13:00
Keith Burzinski
27a3a081c3 AUTO_LOAD sensor for shelly_dimmer (#6223) 2024-02-16 10:47:42 +13:00
Jesse Hills
7baf091d47 Bump openssh-client to 1:9.2p1-2+deb12u2 (#6216) 2024-02-13 14:29:54 +13:00
Jesse Hills
fb94778c04 Merge pull request #6215 from esphome/bump-2024.2.0b1
2024.2.0b1
2024-02-13 10:59:25 +13:00
Jesse Hills
6935b02d3f Bump openssh-client to 1:9.2p1-2+deb12u2 2024-02-13 10:19:02 +13:00
Jesse Hills
47d1a64894 Bump version to 2024.3.0-dev 2024-02-13 09:45:31 +13:00
Jesse Hills
0e769d77ff Bump version to 2024.2.0b1 2024-02-13 09:45:30 +13:00
Jesse Hills
082778d117 Merge branch 'dev' into bump-2024.2.0b1 2024-02-13 09:45:30 +13:00
kahrendt
e521662342 Add micro_wake_word component (#6136)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-02-13 09:38:50 +13:00
ChuckMash
061d5b4979 Fixed group mask logic for WLED Sync fix (#6193) 2024-02-12 11:55:06 +13:00
NP v/d Spek
71b3a14a29 update docstrings in cpp_generator.py (#6212) 2024-02-12 10:08:32 +13:00
Keith Burzinski
3eaf59cc5a Add some components to the new testing framework (C) (#6174) 2024-02-08 10:55:20 +13:00
Keith Burzinski
a91937dca5 Add missing vector.h for lightwaverf (#6196) 2024-02-08 10:53:44 +13:00
ChuckMash
558588ee8a WLED Sync fix and BK72XX support (#6190)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-02-07 01:41:40 +00:00
Clyde Stubbs
f3ef05f5c3 host platform: improvements and bugfixes (#6137)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-02-07 14:24:06 +13:00
Tomek Wasilczyk
0ede4a3095 CSE7766: fix power and current measurements at low loads (#6180) 2024-02-07 14:12:14 +13:00
Bill Adams
fe789c8beb Add "transformer_active" flag for use in effects. (#6157) 2024-02-07 12:13:55 +13:00
Keith Burzinski
05da0fb4cf Add some components to the new testing framework (B) (#6173) 2024-02-07 04:32:40 +09:00
J. Nick Koston
cfe16c92ee Bump aioesphomeapi to 21.0.2 (#6188) 2024-02-07 04:07:37 +09:00
Keith Burzinski
9dbbc80c74 Add some components to the new testing framework (A part 2) (#6162) 2024-02-07 04:05:04 +09:00
Marcel Hetzendorfer
164b42f5aa WRGB or RGBW? WS2814 (#6164) 2024-02-07 04:03:09 +09:00
Keith Burzinski
5e9741f51c Add some components to the new testing framework (A part 1) (#6142) 2024-02-05 11:29:18 +09:00
Jean-François Roy
b28821d846 dfrobot_sen0395: Use setLatency instead of outputLatency (#5665)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-02-05 10:57:11 +09:00
esphomebot
0fa0904bc5 Synchronise Device Classes from Home Assistant (#6158) 2024-02-01 01:25:47 +13:00
rnauber
92798751c2 Support tri-color waveshare eink displays 2.7inch B and B V2 (#4238)
Co-authored-by: Richard Nauber <richard@nauber.dev>
2024-01-30 15:16:32 +11:00
Ruben van Dijk
23a9a704f3 Minimum 1 for full_update_every to prevent IntegerDivideByZero. (#6150) 2024-01-28 07:15:14 +11:00
Clyde Stubbs
f2caf13d39 ILI9XXX: Restore offset usage in set_addr_window (#6147) 2024-01-25 23:13:38 -06:00
J. Nick Koston
25ab6f0297 Ensure filename is shown when YAML raises an error (#6139)
* Ensure filename is shown when YAML raises an error

fixes #5423
fixes #5377

* Ensure filename is shown when YAML raises an error

fixes #5423
fixes #5377

* Ensure filename is shown when YAML raises an error

fixes #5423
fixes #5377

* Ensure filename is shown when YAML raises an error

fixes #5423
fixes #5377

* Ensure filename is shown when YAML raises an error

fixes #5423
fixes #5377
2024-01-23 23:11:03 -06:00
Clyde Stubbs
23071e932a Add support for Pico-ResTouch-LCD-3.5 to ili9xxx driver (#6129)
* Working version of Waveshare 3.5 Res Touch driver.

* Default color order BGR
2024-01-24 07:40:16 +11:00
Edward Firmo
4812997429 Nextion TFT upload IDF memory optimization (#6128)
* Nextion TFT upload IDF memory optimization

This optimizes the memory in use for TFT upload when using `esp-idf` framework.

Basically, the engine establishes 3 connections to the the http/https server:
1. Fetch the file size (used to manage chunks and file size)
2. Transfer the 1st chunk (when it evaluates Nextion response to define either to continue from that point or to another point in the file)
3. Transfer the remaining data.

Until now, connection 1 was kept open during the whole process taking aprox 40kb of heap in a esp32dev (NSPanel in my tests) and the same amount of memory was needed to the 2nd and 3rd connections (which never competes to each other).
With this change, each connection is closed and released before opening the next one with a significant reduction on the required heap needed for this transfer.

This can still be improved to use a persistent connection, but I will look at this in the future, so it is not part of this change.

In addition to the better connection management, I've added quite a lot of log (mostly at VERBOSE level), which was used for troubleshooting here.
I was unsure about removing this. As it can be useful for others, I decided to keep it, but I will be fine about removing it if this is now in line with ESPHome best practices.

* clang-format

* Log response length
2024-01-23 01:49:28 -06:00
Keith Burzinski
ec3162282c Merge pull request #6132 from esphome/bump-2023.12.9
2023.12.9
2024-01-22 19:54:22 -06:00
Keith Burzinski
f3997d0f77 Bump version to 2023.12.9 2024-01-22 19:28:12 -06:00
aschmitz
4e5534850c fix: negative temperatures on PMS5003T sensors (#6100) 2024-01-22 19:28:12 -06:00
Samuel Sieb
354314dbf3 fix negative temperature for pmsx003 (#6083)
* fix negative temperature for pmsx003

* Update esphome/components/pmsx003/pmsx003.cpp
2024-01-22 19:28:11 -06:00
Samuel Sieb
2cda6462f3 negative values for all DHT22 variants (#6074)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2024-01-22 19:28:11 -06:00
Samuel Sieb
a6f864a4a3 fix sen5x negative temperature (#6082) 2024-01-22 19:28:11 -06:00
jxl77
c35a21773e Improve temperature precision in BME280 and BMP280 (#6124)
* Update bme280_base.cpp

Change read_temperature to get better precision

  float const temperature = (*t_fine * 5 + 128);
  return temperature / 25600.0f;

* Update bmp280.cpp

increase precision in read_temperature

* Update bmp280.cpp

clang-format correction
2024-01-20 19:57:39 -06:00
Jesse Hills
1821ddd996 Merge pull request #6122 from esphome/bump-2023.12.8
2023.12.8
2024-01-20 04:22:36 +13:00
Jesse Hills
aee702f84f Bump version to 2023.12.8 2024-01-19 23:40:26 +09:00
Jesse Hills
d5fe5b0899 Fix some Voice Assistant bugs (#6121) 2024-01-19 23:40:25 +09:00
guillempages
bd7fe1227c Let show_*_page actions depend on "Display" (#6092)
Instead of forcing a DisplayBuffer, let the display page actions use Displays without buffer.
2024-01-19 23:40:25 +09:00
Jesse Hills
0cbc06a9b9 Fix some Voice Assistant bugs (#6121) 2024-01-20 03:38:37 +13:00
Stefan Rado
2f09624c07 Remove optional<> for pointer types (#6120) 2024-01-20 02:30:57 +13:00
tomaszduda23
6a8da17ea3 OTA 2 which confirm each written chunk (#6066)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-01-19 13:18:06 +09:00
Clyde Stubbs
ed771abc8a Add support for Waveshare EPD 2.13" V3 (#5363)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-01-19 12:10:53 +09:00
alexbuit
6561746f97 add AM2120 device type (#6115) 2024-01-19 11:50:00 +09:00
Clyde Stubbs
1fef769496 Add quad spi features (#5925)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-01-19 11:42:17 +09:00
Clyde Stubbs
2283b3b443 Fix time component for host platform (#6118) 2024-01-19 12:46:55 +11:00
Clyde Stubbs
8267b3274c Enable networking and some other components on host platform (#6114) 2024-01-19 10:10:23 +09:00
dependabot[bot]
6a6a70f1e5 Bump actions/cache from 3.3.2 to 4.0.0 (#6110)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-19 10:08:29 +09:00
dependabot[bot]
ea9de45d16 Bump platformio from 6.1.11 to 6.1.13 (#6086)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-01-19 10:07:50 +09:00
kahrendt
045836c3fe Add combination sensor and remove absorbed kalman_combinator component (#5438) 2024-01-18 18:09:49 +09:00
pofilo (vmerat)
45c0d10eb0 Fixes Waveshare 7.5in B V2 and V3 (#6079) 2024-01-18 16:35:20 +09:00
Rene Guca
e2f2feafdd WiFi fast_connect: save/load BSSID and channel for faster connect from sleep (#5931) 2024-01-18 16:30:58 +09:00
Fabian
c6f528583b Proposal: Test yaml for each component (#5398)
* Test for each component.

* When possible use commandline substitution.

* Add wildcard support.

* end file with new line.

* Move component tests into subfolder.

* Add component test to pipeline.

* Remove trailing whitespace.

* add restore python step.

* Add `. venv/bin/activate` to pipeline.

* step `changed-components` needs `common` step.

* start `list-components-changed.py` different.

* iterate on pipeline stage `list-components`.

* Update `checkout` action.

* Rename test folder from `tests` to `_test`.

* validate file exists.

* Move component test folder.

* extend list-components to include child components.

* File does not end with a newline

* Handle empty list-components matrix.

* list-components also check for changes in tests folder.

* Improve `list-components.py`.

* `*` is a forbidden character for filenames on windows.

---------

Co-authored-by: Your Name <you@example.com>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2024-01-18 01:13:40 -06:00
Benoît Leforestier
c9c8d39778 Add support of Honeywell HumidIcon (I2C HIH series) Temperature & Humidity sensor (#5730) 2024-01-18 09:56:56 +09:00
mathieu-mp
39bd829236 Fix color observation for triangle outline in display component (#6107) 2024-01-18 08:40:30 +09:00
h2zero
e731a2ffaa Add support X.509 client certificates for MQTT. (#5778)
Co-authored-by: h2zero <powellperalata@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-01-18 08:26:56 +09:00
Jesse Hills
b606e976e1 CV: tidy up Schema wrapper (#6105) 2024-01-17 01:28:46 -06:00
Keith Burzinski
0cd232cdf5 Add support for VEML3235 lux sensor (#5959)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-01-17 15:50:53 +09:00
Jesse Hills
7dced7f55d Merge pull request #6104 from esphome/bump-2023.12.7
2023.12.7
2024-01-17 13:24:00 +13:00
Jesse Hills
36de644065 Bump version to 2023.12.7 2024-01-17 08:27:03 +09:00
Clyde Stubbs
95292dbba1 Inkplate6: Fix crash with initial set of greyscale (#6038) 2024-01-17 08:27:03 +09:00
Jesse Hills
86c9546362 Create RingBuffer for VoiceAssistant (#6102) 2024-01-17 08:27:03 +09:00
Piotr Majkrzak
f37a812e59 Fix RMT timing clock base (#6101) 2024-01-17 08:27:03 +09:00
Clyde Stubbs
596943b683 Inkplate6: Fix crash with initial set of greyscale (#6038) 2024-01-17 08:23:36 +09:00
Clyde Stubbs
3854203037 Socket: Add recvfrom method to receive UDP with source address. (#6103) 2024-01-17 08:12:31 +09:00
Jesse Hills
21337ffc67 Create RingBuffer for VoiceAssistant (#6102) 2024-01-16 17:37:57 +09:00
Piotr Majkrzak
ea03058ace Fix RMT timing clock base (#6101) 2024-01-16 17:10:44 +09:00
Keith Burzinski
e35cab018a Add NFC binary sensor platform (#6068) 2024-01-16 17:05:13 +09:00
Samuel Sieb
26acbbedbf Add continuous option to the graph (#6093)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2024-01-16 16:44:12 +09:00
alexborro
249cd67588 Fingerprint_grow: Trigger on finger scan start and on finger scan misplaced (#6003) 2024-01-16 16:38:19 +09:00
mathieu-mp
72ab1700e7 Add triangle shapes to display component (#6096) 2024-01-16 15:38:09 +09:00
aschmitz
87cab92af6 fix: negative temperatures on PMS5003T sensors (#6100) 2024-01-14 23:08:19 -08:00
NP v/d Spek
412c999f14 Revert "add Pico-ResTouch-LCD-3.5" (#6098) 2024-01-15 17:41:01 +11:00
NP v/d Spek
8cd1798674 add Pico-ResTouch-LCD-3.5 (#6078) 2024-01-15 11:09:35 +09:00
NP v/d Spek
e39099137d update script/setup so it works fine on windows (#6087) 2024-01-15 11:08:10 +09:00
NP v/d Spek
83baa24022 Use touch state from ft63x6 driver. (#6055)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-01-15 11:07:06 +09:00
Jesse Hills
78a6509fb1 Merge pull request #6097 from esphome/bump-2023.12.6
2023.12.6
2024-01-15 13:06:58 +13:00
Samuel Sieb
8b2d76e8ce convert cse7766 to non-polling (#6095)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2024-01-15 09:05:47 +09:00
Pieter Frenssen
dd2dca4d08 Bump pillow to 10.2.0. (#6091) 2024-01-15 08:48:02 +09:00
Jesse Hills
534c14e313 Bump version to 2023.12.6 2024-01-15 08:25:48 +09:00
J. Nick Koston
3fec8f9b53 Fallback to pure-python loader for better error when YAML loading fails (#6081) 2024-01-15 08:25:41 +09:00
tomaszduda23
b8b6462844 add STATE_CLASS_TOTAL_INCREASING to bl0940 and bl0942 (#6090) 2024-01-15 08:23:56 +09:00
Keith Burzinski
59e7c52341 Improv Serial -- don't wait for incoming bytes (#6089) 2024-01-15 08:23:55 +09:00
Keith Burzinski
ff7de4c971 ESP32-C3 USB_CDC fixes (#6069) 2024-01-15 08:23:55 +09:00
Robert Paskowitz
978a676c7c Support full (>460 char) dumps of Pronto IR commands (#6040)
Co-authored-by: Rob Paskowitz <rob@paskowitz.ca>
2024-01-15 08:23:55 +09:00
functionpointer
33051906bd pylontech: Fix parsing error with US2000 (#6061) 2024-01-15 08:23:55 +09:00
tomaszduda23
da56d333dc fix compilation error for libretiny (#6064) 2024-01-15 08:23:55 +09:00
J. Nick Koston
48a4e6bae9 Fix device not requesting Home Assistant time at the update interval (#6022) 2024-01-15 08:23:55 +09:00
J. Nick Koston
5220c9edf8 Fallback to pure-python loader for better error when YAML loading fails (#6081) 2024-01-15 08:06:13 +09:00
tomaszduda23
f567b5d28b add STATE_CLASS_TOTAL_INCREASING to bl0940 and bl0942 (#6090) 2024-01-15 08:01:20 +09:00
guillempages
8e83c7dd19 Let show_*_page actions depend on "Display" (#6092)
Instead of forcing a DisplayBuffer, let the display page actions use Displays without buffer.
2024-01-14 08:01:32 +11:00
Keith Burzinski
d551a2eba2 Improv Serial -- don't wait for incoming bytes (#6089) 2024-01-13 08:21:28 +00:00
Samuel Sieb
ed2ab9e962 fix negative temperature for pmsx003 (#6083)
* fix negative temperature for pmsx003

* Update esphome/components/pmsx003/pmsx003.cpp
2024-01-12 09:47:50 +00:00
Samuel Sieb
aa04a3caaf negative values for all DHT22 variants (#6074)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2024-01-12 03:20:08 -06:00
Samuel Sieb
343a8c063e fix sen5x negative temperature (#6082) 2024-01-12 09:11:42 +00:00
mrtoy-me
4cc17dac0d hydreon_rgxx - fix missing cg.add(var.set_model(...)) (#6065) 2024-01-11 15:18:22 +09:00
Simone Rossetto
d616025fed Actions to enable and disable WireGuard connection (#5690) 2024-01-11 14:09:42 +09:00
Keith Burzinski
082d9fcf0e ESP32-C3 USB_CDC fixes (#6069) 2024-01-11 08:05:34 +09:00
Andrey Bodrov
4b783c0372 BME280 SPI (#5538)
* bme spi finally

* linter

* CO

* tidy

* lint

* tidy [2]

* tidy[-1]

* final solution

* Update test1.yaml

remove failed test

* Update test1.1.yaml

add test to another file with free GPIO5 pin

* fix spi read bytes

* fix tests

* rename bme280 to bme280_i2c
2024-01-09 22:31:38 -06:00
J. Nick Koston
fcd549e5b6 Run python tests on windows and macos (#6010)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2024-01-09 12:18:13 +09:00
dependabot[bot]
aa8a533da6 Bump black from 23.12.0 to 23.12.1 (#6018) 2024-01-08 16:12:08 -10:00
dependabot[bot]
97be209aec Bump pytest-asyncio from 0.23.2 to 0.23.3 (#6047) 2024-01-08 16:11:48 -10:00
J. Nick Koston
6dfdcff66c dashboard: refactor ping implementation to be more efficient (#6002) 2024-01-09 10:35:43 +09:00
dependabot[bot]
87301a2e76 Bump pytest from 7.4.3 to 7.4.4 (#6046)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 15:33:50 -10:00
J. Nick Koston
2be19c4e45 Bump recommended ESP32 IDF to 4.4.6 (#6048) 2024-01-09 10:13:18 +09:00
J. Nick Koston
d9def0cb3a Bump hypothesis to 6.92.1 (#6011) 2024-01-09 10:08:50 +09:00
Clyde Stubbs
65e6f9cba9 Add getter for image data_start (#6036) 2024-01-09 10:07:45 +09:00
Dusan Cervenka
79d00ec913 Extend i2s config options (#6056) 2024-01-09 10:07:21 +09:00
Edward Firmo
869cdf122d Nextion draw QR code at runtime (#6027) 2024-01-09 09:47:48 +09:00
Edward Firmo
2bb5343d27 Extends UART change at runtime to ESP8266 (#6019) 2024-01-09 09:45:46 +09:00
Robert Paskowitz
e3d146ee44 Support full (>460 char) dumps of Pronto IR commands (#6040)
Co-authored-by: Rob Paskowitz <rob@paskowitz.ca>
2024-01-09 09:44:08 +09:00
Edward Firmo
6061699eff Nextion enable upload from https when using esp-idf (#6051) 2024-01-09 09:41:34 +09:00
dependabot[bot]
886d1a2d00 Bump flake8 from 6.1.0 to 7.0.0 (#6058)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-09 09:38:50 +09:00
functionpointer
9bdb9dc1a3 pylontech: fix voltage_low and voltage_high wrong unit (#6060)
Co-authored-by: だから <82636574+Dackara@users.noreply.github.com>
2024-01-09 08:30:37 +09:00
functionpointer
696bfe6a87 pylontech: Fix parsing error with US2000 (#6061) 2024-01-09 08:26:13 +09:00
Ruben van Dijk
14bffaf8a7 Add questionmark to default glyphs. (#6053) 2024-01-09 08:12:28 +09:00
tomaszduda23
4202fe65b5 fix compilation error for libretiny (#6064) 2024-01-09 08:05:52 +09:00
Samuel Sieb
fdd54d74a3 Don't crash with invalid adc pin (#6059)
* Don't crash with invalid adc pin

* lint
2024-01-07 21:39:53 -06:00
Clyde Stubbs
a2e152ad12 clang-format and clang-tidy scripts: More robust algorithm to find correct executable (#6041)
* More robust algorithm to find correct executable

* Revise message wording

* Add clang-tidy and clang-format to requirements.txt.
Add to message explaining install process.

* Extracted get_binary to helpers.py. Use execptions for clean exit.

* Add parameter types

* clang-{tidy,format} in requirements_test.txt
clean up script exit

* Kill processes on ^C

* Move clang-tidy and clang-format into requirements_dev.txt
2024-01-02 23:00:52 -06:00
Clyde Stubbs
ae52164d9c Display: Introduce draw_pixels_at() method for fast block display rendering (#6034)
* Introduce `draw_pixels_at()` method for fast block display rendering

* Add check for 18 vs 16 bit display.
2024-01-01 17:34:40 -06:00
Clyde Stubbs
773cd0f414 GT911 touchscreen: Fix bug causing touch button release to fail (#6042)
* Fix bug causing gt911 touch button release to fail

* Cache button state and report changes only
2023-12-31 04:01:16 -06:00
Pavlo Dudnytskyi
2a43e55452 HaierProtocol library updated to 0.9.25 to fix the answer_timeout bug (#6015) 2023-12-29 13:08:26 -08:00
Clyde Stubbs
5ebb68f4ff Ble client additions and fixes (#5277)
* Add config to disable auto-connect of BLE client.
Correct initialise MAC address of BLE client.

* Checkpont

* Fixes for automation progress.

* Fixes for automation progress.

* Checkpoint;
fix notify for ble_client

* Fix BLE client binary_output

* Various fixes

* Consider notifications on when receiving REG_FOR event.

* Add testing branch to workflow

* Add workflow

* CI changes

* CI changes

* CI clang

* CI changes

* CI changes

* Add comment about logging macros

* Add test, sanitise comment

* Revert testing change to ci config

* Update codeowners

* Revert ci config change

* Fix some state changes

* Add default case.

* Minor fixes

* Add auto-connect to logconfig
2023-12-29 01:35:44 -06:00
Edward Firmo
d3567f9ac6 Nextion queue size (#6029)
* Nextion `queue_size` function

Returns the size of Nextion queue.
For troubleshooting only.

* Move `queue_size` to `nextion.h`

This is where the queue is

* Inline doc

* clang-format
2023-12-28 23:15:06 -06:00
Clyde Stubbs
21ec42f495 Add constants used by multiple display drivers to global const.py (#6033)
* Add constants used by multiple display drivers to global const.py

* Add further constants

* Refactor st7789v and st7735v
2023-12-29 02:00:19 +00:00
J. Nick Koston
d4d49e38fc Fix device not requesting Home Assistant time at the update interval (#6022) 2023-12-28 14:51:00 +11:00
Anton Viktorov
3be97868fc Support for ST7567 display 128x64 (I2C, SPI) (#5952) 2023-12-27 12:01:15 +11:00
Jesse Hills
41dc73d228 Merge pull request #6017 from esphome/bump-2023.12.5
2023.12.5
2023-12-26 02:44:59 +13:00
Jesse Hills
6ceefe08ab Bump version to 2023.12.5 2023-12-25 22:24:13 +09:00
J. Nick Koston
21e5806a73 Fix docker builds (#6012) 2023-12-25 22:24:13 +09:00
Jesse Hills
4fd79fee2c Merge pull request #6016 from esphome/bump-2023.12.4
2023.12.4
2023-12-26 01:45:41 +13:00
Jesse Hills
4c8c4a2579 Bump version to 2023.12.4 2023-12-25 21:14:55 +09:00
NP v/d Spek
b68420b2cc Display: fix class inherence in Python script (#6009) 2023-12-25 21:14:55 +09:00
J. Nick Koston
7bce999bba dashboard: Fix file writes on Windows (#6013) 2023-12-25 21:14:55 +09:00
NP v/d Spek
dc0cc0b431 tt21100: restore init read (#6008) 2023-12-25 21:14:55 +09:00
J. Nick Koston
0990d0812e dashboard: Only ping when polling is active (#6001)
fixes https://github.com/esphome/issues/issues/5257
2023-12-25 21:14:55 +09:00
Fabian
93ac765425 [Touchscreen] Add expire of touch record. (#5986)
* Add expire of touch record.

* Implement suggested changes.

* Alternative implementation to detect touch release.

* add `cancel_timeout`.

* Add touch timeout as configurable element.

---------

Co-authored-by: Your Name <you@example.com>
2023-12-25 06:16:53 +11:00
NP v/d Spek
46fc37b691 Display: fix class inherence in Python script (#6009) 2023-12-24 22:58:27 +09:00
J. Nick Koston
de6fc6b1dd Fix docker builds (#6012) 2023-12-24 22:57:15 +09:00
J. Nick Koston
fe15d993f9 dashboard: Fix file writes on Windows (#6013) 2023-12-24 22:56:31 +09:00
NP v/d Spek
6583026e14 tt21100: restore init read (#6008) 2023-12-24 22:54:53 +09:00
Attila Farago
8e674990b0 web_server support for home assistant like styling (#5854)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-24 03:17:00 +13:00
J. Nick Koston
a97fc4f758 dashboard: Only ping when polling is active (#6001)
fixes https://github.com/esphome/issues/issues/5257
2023-12-23 14:43:17 +13:00
Jesse Hills
35388cf2a2 Merge pull request #5994 from esphome/bump-2023.12.3
2023.12.3
2023-12-22 21:42:41 +13:00
Jesse Hills
417e37d291 Bump version to 2023.12.3 2023-12-22 17:12:42 +09:00
Jesse Hills
7dc35a1029 Fix broken configs with non-existent components (#5993) 2023-12-22 17:12:42 +09:00
J. Nick Koston
9202a30dc7 Fix dashboard logs when api is disabled and using MQTT (#5992) 2023-12-22 17:12:42 +09:00
matzman666
45f9f3d972 Improved sensor readings in htu21d component. (#5839) 2023-12-22 17:12:42 +09:00
Jesse Hills
46310ff223 Regenerate api_pb2 after manual changes were added incorrectly in #5732 (#5990) 2023-12-22 17:12:42 +09:00
J. Nick Koston
f5c99d1647 Fix unexpected disconnects when outgoing buffer is full during keepalive (#5988) 2023-12-22 17:12:42 +09:00
Jesse Hills
46c4c61b40 Fix broken configs with non-existent components (#5993) 2023-12-22 21:10:35 +13:00
J. Nick Koston
46255ad4df Fix dashboard logs when api is disabled and using MQTT (#5992) 2023-12-22 16:35:31 +09:00
Jesse Hills
d2d0058386 Lint the script folder files (#5991) 2023-12-22 16:03:47 +09:00
matzman666
676ae6b26e Improved sensor readings in htu21d component. (#5839) 2023-12-22 15:58:17 +09:00
Jesse Hills
bd6fa29f77 Regenerate api_pb2 after manual changes were added incorrectly in #5732 (#5990) 2023-12-22 14:29:10 +09:00
J. Nick Koston
4fb7e945f8 Fix unexpected disconnects when outgoing buffer is full during keepalive (#5988) 2023-12-22 11:59:24 +09:00
Jesse Hills
9b72a3a584 Merge pull request #5989 from esphome/bump-2023.12.2
2023.12.2
2023-12-22 15:57:09 +13:00
Scott K Logan
3de5b26d77 Add a Binary Sensor Filter for state settling (#5900) 2023-12-22 11:33:29 +09:00
Jesse Hills
19e5a4a81a Bump version to 2023.12.2 2023-12-22 11:04:00 +09:00
Jessica Hamilton
8e13c3e1b0 web_server.py: return empty content when file doesn't exist (#5980)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-22 11:04:00 +09:00
Keith Burzinski
4f8e3211bf Add workaround for crash in Arduino 2.0.9 when CDC is configured (#5987) 2023-12-22 11:04:00 +09:00
davidmonro
872519f7f6 Override GPIOs 12 and 13 on the airm2m (LuatOS) board (#5982)
Co-authored-by: David Monro <david.monro@anu.edu.au>
2023-12-22 11:04:00 +09:00
CVan
2a69a49061 Update libtiff6 (#5985) 2023-12-22 11:04:00 +09:00
Clyde Stubbs
1a8e7854c7 ESP32-S3 and ESP-IDF don't play well with USB_CDC and need USB_SERIAL_JTAG (#5929)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-12-22 11:04:00 +09:00
Jessica Hamilton
70fdc3c3f8 web_server.py: return empty content when file doesn't exist (#5980)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-22 10:58:30 +09:00
Keith Burzinski
059e4cee58 Add workaround for crash in Arduino 2.0.9 when CDC is configured (#5987) 2023-12-22 10:42:12 +09:00
marshn
513a02ce11 Add Keeloq RF protocol (#5511) 2023-12-22 09:30:23 +09:00
davidmonro
31448a4fcd Override GPIOs 12 and 13 on the airm2m (LuatOS) board (#5982)
Co-authored-by: David Monro <david.monro@anu.edu.au>
2023-12-22 07:57:12 +09:00
CVan
0a779a9299 Update libtiff6 (#5985) 2023-12-22 07:55:10 +09:00
Jesse Hills
6d3c7f035d Merge pull request #5984 from esphome/bump-2023.12.1
2023.12.1
2023-12-22 04:02:39 +13:00
Jesse Hills
00ab17cb8e Bump version to 2023.12.1 2023-12-21 23:33:35 +09:00
Jesse Hills
2ee01e22cd Fix replaced - in allowed characters during object_id sanitizing (#5983) 2023-12-21 23:33:35 +09:00
Jesse Hills
442820deaf Fix replaced - in allowed characters during object_id sanitizing (#5983) 2023-12-22 03:28:25 +13:00
Edward Firmo
5e2df0b6a2 Nextion allow underscore on names (#5979) 2023-12-21 02:34:33 -06:00
kahrendt
74281b93c4 Reduce memory usage with StringRef in MQTT Components (#5719) 2023-12-21 16:19:15 +09:00
marshn
222bb9b495 Improvements to RF receiver for Drayton Digistat heating controller (#5504) 2023-12-21 16:17:01 +09:00
Wojciech Banaś
d73ad39aed Bug: Unwanted change resistance in x9c component (#5483)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-21 07:03:57 +00:00
sbrudenell
f096f107e2 support default pins for adafruit esp32 feather v2 (#5482) 2023-12-21 15:13:54 +09:00
Steve Rodgers
223e6e8f13 Alarm panel: Add changes to support enhanced features (#5671)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-21 14:10:47 +09:00
Ruben van Dijk
04b3547992 (fingerprint_grow) Added on_finger_scan_invalid automation. (#5885) 2023-12-21 13:39:55 +09:00
mrtoy-me
a784f1e691 Add Waveshare 1.47in 172x320 to ST7789v component (#5884) 2023-12-21 13:38:11 +09:00
Jesse Hills
c92715e403 Fix pin reuse in test1 (#5978) 2023-12-21 13:37:02 +09:00
Fabian Pflug
c305f61020 Add support for waveshare 2.9in B V3 version (#5902)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-21 13:36:43 +09:00
Fabian Pflug
784dff7574 Add waveshare 2.7in V2 model (#5903) 2023-12-21 13:30:10 +09:00
William Heimbigner
2a1d16f17b PMSx003 add relevant device and state classes to default config (#5633) 2023-12-21 12:55:34 +09:00
Chris AtLee
937a9c96ce Allow haier remote protocol to use lambdas (#5898) 2023-12-21 09:11:32 +09:00
Pavlo Dudnytskyi
b5932940ee Added alarm processing for Haier component (hOn protocol) (#5965) 2023-12-21 09:10:46 +09:00
Matthew Campbell
c6a37da9da Add gradient option to addressable color wipe effect (#5689) 2023-12-21 09:08:44 +09:00
mknjc
3c2383e261 Add default substitutions for package includes (#5752) 2023-12-21 09:08:13 +09:00
Branden Cash
991880d53f feat: add AS5600 component/sensor (#5174)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-21 09:07:40 +09:00
Jesse Hills
26277e4ba2 Merge branch 'release' into dev 2023-12-21 09:05:42 +09:00
Jesse Hills
cfa5e5c5a9 Merge pull request #5977 from esphome/bump-2023.12.0
2023.12.0
2023-12-21 08:47:53 +09:00
Jesse Hills
8675955614 Bump version to 2023.12.0 2023-12-21 08:09:10 +09:00
Jesse Hills
816dcdf24f Merge pull request #5975 from esphome/bump-2023.12.0b6
2023.12.0b6
2023-12-21 07:56:11 +09:00
Jesse Hills
bec1ad9396 Bump version to 2023.12.0b6 2023-12-20 20:59:46 +09:00
Jesse Hills
6a9e85438f Fix pin reuse error with pin expanders (#5973)
Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
2023-12-20 20:59:46 +09:00
Kamil Trzciński
ab25e32509 image: allow the image to by auto-loaded by animation (#5139) 2023-12-20 20:59:46 +09:00
Yorick Smilda
23ceddafed Add ability to lock to set mode (#5924) 2023-12-20 04:52:46 -06:00
Jesse Hills
84174aeb80 Fix pin reuse error with pin expanders (#5973)
Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
2023-12-20 10:42:27 +00:00
Kamil Trzciński
d582cfa30a image: allow the image to by auto-loaded by animation (#5139) 2023-12-20 10:33:05 +00:00
Jesse Hills
2ccf985de5 Merge pull request #5972 from esphome/bump-2023.12.0b5
2023.12.0b5
2023-12-20 14:17:31 +09:00
Jesse Hills
a64e96e7ad Bump version to 2023.12.0b5 2023-12-20 13:43:43 +09:00
NP v/d Spek
fbf3d03a33 rename set_raw_touch_position_ to add_raw_touch_position_ (#5962) 2023-12-20 13:43:43 +09:00
Jesse Hills
7b2b6aaeb1 Merge pull request #5971 from esphome/bump-2023.12.0b4
2023.12.0b4
2023-12-20 10:49:42 +09:00
Jesse Hills
e2a00f66b8 Bump version to 2023.12.0b4 2023-12-20 09:59:58 +09:00
J. Nick Koston
1b3068a409 Bump aioesphomeapi to 21.0.1 (#5969) 2023-12-20 09:59:52 +09:00
J. Nick Koston
e5414d70f5 Speed up writing protobuf strings/bytes (#5828) 2023-12-20 09:57:37 +09:00
mathieu-mp
977e0184a7 Add deep sleep between updates for waveshare epaper 1.54in and 1.54inv2 (#5961) 2023-12-20 09:57:37 +09:00
Jean Louis-Guerin
820f328248 Fix I2CBus::write() bug and add i2c documentation (#5947) 2023-12-20 09:57:37 +09:00
Keith Burzinski
7807f0d892 Fix build issue with UART component when building with Arduino and CDC (#5964) 2023-12-20 09:57:37 +09:00
J. Nick Koston
16798bbfb4 Bump aioesphomeapi to 21.0.1 (#5969) 2023-12-20 08:41:26 +09:00
dependabot[bot]
efda2033f7 Bump zeroconf from 0.130.0 to 0.131.0 (#5967)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-19 20:16:10 +00:00
J. Nick Koston
cd06dc77ee Speed up writing protobuf strings/bytes (#5828) 2023-12-19 14:24:48 +09:00
mathieu-mp
52b9668170 Add deep sleep between updates for waveshare epaper 1.54in and 1.54inv2 (#5961) 2023-12-19 12:29:00 +09:00
Jean Louis-Guerin
0a117eb562 Fix I2CBus::write() bug and add i2c documentation (#5947) 2023-12-19 08:14:42 +09:00
Keith Burzinski
3ea5054cf2 Fix build issue with UART component when building with Arduino and CDC (#5964) 2023-12-19 08:11:07 +09:00
NP v/d Spek
8961e8ab32 rename set_raw_touch_position_ to add_raw_touch_position_ (#5962) 2023-12-19 06:23:22 +11:00
Jesse Hills
b59666c512 Merge pull request #5958 from esphome/bump-2023.12.0b3
2023.12.0b3
2023-12-18 17:32:02 +09:00
Jesse Hills
dbfa77cb4b Bump version to 2023.12.0b3 2023-12-18 16:51:11 +09:00
Keith Burzinski
ab22a3da34 Use the correct UART/Serial when CDC is enabled (#5957) 2023-12-18 16:51:11 +09:00
Jean Louis-Guerin
eefa1cd3ab Revert pure virtual functions in UART component from #5920 (#5932)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-18 16:51:10 +09:00
dentra
d0df73769d web_server_idf: fix call with hardcoded http code (#5942) 2023-12-18 16:51:10 +09:00
Alex Hermann
e8ce780482 esp32_camera: Set framebuffer task prio to 1 (#5943) 2023-12-18 16:51:10 +09:00
Alex Hermann
168e704130 i2s_audio: Set player_task's prio to 1 (#5945) 2023-12-18 16:51:10 +09:00
Grant Le Roux
2309f15ce0 Fix - Tuya Fan - Allow integer speed datapoint (#5948)
Co-authored-by: Cram42 <5396871+cram42@users.noreply.github.com>
2023-12-18 16:51:10 +09:00
Edward Firmo
917e0f93ed UARTComponent inline doc (#5930) 2023-12-18 16:51:10 +09:00
dependabot[bot]
70dac54113 Bump zeroconf from 0.128.4 to 0.130.0 (#5950)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 16:51:10 +09:00
Keith Burzinski
d99598bba6 Use the correct UART/Serial when CDC is enabled (#5957) 2023-12-18 07:33:12 +00:00
Jesse Hills
bf258230cd Revert "Bump actions/download-artifact from 3.0.2 to 4.0.0" (#5956) 2023-12-18 15:29:24 +09:00
Jesse Hills
89c6f3d45d Revert "Bump build-image action versions" (#5955) 2023-12-18 19:27:26 +13:00
Jesse Hills
0f4d7dadb3 Bump build-image action versions (#5954) 2023-12-18 13:32:18 +09:00
dependabot[bot]
323f8c9bdb Bump actions/download-artifact from 3.0.2 to 4.0.0 (#5936)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3.0.2 to 4.0.0.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3.0.2...v4.0.0)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 12:30:50 +09:00
dependabot[bot]
2060d1ac89 Bump esptool from 4.6.2 to 4.7.0 (#5935)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-18 12:30:27 +09:00
Jean Louis-Guerin
1d37edb63c Revert pure virtual functions in UART component from #5920 (#5932)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-18 00:03:01 +00:00
dentra
29fb2a5360 web_server_idf: fix call with hardcoded http code (#5942) 2023-12-18 09:01:21 +09:00
Alex Hermann
8653972cb8 esp32_camera: Set framebuffer task prio to 1 (#5943) 2023-12-18 09:00:42 +09:00
Alex Hermann
8a23b7e0c8 i2s_audio: Set player_task's prio to 1 (#5945) 2023-12-18 08:58:13 +09:00
Grant Le Roux
003d8b0cf5 Fix - Tuya Fan - Allow integer speed datapoint (#5948)
Co-authored-by: Cram42 <5396871+cram42@users.noreply.github.com>
2023-12-18 08:28:48 +09:00
Edward Firmo
94904f44f9 UARTComponent inline doc (#5930) 2023-12-18 08:19:30 +09:00
dependabot[bot]
ea4e618f2a Bump zeroconf from 0.128.4 to 0.130.0 (#5950)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-17 16:27:08 +00:00
Jesse Hills
2270c3050e Merge pull request #5940 from esphome/bump-2023.12.0b2
2023.12.0b2
2023-12-15 15:26:30 +09:00
Jesse Hills
514db8b26e Bump version to 2023.12.0b2 2023-12-15 15:02:47 +09:00
mrtoy-me
e030c0fc45 Update ENS160 TVOC device_class and AQI units to match required by HA (#5939) 2023-12-15 15:02:46 +09:00
Jesse Hills
6b5eb7e656 Fix SplitDefault with variants (#5928) 2023-12-15 15:02:46 +09:00
jochenvg
f28cf9348e Support toggle action for template cover (#5917) 2023-12-15 15:02:46 +09:00
Fabian
3e475c21ff [Logger] ESP32 S3 serial logger (#4853)
* Add support for ESP32 S3 logger.

* fix default

* Remove cpp & h changes to combine with PR #4658

* Not enough attention to details.

* Add build flag

* Validation fix

* Fix validation for real this time

---------

Co-authored-by: Your Name <you@example.com>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-12-15 15:02:46 +09:00
Jesse Hills
3c3ac92038 Allow use of CDC/JTAG loggers on esp32 variants with Arduino (#4658)
* Allow use of CDC/JTAG loggers on esp32 variants with Arduino

* Only on s2/s3

* Separate C3 from S2/S3

* C code builds & runs correctly, still needs work though

* Works on S2

* It works!

* Remove unnecessary header

---------

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-12-15 15:02:46 +09:00
mrtoy-me
836a3db163 Update ENS160 TVOC device_class and AQI units to match required by HA (#5939) 2023-12-15 14:39:05 +09:00
Clyde Stubbs
300343ae24 ESP32-S3 and ESP-IDF don't play well with USB_CDC and need USB_SERIAL_JTAG (#5929)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-12-15 11:24:52 +11:00
Jesse Hills
0a188ad9d2 Fix SplitDefault with variants (#5928) 2023-12-14 02:33:04 -06:00
jochenvg
a3cc551856 Support toggle action for template cover (#5917) 2023-12-14 14:01:01 +09:00
Fabian
8c37066ed9 [Logger] ESP32 S3 serial logger (#4853)
* Add support for ESP32 S3 logger.

* fix default

* Remove cpp & h changes to combine with PR #4658

* Not enough attention to details.

* Add build flag

* Validation fix

* Fix validation for real this time

---------

Co-authored-by: Your Name <you@example.com>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-12-13 22:47:31 -06:00
Jesse Hills
777cdb1c21 Allow use of CDC/JTAG loggers on esp32 variants with Arduino (#4658)
* Allow use of CDC/JTAG loggers on esp32 variants with Arduino

* Only on s2/s3

* Separate C3 from S2/S3

* C code builds & runs correctly, still needs work though

* Works on S2

* It works!

* Remove unnecessary header

---------

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-12-13 22:24:16 -06:00
Jesse Hills
cc5611bd89 Merge pull request #5923 from esphome/bump-2023.12.0b1
2023.12.0b1
2023-12-14 09:00:48 +09:00
Jesse Hills
9f27eadaee Bump version to 2024.1.0-dev 2023-12-14 08:30:45 +09:00
Jesse Hills
8cc44766e6 Bump version to 2023.12.0b1 2023-12-14 08:30:45 +09:00
Jesse Hills
5ab2c74519 Merge branch 'dev' into bump-2023.12.0b1 2023-12-14 08:30:45 +09:00
Keith Burzinski
76a6e288b6 Add support for PN7150 (#5487)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-14 08:27:35 +09:00
Keith Burzinski
6fd239362d Add support for PN7160 (#5486) 2023-12-14 07:54:55 +09:00
Edward Firmo
81aa48a5f3 Exposes load_settings to UARTComponent class (#5920) 2023-12-14 07:45:08 +09:00
Jacob Masen-Smith
9a8bc9484d Fix the initial run of lambda light effects (#5921)
The timer used for `millis()` is a monotonic timer based on the last
start time of the device. If, for some reason, you pick a long
`update_interval` and try to apply it as soon as you start the device,
nothing happens because the device hasn't been on for longer than the
`update_interval`
2023-12-13 14:33:24 -06:00
dependabot[bot]
f355972c9d Bump aioesphomeapi from 20.1.0 to 21.0.0 (#5922)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-13 09:57:50 -10:00
Edward Firmo
9daaadb3b6 UART change at runtime (#5909)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-13 20:29:05 +13:00
Jesse Hills
058c43e953 Copy esp32 custom partition files to build folder (#5919) 2023-12-13 02:51:07 +00:00
Jesse Hills
f1f8689462 Fix typo added in esp32 post_build filename (#5918) 2023-12-13 02:47:46 +00:00
Jesse Hills
2fcc5b3ef2 Remove lingering note (#5916) 2023-12-13 10:46:11 +09:00
Stefan Rado
6c7a133faa Add humidity support to climate (#5732)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-13 10:23:02 +09:00
Cossid
a72725f4b4 BP1658CJ - Fix timing for all platforms, now consistent with other drivers (#5799) 2023-12-13 09:04:17 +09:00
Nicolas Gilles
d0bcba3b3f ir_transmitter: add support for repeated commands in NEC protocol (#4995)
Co-authored-by: Nicolas Gilles <nicolas.gilles@aiven.io>
2023-12-13 08:55:20 +09:00
Mathias Pihl
69026f7599 Remove setpoint-change from error when calculating derivative in pid controller (#4737)
Co-authored-by: Mathias Pihl <mapih@frode-laursen.com>
2023-12-13 08:50:55 +09:00
J. Nick Koston
8789925fe8 Bump aioesphomeapi to 20.1.0 (#5914) 2023-12-13 08:48:14 +09:00
Clyde Stubbs
29002c8f45 Fix crash when handling pin_check error (#5915) 2023-12-13 08:38:37 +09:00
Theo Hussey
03baaa94a8 Fix AHT10 / AHT20 communication (#5198)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-13 08:28:59 +09:00
Thomas Bræmer
259a6d52e1 A02yyuw (#5729) 2023-12-13 08:26:08 +09:00
NP v/d Spek
c6dc336c4a Updating the touchscreen interface structure (#4596)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: NP v/d Spek <github_mail@lumensoft.nl>
Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
Co-authored-by: Gustavo Ambrozio <gustavo@gustavo.eng.br>
2023-12-12 22:56:01 +00:00
dependabot[bot]
8e92bb7958 Bump black from 23.11.0 to 23.12.0 (#5912)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-12 21:59:10 +00:00
dependabot[bot]
04720b8440 Bump aioesphomeapi from 19.3.0 to 20.0.0 (#5911)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-12 09:39:29 -10:00
Çetin Koca
cc7d167e8b Fix uninitialized climate target temperature (#5795) 2023-12-12 14:17:56 +09:00
Tucker Kern
ad79e4fe24 Add support for fan preset modes (#5694)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-12 14:13:26 +09:00
dependabot[bot]
47665164e8 Bump dessant/lock-threads from 4.0.1 to 5.0.1 (#5820)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-12 13:52:05 +09:00
dependabot[bot]
d0dd0e38db Bump frenck/action-yamllint from 1.4.1 to 1.4.2 (#5716)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-12 13:51:36 +09:00
dependabot[bot]
0117de5b78 Bump pylint from 3.0.2 to 3.0.3 (#5905)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-12 13:51:22 +09:00
dependabot[bot]
7fb10547ed Bump actions/stale from 8.0.0 to 9.0.0 (#5899)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-12 13:51:07 +09:00
Evgeny
39d026299e Added on_image callback to ESP32 Cam (#4860) 2023-12-12 13:48:21 +09:00
Michael Davidson
b30430b0bd Add graphical display menu (#4105)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Alex Hermann <gaaf@gmx.net>
2023-12-12 12:15:59 +09:00
Clemens
86e6a8a503 fix RGBW Mode on RP2040 (#5907) 2023-12-12 12:28:16 +13:00
Clyde Stubbs
b62c099d54 Fix 18 bit displays. (#5908) 2023-12-12 12:22:41 +13:00
dependabot[bot]
0906559afe Bump zeroconf from 0.128.0 to 0.128.4 (#5906)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 19:38:55 +00:00
dependabot[bot]
a6f1701902 Bump actions/setup-python from 4.7.1 to 5.0.0 (#5896)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-07 01:08:50 +00:00
mtl010957
51428dcbc2 Handle case where using enetity level name: None with MQTT (#5897)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-12-07 09:31:27 +09:00
Edward Firmo
049a7a0113 Add framework info to Nextion log tags (#5864) 2023-12-07 08:57:06 +09:00
dependabot[bot]
c53874788a Bump aioesphomeapi from 19.2.1 to 19.3.0 (#5895)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-06 11:04:20 -10:00
Edward Firmo
f026f49415 Nextion exit reparse mode on startup (#5868)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-12-06 00:55:07 -06:00
J. Nick Koston
be07463fbd dashboard: Add some basic tests for the dashboard (#5870) 2023-12-06 10:06:05 +09:00
Subhash Chandra
8f70ef24a2 feat(packages): support removing components (#5821) 2023-12-06 10:04:17 +09:00
Keith Burzinski
89d7cdf86b RC522 - Fix error counter error (#5873) 2023-12-05 17:21:12 +09:00
Fabio Pugliese Ornellas
7fd08fb816 Fix template text component length check (#5881)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-12-04 22:17:43 -06:00
Keith Burzinski
1d0fb59208 Fix test4.yaml after #5666 (#5890) 2023-12-05 02:50:40 +00:00
Edward Firmo
4d3730b50e Nextion support to idf with cinttypes (#5876) 2023-12-04 19:09:44 -06:00
Clyde Stubbs
d9792b0d92 Checks for pins used in multiple places (#5666) 2023-12-05 08:56:53 +09:00
Clyde Stubbs
df5394d51c Suppress full config output of "esphome config" when -q option is used. (#5852) 2023-12-05 08:52:02 +09:00
Fabio Pugliese Ornellas
b8fe4f8d56 Security improvement: Support wifi ap_timeout=0s (disable) (#5887) 2023-12-05 08:50:01 +09:00
dependabot[bot]
657a7070cb Bump voluptuous from 0.13.1 to 0.14.1 (#5784)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-05 08:43:07 +09:00
dependabot[bot]
2a740963ba Bump pylint from 2.17.6 to 3.0.2 (#5592)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-05 08:42:37 +09:00
dependabot[bot]
c2183eb7f0 Bump zeroconf from 0.127.0 to 0.128.0 (#5889)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-05 08:42:19 +09:00
dependabot[bot]
0c71685d55 Bump pytest-asyncio from 0.21.1 to 0.23.2 (#5888)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-05 08:42:02 +09:00
Samuel Sieb
29dcc4031f fix a01nyub data reading (#5882)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-12-05 08:41:33 +09:00
Mike La Spina
e271faa544 Fix un-initialized version string (#5865) 2023-12-04 17:15:01 -06:00
Samuel Sieb
788f1b60e2 add missing ifdef to pvvx_mithermometer (#5880) 2023-12-02 22:58:25 -08:00
dependabot[bot]
782854ab36 Bump tornado from 6.3.3 to 6.4 (#5862)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-30 20:51:14 -10:00
dependabot[bot]
6cf4412e7b Bump aioesphomeapi from 19.1.7 to 19.2.1 (#5863)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-30 20:49:42 -10:00
Clyde Stubbs
391eff8fd5 Add Chamberlain/HomEntry HE60R garage door opener (#5834)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-29 10:42:35 +13:00
Alexander Dimitrov
6424f831e2 Pn532 non blocking scan (#5191) 2023-11-29 10:17:16 +13:00
dependabot[bot]
087733c2fd Bump aioesphomeapi from 19.1.2 to 19.1.7 (#5859)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-28 19:23:55 +00:00
Sean Brogan
af8258168b Add Pro Check Universal sensor support. (#5798)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-28 20:00:48 +13:00
Edward Firmo
3940c6ac4e Improve reliability of Nextion TFT uploads (Arduino) (#5683)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-11-27 23:25:20 -06:00
J. Nick Koston
ad5f6b5687 dashboard: fix supervisor auth doing I/O in the event loop (#5807) 2023-11-27 23:11:17 -06:00
Edward Firmo
2f888ff7c5 Nextion colors parameters (#5699)
* Add `foreground` color

- Adds `set_component_foreground_color` and `set_component_pressed_foreground_color` which does the same as `set_component_font_color` and `set_component_pressed_font_color` but with a more intuitive name, as this can be used for any component and not only the ones with a text (font).
- I've also reviewed some docstring when related to colors.

* Add numeric color to drawing methods

Should I've used uint32_t instead? In order to keep consistency?

* component color support to uint6_t

This is the right format and is now consistent with colors on drawings.
I'm keeping uint32_t also to avoid breaking changes.

* Enforces uint16_t for colors

uint32_t is incorrect for Nextion display colors.

* Fix clang-format
2023-11-27 22:50:14 -06:00
Edward Firmo
d1be686c54 Nextion on_touch trigger (#5833) 2023-11-28 17:14:59 +13:00
Clyde Stubbs
a8bc5ef46f Pass through additional arguments to create number (#5849) 2023-11-28 16:50:02 +13:00
Jesse Hills
1e77271858 Fix regex for 'byte' custom CI check (#5851) 2023-11-28 16:07:29 +13:00
Clyde Stubbs
993cd55b1d Speed up (and fix) ili9xxx display component. (#5406) 2023-11-28 13:42:03 +13:00
Edward Firmo
ab1cc0ed6e Nextion - Align strings on dump_config (#5824) 2023-11-27 18:24:43 -06:00
Clyde Stubbs
496c29aa04 Fix ESP-IDF uart initialisation sequence to match Espressif docs. (#5838) 2023-11-28 12:42:22 +13:00
Lucas Prim
a66dec738d Implement deep sleep and clear screen on Waveshare 7.5in B V3 (#5239) 2023-11-28 12:40:39 +13:00
Jesse Hills
ddff92c88b Merge pull request #5848 from esphome/bump-2023.11.6
2023.11.6
2023-11-28 12:37:13 +13:00
Jesse Hills
ed9fd173a9 Bump version to 2023.11.6 2023-11-28 12:31:55 +13:00
Jesse Hills
175f00f41b Fix write_speaker without speaker in config (#5847) 2023-11-28 12:31:54 +13:00
Jesse Hills
b8ee0dedec Fix write_speaker without speaker in config (#5847) 2023-11-28 12:28:24 +13:00
Jesse Hills
676b37e6b0 Merge pull request #5846 from esphome/bump-2023.11.5
2023.11.5
2023-11-28 11:54:33 +13:00
functionpointer
4b6fbd5db0 Pylontech integration (solar battery bank) (#4688)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-28 11:43:03 +13:00
J. Nick Koston
4e6d3729e1 dashboard: Small cleanups to dashboard (#5841) 2023-11-28 11:39:24 +13:00
Jesse Hills
28a3cddde3 Bump version to 2023.11.5 2023-11-28 11:14:26 +13:00
Jesse Hills
687f5ca633 Add 'voice_assistant.connected' condition (#5845) 2023-11-28 11:14:26 +13:00
Jesse Hills
ff97639f79 Fix missing include in remote_base (#5843) 2023-11-28 11:14:26 +13:00
Jesse Hills
8e4b9c3c1e Voice Assistant improvements (#5827) 2023-11-28 11:14:26 +13:00
Edward Firmo
460362b11f Nextion - Standardizing log messages (#5837) 2023-11-27 21:09:57 +00:00
dependabot[bot]
019315afa0 Bump aioesphomeapi from 18.5.9 to 19.1.2 (#5844)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-11-27 21:07:48 +00:00
Jesse Hills
3b77f05cc9 Add 'voice_assistant.connected' condition (#5845) 2023-11-27 14:57:40 -06:00
Jesse Hills
f63f722afb Create GT911 Touchscreen component (#4027)
Co-authored-by: clydebarrow <2366188+clydebarrow@users.noreply.github.com>
2023-11-28 09:44:09 +13:00
Jesse Hills
a15a812466 Fix missing include in remote_base (#5843) 2023-11-28 09:43:41 +13:00
Jesse Hills
15180ee1e2 mcp3008: Tidy up and fix auto load bug (#5842) 2023-11-27 20:35:31 +00:00
Jesse Hills
1324d9e39a Voice Assistant improvements (#5827) 2023-11-27 13:45:26 +13:00
Clyde Stubbs
0a7d3c367b Add 'enable_at_startup' feature to power_supply (#5826) 2023-11-27 10:36:52 +13:00
Clyde Stubbs
2e6d01ddff Implement variable length single word SPI writes. (#5678) 2023-11-27 09:54:12 +13:00
Clyde Stubbs
dbdcb39af9 Pull PollingComponent up from individual display drivers to Display. (#5444) 2023-11-27 09:48:38 +13:00
Edward Firmo
ccd7f0661c Add is_detected() for Nextion displays (#5825) 2023-11-25 02:38:45 -06:00
Clyde Stubbs
c43518c391 Allow split uart pin inversion for ESP-IDF (#5831) 2023-11-24 21:56:32 -06:00
dependabot[bot]
636ee2b597 Bump aioesphomeapi from 18.5.7 to 18.5.9 (#5830)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-24 18:06:57 -06:00
Fabian
91f1aa05ad Run all tests when local testing. (#5717) 2023-11-25 10:18:36 +11:00
dependabot[bot]
9f84b6390d Bump actions/github-script from 6.4.1 to 7.0.1 (#5803)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-24 09:27:56 +01:00
Vincent Schmandt
f456603c1b Add ENS160 Sensor (#4243)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
Co-authored-by: mrtoy-me <118446898+mrtoy-me@users.noreply.github.com>
2023-11-23 22:31:07 -06:00
J. Nick Koston
5c31bec8c2 Ensure names containing characters other than a-z A-Z 0-9 or _ are unique (#5810) 2023-11-23 17:29:08 -06:00
dependabot[bot]
9f8a896e13 Bump aioesphomeapi from 18.5.5 to 18.5.7 (#5822)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-23 17:02:44 -06:00
Jesse Hills
c571abeea8 Merge branch 'release' into dev 2023-11-24 11:53:04 +13:00
J. Nick Koston
1762204b00 dashboard: set nodelay on the websocket to avoid a delay seeing log messages (#5802) 2023-11-24 11:49:55 +13:00
Jesse Hills
1aa49c8956 Merge pull request #5823 from esphome/bump-2023.11.4
2023.11.4
2023-11-24 11:02:15 +13:00
Jesse Hills
711faab329 Bump version to 2023.11.4 2023-11-24 10:24:25 +13:00
Landon Rohatensky
1204b4f1bd Allow images to be downloaded from URLs (#5214)
Co-authored-by: guillempages <guillempages@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-24 10:24:16 +13:00
Ilia Sotnikov
2076db1ccd Pillow: bump to 10.1.0 (#5815) 2023-11-24 08:15:58 +13:00
Landon Rohatensky
49c09afb87 Allow images to be downloaded from URLs (#5214)
Co-authored-by: guillempages <guillempages@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-24 08:10:33 +13:00
Clyde Stubbs
3ac59180ab Add startup_delay to interval. (#5327) 2023-11-23 20:31:23 +13:00
matt7aylor
8738cef5a3 sen5x fix temperature compensation and gas tuning (#4901) 2023-11-23 08:48:38 +13:00
Jesse Hills
cadbf7463e Merge pull request #5816 from esphome/bump-2023.11.3
2023.11.3
2023-11-22 13:37:10 +13:00
Jesse Hills
3f40e32eba Bump version to 2023.11.3 2023-11-22 11:08:47 +13:00
Keith Burzinski
b421fccc08 Add some additional VA triggers, part 2 (#5811) 2023-11-22 11:08:47 +13:00
Jesse Hills
10ca05b686 Early return when there are no wifi scan results (#5797) 2023-11-22 11:08:46 +13:00
CVan
d0ac202a3f fix: compile errors with fonts (#5808) 2023-11-22 11:08:46 +13:00
Cody Cutrer
1c4b06700f include payload_open when a lock supports OPEN (#5809) 2023-11-22 11:08:21 +13:00
Keith Burzinski
b809d02846 Add some additional VA triggers, part 2 (#5811) 2023-11-22 10:09:14 +13:00
Jesse Hills
e7038d077a Early return when there are no wifi scan results (#5797) 2023-11-21 14:24:47 +13:00
Pavlo Dudnytskyi
cf6b56c1ac Haier component updated to support new protocol variations (#5713)
Co-authored-by: Pavlo Dudnytskyi <pdudnytskyi@astrata.eu>
2023-11-21 14:12:36 +13:00
CVan
55f13dc347 fix: compile errors with fonts (#5808) 2023-11-21 13:19:36 +13:00
J. Nick Koston
7d5ebeda52 dashboard: Fix online status when api is disabled (#5792) 2023-11-21 13:16:06 +13:00
J. Nick Koston
47d42afda3 dashboard: Fix online status when api is disabled (#5791) 2023-11-21 13:15:32 +13:00
Cody Cutrer
d5d97c4558 include payload_open when a lock supports OPEN (#5809) 2023-11-21 12:59:38 +13:00
dependabot[bot]
5744490f2f Bump aioesphomeapi from 18.5.3 to 18.5.5 (#5804)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-20 23:18:00 +01:00
Christian Schmitt
d462beea6e ssd1306: handle V_COM differently for SH1106 (#5796) 2023-11-20 16:34:26 +13:00
Kevin P. Fleming
e367ab26e1 wifi: Don't build SoftAP/DHCPS support unless 'ap' is in config. (#5649) 2023-11-20 16:32:46 +13:00
J. Nick Koston
2aaee81313 Refactor StorageJSON to keep loaded_integrations a set until its converted to JSON (#5793)
* Refactor StorageJSON to keep loaded_integrations a set until its converted to a dict

after #5792 we will be checking loaded_integrations often. ESPHome
core keep uses a set, but it would get converted to a list when
passed through StorageJSON. Keep it a set until its needed to
be read/write to JSON so we do not have to linear searches on it
since they have a time complexity of O(n) vs O(1)

* legacy
2023-11-19 22:31:00 -05:00
J. Nick Koston
cd9bf29df1 dashboard: Add lookup by name to entries (#5790)
* Add lookup by name to entries

* adj

* tweak

* tweak

* tweak

* tweak

* tweak

* tweak

* preen
2023-11-19 22:29:40 -05:00
J. Nick Koston
4e4fe3c26d dashboard: Ensure disk I/O happens in the executor (#5789)
* Ensure I/O executor

* safe file writer

* fixes

* more io

* more io
2023-11-19 22:28:35 -05:00
Jesse Hills
1a9f66e630 Merge pull request #5787 from esphome/bump-2023.11.2
2023.11.2
2023-11-18 22:25:00 +13:00
Jesse Hills
8fb6b8f1a2 Bump version to 2023.11.2 2023-11-18 21:15:56 +13:00
Keith Burzinski
22eef036c7 Add 2MB option for partitions.csv generation and restore use of user-defined partitions (#5779) 2023-11-18 21:15:56 +13:00
Samuel Sieb
625ce2b8eb fix 32-bit arm (#5781) 2023-11-18 21:15:56 +13:00
dependabot[bot]
e5e3b253bc Bump aioesphomeapi from 18.4.1 to 18.5.2 (#5780)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-18 21:15:51 +13:00
dependabot[bot]
c369443263 Bump aioesphomeapi from 18.4.0 to 18.4.1 (#5767)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-18 21:14:50 +13:00
Keith Burzinski
8fbb4e27d1 Add 2MB option for partitions.csv generation and restore use of user-defined partitions (#5779) 2023-11-18 21:00:59 +13:00
J. Nick Koston
3c243e663f dashboard: Add support for firing events (#5775)
* dashboard: fire events when entry is updated or state changes

* dashboard: fire events when entry is updated or state changes

* dashboard: fire events when entry is updated or state changes

* tweaks

* fixes

* remove typing_extensions

* rename for asyncio

* rename for asyncio

* rename for asyncio

* preen

* lint

* lint

* move dict converter

* lint
2023-11-17 19:33:10 -05:00
J. Nick Koston
288af1f4d2 Refactor log api client to let aioesphomeapi manage zeroconf (#5783)
aioesphomeapi is now smart enough to avoid creating a zeroconf instance
until its needed after https://github.com/esphome/aioesphomeapi/pull/643

This avoids the needs to have a background zeroconf instance running that
is processing incoming records but will never do anything
2023-11-17 18:50:40 -05:00
J. Nick Koston
6f8d7c6acd Bump aioesphomeapi to 18.5.3 (#5785)
- Avoids creating a zeroconf instance when we do not need one

supports https://github.com/esphome/esphome/pull/5783

changelog: https://github.com/esphome/aioesphomeapi/compare/v18.5.2...v18.5.3
2023-11-17 18:48:53 -05:00
Samuel Sieb
32e3f26239 fix 32-bit arm (#5781) 2023-11-17 09:16:03 +00:00
dependabot[bot]
5464368c08 Bump aioesphomeapi from 18.4.1 to 18.5.2 (#5780)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-16 23:35:42 -06:00
Jesse Hills
1e061582d3 Merge pull request #5776 from esphome/bump-2023.11.1
2023.11.1
2023-11-16 21:19:39 +13:00
Jesse Hills
208edf89dc Split release workflow jobs per system arch (#5723) 2023-11-16 21:06:16 +13:00
Nikita Kuklev
fefdb80fdc Add proper support for SH1107 to SSD1306 component (#5166) 2023-11-16 21:06:03 +13:00
Jesse Hills
445b13dbc6 Bump version to 2023.11.1 2023-11-16 20:55:28 +13:00
Mat931
255483de63 Fix MY9231 flicker (#5765) 2023-11-16 20:55:28 +13:00
Keith Burzinski
4ac49907ca Add more VA triggers (#5762) 2023-11-16 20:55:28 +13:00
Mat931
754bd5b7be Fix MY9231 flicker (#5765) 2023-11-16 20:45:08 +13:00
J. Nick Koston
10a9129b7b Pass the name to the log runner when available (#5759) 2023-11-16 20:41:49 +13:00
Keith Burzinski
ef945d298c Add more VA triggers (#5762) 2023-11-15 21:29:50 -06:00
J. Nick Koston
149d814fab dashboard: Centralize dashboard entries into DashboardEntries class (#5774)
* Centralize dashboard entries into DashboardEntries class

* preen

* preen

* preen

* preen

* preen
2023-11-15 21:49:56 -05:00
J. Nick Koston
5f1d8dfa5b dashboard: use fastest available yaml loader in the dashboard (#5771)
* dashboard: use fastest available yaml loader in the dashboard

* remove unrelated change
2023-11-15 19:08:17 -05:00
J. Nick Koston
3644853d38 dashboard: fix subprocesses blocking the event loop (#5772)
* dashboard: fix subprocesses blocking the event loop

- break apart the util module
- adds a new util to run subprocesses with asyncio

* take a list
2023-11-15 19:07:51 -05:00
dependabot[bot]
4e3170dc95 Bump zeroconf from 0.126.0 to 0.127.0 (#5768)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-15 21:48:59 +00:00
J. Nick Koston
c795dbde26 dashboard: split dashboard web server code into its own module (#5770) 2023-11-15 21:34:09 +00:00
dependabot[bot]
4ce627b4ee Bump aioesphomeapi from 18.4.0 to 18.4.1 (#5767)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-15 15:28:04 -06:00
J. Nick Koston
86b4fdc139 dashboard: Break apart dashboard into separate modules (#5764)
* Break apart dashboard into seperate modules

* reduce code change

* late imports

* late imports

* preen

* remove accidental changes

* save the file
2023-11-15 13:00:28 -05:00
J. Nick Koston
20ea8bf06e dashboard: convert ping thread to use asyncio (#5749) 2023-11-14 22:55:33 -06:00
J. Nick Koston
642db6d92b Speed up OTAs (#5720) 2023-11-14 22:14:37 -06:00
Jesse Hills
4aac5a23cd Merge branch 'release' into dev 2023-11-15 16:13:43 +13:00
Jesse Hills
c536c976b7 Merge pull request #5758 from esphome/bump-2023.11.0
2023.11.0
2023-11-15 16:11:18 +13:00
J. Nick Koston
214b419db2 dashboard: Use mdns cache when available if device connection is OTA (#5724)
* Use mdns or freshen cache when device connection is OTA

Since we already have a service browser running, we likely
already know the IP of the deivce we want to connect to so
we can replace OTA with the address to avoid the esphome
app having to look it up again

* isort

* Fix zeroconf name resolution refactoring error

HostResolver should get the type as the first arg instead
of the name

* no i/o

* tornado support native coros

* lint

* use new tornado start methods

* use new tornado start methods

* use new tornado start methods

* break

* lint

* lint

* typing, missing awaits

* io in executor

* missed one

* fix: missing if

* stale comment

* rename run_command to build_device_command since it does not actually run anything
2023-11-14 21:21:44 -05:00
Jesse Hills
0c18872888 Bump version to 2023.11.0 2023-11-15 14:13:39 +13:00
Jesse Hills
197b6b4275 Merge pull request #5756 from esphome/bump-2023.11.0b7
2023.11.0b7
2023-11-15 13:19:48 +13:00
Jesse Hills
4e8bdc2155 Bump version to 2023.11.0b7 2023-11-15 12:45:03 +13:00
Jesse Hills
f1e8622187 Dont dump wifi info when disabled (#5755) 2023-11-15 12:45:02 +13:00
Jesse Hills
e0c7a02fbc Allow setup to continue past mqtt if network/wifi is disabled (#5754) 2023-11-15 12:45:02 +13:00
Jimmy Hedman
cdcb25be8e Make precommit checks happy (#5751) 2023-11-15 12:38:36 +13:00
Jesse Hills
aecc6655db Dont dump wifi info when disabled (#5755) 2023-11-14 21:57:25 +00:00
Jesse Hills
2754ddec1b Allow setup to continue past mqtt if network/wifi is disabled (#5754) 2023-11-15 10:51:45 +13:00
Jesse Hills
2a20a5fc11 Merge pull request #5750 from esphome/bump-2023.11.0b6
2023.11.0b6
2023-11-14 16:16:11 +13:00
Jesse Hills
7100d073f8 Bump version to 2023.11.0b6 2023-11-14 14:32:41 +13:00
Keith Burzinski
1ac6cf2ff9 Generate partitions.csv based on flash size (#5697) 2023-11-14 14:32:41 +13:00
J. Nick Koston
2ee089c9d5 dashboard: Run get_serial_ports in the executor (#5740) 2023-11-14 14:32:41 +13:00
J. Nick Koston
bd568eecf5 dashboard: remove usage of codecs module (#5741) 2023-11-14 14:32:40 +13:00
Keith Burzinski
ae0e481cff Generate partitions.csv based on flash size (#5697) 2023-11-14 13:47:29 +13:00
J. Nick Koston
f198be39d7 dashboard: Run get_serial_ports in the executor (#5740) 2023-11-14 13:46:51 +13:00
J. Nick Koston
08fc96b890 dashboard: remove usage of codecs module (#5741) 2023-11-14 13:44:49 +13:00
dependabot[bot]
8c28bea5b1 Bump zeroconf from 0.123.0 to 0.126.0 (#5748)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 16:19:15 -06:00
Sergey Dudanov
00eedeb8b3 remote_base: added helper class and schemas (#5169)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-14 06:55:36 +13:00
Jimmy Hedman
0a4853ba7b Correct url for Arduino platform (#5744) 2023-11-14 06:38:08 +13:00
Jesse Hills
3e2b83acb0 Merge pull request #5742 from esphome/bump-2023.11.0b5
2023.11.0b5
2023-11-13 16:37:28 +13:00
Jesse Hills
c1eb5bd675 Bump version to 2023.11.0b5 2023-11-13 15:26:04 +13:00
Jesse Hills
a9772ebf3f Handle wake word not set up internally (#5738) 2023-11-13 15:26:04 +13:00
Jesse Hills
45276cc244 Handle wake word not set up internally (#5738) 2023-11-13 11:48:26 +13:00
Jesse Hills
a9a17ee89d Merge pull request #5737 from esphome/bump-2023.11.0b4
2023.11.0b4
2023-11-13 11:25:42 +13:00
Jesse Hills
f094702a16 Bump version to 2023.11.0b4 2023-11-13 10:23:28 +13:00
J. Nick Koston
908f56ff46 Bump zeroconf to 0.123.0 (#5736) 2023-11-13 10:23:28 +13:00
J. Nick Koston
bd5905c59a Migrate to using aioesphomeapi for the log runner to fix multiple issues (#5733) 2023-11-13 10:23:28 +13:00
dependabot[bot]
91299f05f7 Bump aioesphomeapi from 18.2.7 to 18.4.0 (#5735)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 10:23:27 +13:00
Mike La Spina
30e5ff9fff Missed ifdefs (#5727) 2023-11-13 10:23:27 +13:00
J. Nick Koston
163b38e153 Fix zeroconf name resolution refactoring error (#5725) 2023-11-13 10:23:27 +13:00
Jesse Hills
3b486084c8 Add resistance_sampler interface for config validation (#5718) 2023-11-13 10:23:27 +13:00
Jimmy Hedman
684cf10230 Bump Arduino Pico Framework to 3.6.0 and Platform to 1.10.0 (#5731) 2023-11-13 07:28:02 +13:00
J. Nick Koston
63a277ba80 Bump zeroconf to 0.123.0 (#5736) 2023-11-13 07:20:34 +13:00
J. Nick Koston
53f3385c49 Migrate to using aioesphomeapi for the log runner to fix multiple issues (#5733) 2023-11-12 14:36:56 +13:00
dependabot[bot]
51930a0243 Bump aioesphomeapi from 18.2.7 to 18.4.0 (#5735)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-11 21:59:36 +00:00
Mike La Spina
6a5cea171e Missed ifdefs (#5727) 2023-11-10 18:37:39 -06:00
J. Nick Koston
3363c8f434 Fix zeroconf name resolution refactoring error (#5725) 2023-11-10 22:55:21 +13:00
J. Nick Koston
3b891bc146 Speed up YAML by using YAML C loader when available (#5721) 2023-11-10 22:17:40 +13:00
dependabot[bot]
0f19450ab4 Bump black from 23.10.1 to 23.11.0 (#5702)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-11-09 21:18:22 -06:00
Samuel Sieb
98ec798bfc fix pin range for xl9535 (#5722)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-11-10 01:53:35 +00:00
Jesse Hills
01d28ce3fc Add resistance_sampler interface for config validation (#5718) 2023-11-10 11:40:07 +13:00
Jesse Hills
9d453f0ba2 Merge pull request #5714 from esphome/bump-2023.11.0b3
2023.11.0b3
2023-11-10 08:16:33 +13:00
dependabot[bot]
799851a83a Bump zeroconf from 0.120.0 to 0.122.3 (#5715) 2023-11-10 07:29:44 +13:00
dependabot[bot]
bc7519f645 Bump zeroconf from 0.120.0 to 0.122.3 (#5715) 2023-11-09 12:26:05 -06:00
Jesse Hills
7a9866f1b6 Bump version to 2023.11.0b3 2023-11-09 22:14:22 +13:00
J. Nick Koston
3d30f1f733 Update Dockerfile to use piwheels for armv7 (#5709) 2023-11-09 22:14:22 +13:00
J. Nick Koston
1e55764d52 Bump aioesphomeapi to 18.2.7 (#5706) 2023-11-09 22:14:22 +13:00
J. Nick Koston
28513a0502 Update Dockerfile to use piwheels for armv7 (#5709) 2023-11-09 21:04:39 +13:00
J. Nick Koston
3e3266fa74 Bump aioesphomeapi to 18.2.7 (#5706) 2023-11-09 15:52:08 +13:00
Jesse Hills
020da89b6a Merge pull request #5707 from esphome/bump-2023.11.0b2
2023.11.0b2
2023-11-09 14:16:27 +13:00
Jesse Hills
6932422104 Bump version to 2023.11.0b2 2023-11-09 12:46:57 +13:00
Rodrigo Martín
29aa15b253 fix: Fix broken bluetooth_proxy and ble_clients after BLE enable/disable (#5704) 2023-11-09 12:46:57 +13:00
J. Nick Koston
c40519ec6f Use piwheels for armv7 docker image builds (#5703) 2023-11-09 12:46:57 +13:00
J. Nick Koston
6c62c00963 Fix static assets cache logic (#5700) 2023-11-09 12:46:57 +13:00
Jesse Hills
1bd2e558d6 Fix esp32_rmt_led_strip custom timing units (#5696) 2023-11-09 12:46:57 +13:00
Jesse Hills
dbb1263a36 Handle nanoseconds in config (#5695) 2023-11-09 12:46:57 +13:00
Rodrigo Martín
ce020b1f9f fix: Fix broken bluetooth_proxy and ble_clients after BLE enable/disable (#5704) 2023-11-08 23:35:37 +00:00
J. Nick Koston
d394b957d1 Use piwheels for armv7 docker image builds (#5703) 2023-11-09 11:50:08 +13:00
J. Nick Koston
cf22c55430 Fix static assets cache logic (#5700) 2023-11-08 21:04:01 +00:00
Jesse Hills
511348974e Fix esp32_rmt_led_strip custom timing units (#5696) 2023-11-08 09:01:26 +00:00
Jesse Hills
972598a698 Handle nanoseconds in config (#5695) 2023-11-08 21:34:44 +13:00
Jesse Hills
966c6a4531 Merge pull request #5693 from esphome/bump-2023.11.0b1
2023.11.0b1
2023-11-08 16:21:35 +13:00
Edward Firmo
d81bec860b Nextion support to esp-idf (#5667)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-07 19:50:45 -06:00
Jesse Hills
fff2d01420 Bump version to 2023.11.0b1 2023-11-08 13:13:56 +13:00
Jesse Hills
fde7a04ee7 Bump version to 2023.12.0-dev 2023-11-08 13:13:56 +13:00
Jesse Hills
bf217ce252 Merge branch 'dev' into bump-2023.11.0b1 2023-11-08 13:13:54 +13:00
dependabot[bot]
0101ae768c Bump aioesphomeapi from 18.2.1 to 18.2.4 (#5692)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-07 15:44:33 -06:00
Keith Burzinski
9bd4b229e3 Handle on_disconnect when Wi-Fi is disabled (#5691) 2023-11-08 07:00:36 +13:00
Angel Nunez Mencias
ccffbfd3ae support spi for sn74hc595 (#5491)
Co-authored-by: Jimmy Hedman <jimmy.hedman@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-07 03:15:13 -06:00
J. Nick Koston
78e3ce7718 Implement a memory cache for dashboard entries to avoid frequent disk reads (#5687) 2023-11-07 19:04:55 +13:00
Charles Johnson
31fec2d692 add wifi.on_connect and wifi.on_disconnect triggers (#3639)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-06 23:17:13 -06:00
Jesse Hills
888c298d7e Update esphome-dashboard to version 20231107.0 (#5686) 2023-11-07 13:59:26 +13:00
Daniel Baulig
708ed8f38a [web_server] Adds the ability to handle Private Network Access preflight requests (#5669) 2023-11-07 13:59:03 +13:00
Edward Firmo
a8a9c6192d Remove page jump on Nextion startup (#5673) 2023-11-06 18:48:15 -06:00
Angel Nunez Mencias
defe8ac97b Add spi support for ade7953 (#5439)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-07 13:17:29 +13:00
dependabot[bot]
7ac9caa169 Bump zeroconf from 0.119.0 to 0.120.0 (#5682)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-07 12:48:37 +13:00
Greg Cormier
972c18a7ca Add differential pressure sensor support for CFSensor XGZP68xxD devices (#5562)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-07 12:46:30 +13:00
Jesse Hills
dd0270207f Allow pulse light effect to have separate on and off transition lengths (#5659) 2023-11-07 12:39:47 +13:00
Jesse Hills
d141e1cd67 Remove extra code in old sgp40 (#5685) 2023-11-07 12:38:52 +13:00
Jesse Hills
43b36ac3c7 Allow static assets to be cached if not in debug mode (#5684) 2023-11-07 12:38:38 +13:00
J. Nick Koston
fce59819f5 Refactor dashboard zeroconf support (#5681) 2023-11-07 11:07:59 +13:00
marshn
b978985aa1 Add Byron Doorbell RF protocol (#4718) 2023-11-07 08:30:23 +13:00
Jesse Hills
84bbf02bde ble_client rssi sensor fix when not connected (#5632) 2023-11-06 16:41:45 +13:00
Rodrigo Martín
d5aeb32ca6 feat: Add ESP32 BLE enable/disable automations (#5616)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-06 15:54:39 +13:00
kahrendt
ff8b904097 Null topic_prefix disables MQTT publishing/subscription unless topic is explicitly configured (#5644) 2023-11-06 14:19:03 +13:00
DAVe3283
e0cee472c3 Fix compile with latest esp-idf on esp32c6 (#5677)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-05 23:13:01 +00:00
micw
3ee85d7516 Add callback for raw sml messages (#5668) 2023-11-06 10:27:11 +13:00
Pavlo Dudnytskyi
4ca9aefc43 Fixed int variables for user defined service in case of ESP32-C3 (#5675) 2023-11-06 09:28:50 +13:00
Patrick ZAJDA
4ef2e28496 Add basic shell autocompletion using argcomplete (#5618) 2023-11-06 09:27:14 +13:00
Joris S
13994d9bd1 Add Micronova component (#4760)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Graham Brown <grahambrown11@gmail.com>
2023-11-03 19:54:47 +13:00
Mike La Spina
22cdb8dfc3 Add HLK-LD2420 mmWave Radar module component (#4847)
Co-authored-by: descipher <120155735+GelidusResearch@users.noreply.github.com>
2023-11-02 18:02:23 -05:00
Jesse Hills
a7ad4482f0 Merge pull request #5664 from esphome/bump-2023.10.6
2023.10.6
2023-11-03 08:49:48 +13:00
Jesse Hills
aa17661002 Bump version to 2023.10.6 2023-11-03 08:11:58 +13:00
Jesse Hills
4e65aac7ae Revert "Ensure that all uses of strncpy in wifi component are safe." (#5662) 2023-11-03 08:11:58 +13:00
Jesse Hills
d74a8abf9a Revert "Ensure that all uses of strncpy in wifi component are safe." (#5662) 2023-11-03 08:09:17 +13:00
Jc Miñarro
d809c80286 Add Healthcheck to Dockerfile (#5651) 2023-11-03 07:19:43 +13:00
dependabot[bot]
6ca14331e5 Bump black from 23.10.0 to 23.10.1 (#5593)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-02 17:15:28 +13:00
dependabot[bot]
d5f010ee52 Bump tzlocal from 5.1 to 5.2 (#5594)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-02 17:15:20 +13:00
dependabot[bot]
4837e114e4 Bump pytest from 7.4.2 to 7.4.3 (#5599)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-02 17:15:05 +13:00
Jesse Hills
77b530cf9e Bump flake8 version in pre-commit to match requirements file (#5658) 2023-11-02 17:14:39 +13:00
NP v/d Spek
453600f18e Update RTTTL component to allow I2S (#5177)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-11-02 17:14:05 +13:00
Jesse Hills
4edf3efdf3 Fix return value of run_external_command (#5657) 2023-11-02 17:06:09 +13:00
Jimmy Hedman
f70d651a39 Update mDNS component to 1.2.2 (#5654) 2023-11-02 16:56:02 +13:00
Clyde Stubbs
b0a400d82b Update PCA9554 pin checks to new facility (#5656) 2023-11-02 03:46:47 +00:00
Jesse Hills
29b1233609 Validate sn74hc595 pin number are within range (#5655) 2023-11-02 16:45:00 +13:00
dependabot[bot]
c3f7cae2b0 Bump aioesphomeapi from 18.2.0 to 18.2.1 (#5653)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-02 15:49:16 +13:00
Jesse Hills
9eea52ea85 Allow validation of pins based on hub config (#5647) 2023-11-02 15:32:00 +13:00
Gustavo Ambrozio
40c001bdc2 Fix nextion waveform sending for multiple waveforms (#4408) 2023-11-01 20:09:12 -05:00
Jesse Hills
229ba18e6c Merge pull request #5645 from esphome/bump-2023.10.5
2023.10.5
2023-11-01 14:07:42 +13:00
Clyde Stubbs
1fd9d67e2b Add support for PCA9535 16 bit I/O expander (#5634) 2023-11-01 12:22:04 +13:00
Jesse Hills
b99be250a0 Bump version to 2023.10.5 2023-11-01 12:19:16 +13:00
Jimmy Hedman
b9d4e2e501 Remove some explicit IPAddress casts (#5639) 2023-11-01 12:19:16 +13:00
Kevin P. Fleming
ef2531edf3 Ensure that all uses of strncpy in wifi component are safe. (#5636) 2023-11-01 12:19:16 +13:00
Jesse Hills
eae3089201 Add on_client_connected and disconnected to voice assistant (#5629) 2023-11-01 12:19:16 +13:00
Jesse Hills
0ea4de5f4c Add connection triggers to api (#5628) 2023-11-01 12:19:16 +13:00
Jesse Hills
8eae882d93 Add needs-docs workflow to fail CI (#5643) 2023-11-01 11:12:16 +13:00
Jimmy Hedman
9adda8085a Remove some explicit IPAddress casts (#5639) 2023-11-01 10:32:29 +13:00
Kevin P. Fleming
b03eb5ea0a Ensure that all uses of strncpy in wifi component are safe. (#5636) 2023-11-01 10:30:42 +13:00
Jesse Hills
193bac94f4 Add on_client_connected and disconnected to voice assistant (#5629) 2023-10-30 17:16:42 -05:00
dependabot[bot]
69ec647f7e Bump aioesphomeapi from 18.0.12 to 18.2.0 (#5606) 2023-10-30 14:57:41 -07:00
J. Nick Koston
9dfcf801a3 Fix armv7 docker builds (#5630) 2023-10-30 14:07:25 -05:00
Jesse Hills
1e0daefa16 Merge pull request #5627 from esphome/bump-2023.10.4
2023.10.4
2023-10-30 16:33:36 +13:00
Jesse Hills
27b593ba85 Add connection triggers to api (#5628) 2023-10-29 21:02:49 -05:00
Jesse Hills
6d991a1fc8 Bump version to 2023.10.4 2023-10-30 13:59:58 +13:00
Jesse Hills
a1845e1e72 Handle enum type in tuya text_sensor (#5626) 2023-10-30 13:59:58 +13:00
Dewet Diener
f96a839bcf Fix bug when requesting italic gfonts (#5623) 2023-10-30 13:59:58 +13:00
Jimmy Hedman
1282a15b14 Fixes ip include on arduino 2.7.4 (#5620) 2023-10-30 13:59:58 +13:00
Roger Busser
35039b45e4 Update current_based_cover bugfix (#5587) 2023-10-30 13:59:58 +13:00
Jesse Hills
0c46403eaf Handle enum type in tuya text_sensor (#5626) 2023-10-29 22:00:47 +00:00
Dewet Diener
f36ec7c726 Fix bug when requesting italic gfonts (#5623) 2023-10-30 08:05:18 +13:00
Jimmy Hedman
01a16141f1 Fixes ip include on arduino 2.7.4 (#5620) 2023-10-30 07:35:33 +13:00
Keith Burzinski
7cf056e828 IDF 5 fixes for various components from test2.yaml (#5621) 2023-10-29 18:50:26 +13:00
Keith Burzinski
f7f63c9da1 IDF 5 fixes for various components from test4.yaml (#5622) 2023-10-29 18:49:19 +13:00
Keith Burzinski
d4cb29a380 Fix xpt2046 for IDF 5 (#5614) 2023-10-27 22:36:43 +00:00
H. Árkosi Róbert
563e15e8a7 Fix HA error related to incorrect state class (#5605) 2023-10-27 07:39:23 +00:00
Samuel Sieb
c83cb30935 refactor mcp4728 component (#5609)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-10-27 18:01:18 +13:00
niklasweber
907d43827c Add dfrobot_sen0395 mmwave radar component (#4203)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-27 17:56:33 +13:00
Jesse Hills
0c5d5cd623 timeout filter: return value (#5612) 2023-10-27 16:36:54 +13:00
Jesse Hills
535568e065 Minor defines.h updates (#5610) 2023-10-27 16:16:44 +13:00
Jesse Hills
2adda3a994 Validate test files before compiling (#5611)
* Validate test files before compiling

* Dont restrict parallel
2023-10-27 01:59:10 +00:00
Jesse Hills
a9f4922824 Devcontainer: allow pip install and dont warn about root user (#5608) 2023-10-27 11:56:16 +13:00
Cossid
bcfbcd9578 Add area (zone) to esphome core config to be suggested through API and MQTT. (#5602)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-27 11:38:52 +13:00
dentra
cfbf3681f3 Fallback to main secrets.yaml for packages (#5604) 2023-10-27 10:16:43 +13:00
dentra
f6e8d97981 Add details when error loading package (#5603) 2023-10-27 09:27:42 +13:00
tracestep
6b8a75d3b8 SX1509 output debounce fix (resolves esphome/issues#4402) (#4672) 2023-10-26 15:36:58 +13:00
Jesse Hills
8b9a7608f0 Correctly allow mqtt topics to be none so ESPHome does not sub/pub to them (#5213) 2023-10-26 13:37:50 +13:00
Jesse Hills
4774200f6b Print text mqtt command topic (#5601) 2023-10-26 13:37:06 +13:00
kahrendt
93056dead9 Add ignore out of range option for clamp filter (#5455)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-26 09:30:23 +13:00
kahrendt
841b24f744 Add support for Qwiic PIR binary sensor (#5194) 2023-10-26 08:29:21 +13:00
kahrendt
258b0fbff3 Fix: Incorporate unique serial number in preference's hash for multiple Sensirion sensors (#5479) 2023-10-26 08:23:55 +13:00
Roger Busser
fdef6c6d46 Update current_based_cover bugfix (#5587) 2023-10-26 07:31:39 +13:00
Eduard Llull
28aedae8d7 Add Emc2101 (#4491)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-26 07:30:11 +13:00
jpfaff
2895cc6c57 Add support for honeywellabp2 pressure sensor (#5422) 2023-10-26 07:28:07 +13:00
dentra
ec835c0b05 Fix exception handling when loading packages (#5569) 2023-10-26 07:15:25 +13:00
Daniel Dunn
e80bd8ed3d Add text component (#5336)
Co-authored-by: Maurits <maurits@vloop.nl>
Co-authored-by: mauritskorse <mauritskorse@gmail.com>
Co-authored-by: Daniel Dunn <dannydunn@eternityforest.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-25 22:00:32 +13:00
dependabot[bot]
cf7df9e360 Bump aioesphomeapi from 18.0.7 to 18.0.12 (#5597)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 12:08:00 -05:00
Alejandro Galfrascoli
e01ba894ed Add IR Noblex climate component (#4913)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-24 16:28:53 +13:00
Jesse Hills
390766eb67 Merge pull request #5596 from esphome/bump-2023.10.3
2023.10.3
2023-10-24 13:40:13 +13:00
Jesse Hills
899d280ac7 Bump version to 2023.10.3 2023-10-24 12:56:25 +13:00
Keith Burzinski
96dc7f0259 Set IP address type only when IPv4 and IPv6 are both enabled (#5595) 2023-10-24 12:56:25 +13:00
Keith Burzinski
cb2f5eb781 Set IP address type only when IPv4 and IPv6 are both enabled (#5595) 2023-10-23 23:43:54 +00:00
Jevgeni Kiski
34dce0acbf AMS iAQ Core CO2 sensor component (#5192)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-24 12:35:51 +13:00
Piu Piuson
96822aaa3a Feat: Add GREE climateir component (#4464)
Co-authored-by: orestismers <33354671+orestismers@users.noreply.github.com>
Co-authored-by: Orestes Mersinias <orestis.mers@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-24 11:34:46 +13:00
Chris Feenstra
b4765fb5fb Add ZH/LT-01 climate component with IR receiver option (#4333)
Co-authored-by: Chris Feenstra <chris@cfeenstra.nl>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-24 11:33:47 +13:00
dependabot[bot]
da9c2f2256 Bump pyupgrade from 3.13.0 to 3.15.0 (#5570)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-23 21:35:55 +00:00
Jesse Hills
0104bf3fc8 Merge pull request #5590 from esphome/bump-2023.10.2
2023.10.2
2023-10-24 10:15:07 +13:00
dependabot[bot]
cf8fb7888a Bump pytest-mock from 3.11.1 to 3.12.0 (#5571)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-24 08:43:51 +13:00
Jesse Hills
9b1e1bf56c Bump version to 2023.10.2 2023-10-24 08:32:26 +13:00
dentra
33e0f16b3b Allow set climate preset to NONE (#5588) 2023-10-24 08:32:26 +13:00
Samuel Sieb
0807d60c6a fix canbus send config (#5585)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-10-24 08:32:03 +13:00
Jimmy Hedman
f018fde369 Set addr type when copy from ip4_addr_t (#5583) 2023-10-24 08:30:47 +13:00
Jimmy Hedman
c47f8fc02c Remove explicit cast for IPAddress (#5574)
* Remove explicit cast for IPAddress

* Make linter happy
2023-10-24 08:30:47 +13:00
Trent Houliston
76ab923780 Publish the pulse_meter total when setting the total (#5475) 2023-10-24 08:30:47 +13:00
Keith Burzinski
11dba3147d Improv Serial support via USB CDC and JTAG (#5559) 2023-10-24 08:30:47 +13:00
Jesse Hills
8c2d9101d5 Fix XOR condition (#5567) 2023-10-24 08:30:47 +13:00
Jimmy Hedman
5347c9aafe Add LibreTiny hardwares to PR Template (#5575) 2023-10-24 08:06:23 +13:00
Simone Rossetto
e7d51f9c16 Add address text sensor to WireGuard (#5576) 2023-10-24 08:05:57 +13:00
Edward Firmo
7e27e98bff set Nextion protocol reparse mode (#5484) 2023-10-24 08:02:57 +13:00
Guillermo Ruffino
eead33b6f2 update storage version from mdns (#5584) 2023-10-24 08:02:29 +13:00
dentra
b898f75631 Allow set climate preset to NONE (#5588) 2023-10-24 07:29:32 +13:00
Samuel Sieb
84c00a5867 fix canbus send config (#5585)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-10-24 07:26:23 +13:00
Jimmy Hedman
e3fbf54a1a Set addr type when copy from ip4_addr_t (#5583) 2023-10-23 01:41:16 -05:00
Edward Firmo
3d7d0d4f73 Remove unnecessary checks in Nextion component (#5578) 2023-10-21 14:38:22 -05:00
Jimmy Hedman
05a95f8ee9 Remove explicit cast for IPAddress (#5574)
* Remove explicit cast for IPAddress

* Make linter happy
2023-10-21 17:04:07 +13:00
dependabot[bot]
76417103c7 Bump aioesphomeapi from 18.0.6 to 18.0.7 (#5573)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-20 16:48:56 -10:00
Trent Houliston
d82471942f Publish the pulse_meter total when setting the total (#5475) 2023-10-19 14:28:05 -07:00
Jordan W. Cobb
9f033bce3b Fan no off cycle action (#5564)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-19 20:02:27 +13:00
Keith Burzinski
b632ae49d4 Improv Serial support via USB CDC and JTAG (#5559) 2023-10-19 19:53:09 +13:00
Jesse Hills
b9d72231b0 Fix XOR condition (#5567) 2023-10-18 21:36:01 -05:00
Jesse Hills
61b8004536 Merge pull request #5566 from esphome/bump-2023.10.1
2023.10.1
2023-10-19 14:27:10 +13:00
dependabot[bot]
e99b8aaf96 Bump black from 23.9.1 to 23.10.0 (#5561)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-19 00:50:09 +00:00
Jesse Hills
db02c4ea21 Bump version to 2023.10.1 2023-10-19 13:30:13 +13:00
Mike La Spina
f077a5962d Incorrect ESP32 Strapping PIN Defined (#5563)
Co-authored-by: descipher <120155735+GelidusResearch@users.noreply.github.com>
2023-10-19 13:30:12 +13:00
Jesse Hills
fa4ba43eb9 Create IPv4 sockets if ipv6 is not enabled (#5565) 2023-10-19 13:30:12 +13:00
Jesse Hills
9579423b24 esp32_improv add timeout (#5556) 2023-10-19 13:30:12 +13:00
Jesse Hills
02449f24c9 Fix voice_assistant without a speaker (#5558) 2023-10-19 13:30:12 +13:00
dependabot[bot]
960d6a1431 Bump tzlocal from 5.0.1 to 5.1 (#5480)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-19 13:09:04 +13:00
dependabot[bot]
53572dcb8a Bump pyupgrade from 3.10.1 to 3.13.0 (#5428)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-19 13:08:44 +13:00
dependabot[bot]
9a087c0767 Bump actions/checkout from 4.1.0 to 4.1.1 (#5551)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-19 13:08:15 +13:00
jj-uk
a7d817656e Hydreon updates (#5424) 2023-10-19 13:06:28 +13:00
Clyde Stubbs
a794836ebe Add config to allow suppression of warnings about use of strapping pins (#5287)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-19 13:04:53 +13:00
Mike La Spina
799c3cf439 Incorrect ESP32 Strapping PIN Defined (#5563)
Co-authored-by: descipher <120155735+GelidusResearch@users.noreply.github.com>
2023-10-19 13:00:15 +13:00
Jesse Hills
b7402ee6ff Create IPv4 sockets if ipv6 is not enabled (#5565) 2023-10-19 12:25:43 +13:00
Jesse Hills
a8667b680e esp32_improv add timeout (#5556) 2023-10-19 11:42:52 +13:00
dependabot[bot]
10c89771e3 Bump zeroconf from 0.115.1 to 0.119.0 (#5560) 2023-10-18 10:21:19 -10:00
dependabot[bot]
b735fc475e Bump aioesphomeapi from 15.0.0 to 18.0.6 (#5557)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-18 08:28:52 -10:00
Jesse Hills
19736f6e53 Fix voice_assistant without a speaker (#5558) 2023-10-18 09:12:35 +00:00
Keith Burzinski
cdc4f7f59b IDF 5 fixes for various components from test1.yaml (#5451) 2023-10-18 19:33:36 +13:00
J. Nick Koston
8ef743f25e Update docker base and packages + docker python 3.11 (#5473)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-18 19:33:19 +13:00
Jesse Hills
b973238323 Merge pull request #5555 from esphome/bump-2023.10.0
2023.10.0
2023-10-18 17:38:50 +13:00
Jesse Hills
582b8383d2 Bump version to 2023.10.0 2023-10-18 16:47:03 +13:00
Jesse Hills
e1c9418aee Merge pull request #5554 from esphome/bump-2023.10.0b4
2023.10.0b4
2023-10-18 15:44:37 +13:00
Jesse Hills
2aa787f5f0 Bump version to 2023.10.0b4 2023-10-18 14:28:03 +13:00
Jesse Hills
2189a40a39 esp32_improv advertise capabilities and state in ble service data (#5553) 2023-10-18 14:28:03 +13:00
Fabian Bläse
51688d4078 SML: fix incomplete sign extension for abbreviated transmissions (#5544) 2023-10-18 14:28:03 +13:00
Jesse Hills
cc4c0e3e0b Fix default libretiny manufacturer reported to HA (#5549) 2023-10-18 14:28:02 +13:00
Jesse Hills
14aa27f5e2 esp32_improv advertise capabilities and state in ble service data (#5553) 2023-10-18 14:26:47 +13:00
Samuel Sieb
c19dbdb02d add on/off options for uart switch (#5539)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-10-18 08:07:29 +13:00
Fabian Bläse
b0ac729a8e SML: fix incomplete sign extension for abbreviated transmissions (#5544) 2023-10-18 07:39:05 +13:00
Samuel Sieb
6839de69c1 add uart button (#5540)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-10-18 07:30:32 +13:00
Jesse Hills
b12dc98150 Fix default libretiny manufacturer reported to HA (#5549) 2023-10-18 07:23:34 +13:00
Jesse Hills
1a44c6487e Merge pull request #5548 from esphome/bump-2023.10.0b3
2023.10.0b3
2023-10-17 20:49:16 +13:00
Jesse Hills
5e7ce610a0 Bump version to 2023.10.0b3 2023-10-17 20:15:14 +13:00
Jesse Hills
1f02096edb More voice assistant fixes (#5547) 2023-10-17 20:15:14 +13:00
Jesse Hills
fd7d3c4332 Fix esp32_improv authorizer with no binary sensors in config (#5546) 2023-10-17 20:15:14 +13:00
Jesse Hills
61cf566560 Add stream start and end events (#5545) 2023-10-17 20:15:14 +13:00
Christian
97d624114d Add change i2c address and allow multi conf for TB6612FNG (#5492) 2023-10-17 20:15:14 +13:00
raineth
52e8a2e9e4 Make IPAddress's operator!= compare values, not memory addresses. (#5537)
Co-authored-by: Ben Winslow <rain@bluecherry.net>
2023-10-17 20:15:14 +13:00
Jesse Hills
261c271d60 Prometheus fix for esp-idf and fix newlines (#5536) 2023-10-17 20:15:14 +13:00
Jesse Hills
a960c8008e More voice assistant fixes (#5547) 2023-10-17 20:11:37 +13:00
Jesse Hills
fb90e19713 Fix esp32_improv authorizer with no binary sensors in config (#5546) 2023-10-17 20:03:39 +13:00
Jesse Hills
4913b3cc35 Add stream start and end events (#5545) 2023-10-17 17:18:05 +13:00
Christian
e42c51a222 Add change i2c address and allow multi conf for TB6612FNG (#5492) 2023-10-17 08:47:35 +13:00
raineth
26f12cd3bb Make IPAddress's operator!= compare values, not memory addresses. (#5537)
Co-authored-by: Ben Winslow <rain@bluecherry.net>
2023-10-16 19:42:18 +13:00
Jesse Hills
06eff72065 Prometheus fix for esp-idf and fix newlines (#5536) 2023-10-16 19:41:59 +13:00
leoshusar
357ba1ab0f Change UART source clock to UART_SCLK_DEFAULT when IDF >=v5 (#5533) 2023-10-16 11:29:13 +13:00
ghsensdev
6143099f60 Add Support for Sensirion SFA30 sensor (#5519)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-16 07:49:57 +13:00
Jesse Hills
7ddcdab351 Add round sensor filter (#5532) 2023-10-14 13:07:23 +13:00
Jesse Hills
cb6e314336 Merge pull request #5528 from esphome/bump-2023.10.0b2
2023.10.0b2
2023-10-13 15:56:01 +13:00
Jesse Hills
90315b3c40 Bump version to 2023.10.0b2 2023-10-13 14:16:22 +13:00
Cossid
5d7c3d1622 BP1658CJ - Clear all channels before sleeping. (#5525) 2023-10-13 14:16:22 +13:00
Cossid
8c1ad1e9a6 SM10BIT_BASE - Add delays and ACKs, clear all channels before sleeping. (#5526) 2023-10-13 14:16:22 +13:00
Jesse Hills
969f6dbe13 Update Improv BLE component (#5518) 2023-10-13 14:16:22 +13:00
Cossid
6cce6d4c36 BD5758D - Add delays and ACKs (#5524) 2023-10-13 14:16:22 +13:00
Nippey
d27e5e9c97 Update htu21d.cpp, fix publishing of heater level (#5520) 2023-10-13 14:16:22 +13:00
Cossid
da3e3903dd BP1658CJ - Clear all channels before sleeping. (#5525) 2023-10-13 12:51:28 +13:00
Cossid
f5c12b50ce SM10BIT_BASE - Add delays and ACKs, clear all channels before sleeping. (#5526) 2023-10-13 12:51:19 +13:00
Jesse Hills
33ebfd221e Update Improv BLE component (#5518) 2023-10-13 12:46:46 +13:00
Cossid
7c890d8ebc BD5758D - Add delays and ACKs (#5524) 2023-10-12 19:09:07 +00:00
NP v/d Spek
04b708c336 Splits FastLed test scripts out of test1.yaml (#5522) 2023-10-13 07:20:31 +13:00
Nippey
2910eb2ef7 Update htu21d.cpp, fix publishing of heater level (#5520) 2023-10-12 10:56:30 -07:00
Jesse Hills
af3b22f8b7 Merge pull request #5516 from esphome/bump-2023.10.0b1
2023.10.0b1
2023-10-12 16:54:08 +13:00
Jesse Hills
cbc1b29f3e Merge branch 'dev' into bump-2023.10.0b1 2023-10-12 15:54:56 +13:00
Jesse Hills
f4ce8b8b6c Bump curl to 7.74.0-1.3+deb11u10 (#5517) 2023-10-12 15:52:57 +13:00
Jesse Hills
54363f1246 Bump version to 2023.10.0b1 2023-10-12 15:14:43 +13:00
Jesse Hills
11727391ad Bump version to 2023.11.0-dev 2023-10-12 15:14:43 +13:00
Jesse Hills
d500531c04 Merge branch 'dev' into bump-2023.10.0b1 2023-10-12 15:14:42 +13:00
Daniel Baulig
689dcd1e24 Add detail param to allow listing of select options in WebServer REST API (#5503) 2023-10-12 14:55:01 +13:00
Michael Hansen
2fc4e88271 Small fixes for voice assistant (#5513)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-12 14:51:29 +13:00
Mark Veinot
853d81c6dd As3935 calibration (#5366) 2023-10-12 14:27:36 +13:00
NP v/d Spek
e35de626a4 Allow manual set "Invert_display" (#5494) 2023-10-12 14:26:07 +13:00
justdaniel-gh
41f29c46d0 Fix e131 and voice_assistant sockets (#5502)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-10 23:42:38 +00:00
Oleg Tarasov
9d95f5c1da Added Nextion display error handling during setup (#5493) 2023-10-11 11:56:53 +13:00
Guillermo Ruffino
5d5cc96017 fix build lang schema for spi and i2c (#5509) 2023-10-11 11:52:40 +13:00
Jimmy Hedman
c9a8911029 Prepare protobuf for ESP-IDF >= 5 (#5510) 2023-10-11 11:51:53 +13:00
Robert Resch
c77a9ad363 Don't allow entity category "CONFIG" for sensors (#5505)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-10 07:00:05 +00:00
Jesse Hills
511af5845e Remote wake word support for voice assistant (#5229) 2023-10-10 19:52:42 +13:00
Oleg Tarasov
6b96089f02 Fixed precision for Nextion sensor with float values (#5497) 2023-10-09 19:16:12 -05:00
Jesse Hills
46be886ca6 Use platform consts (#5508) 2023-10-09 16:54:15 -05:00
Jesse Hills
be7e167c63 Deep sleep is only available on esp32 and esp8266 (#5507) 2023-10-10 09:41:28 +13:00
Ilia Sotnikov
c65d78f568 [Sprinkler] Initialize timers early to avoid crash (#5499) 2023-10-08 22:37:48 -05:00
Ilia Sotnikov
412a866de8 Move to Pillow 10.x (#5489)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-09 13:47:52 +13:00
Jesse Hills
e09c217fde Bump docker dependencies (#5501) 2023-10-09 11:13:12 +13:00
Adam Goode
af62c2d9cf Implement sensor component for MMC5983 (#5361) 2023-10-09 10:26:58 +13:00
Angel Nunez Mencias
aba3cd557a add USE_SPI define (#5500) 2023-10-08 21:01:26 +00:00
Pavlo Dudnytskyi
7e7c83b3ca Support for Haier IR protocol added (#5403) 2023-10-09 09:49:55 +13:00
Luke Ansell
ee4ccf2762 Increased debug message precision (#5496) 2023-10-09 09:20:43 +13:00
Austin
fa0dcac2c7 Initial ESP32-H2 Support (#5498) 2023-10-09 07:34:12 +13:00
Keith Burzinski
44e5b0c745 Move CONF_IRQ_PIN into const.py (#5488) 2023-10-06 00:28:51 -05:00
Clyde Stubbs
b6d5cb4142 St7789v and SPI data rate (#5472) 2023-10-04 15:18:33 -05:00
Clyde Stubbs
4e8cba49f1 MAX7219 - Update intensity (#5477) 2023-10-03 20:15:44 -05:00
Clyde Stubbs
506c2ba6c7 ST7789v - Allow predefined backlight pin to be disabled. (#5476)
* Allow predefined backlight pin to be disabled.

* Add test

* Update esphome/components/st7789v/display.py
2023-10-03 20:10:26 -05:00
kahrendt
050fa0d4c1 Fix units for SPS30 number concentration sensors (#5452) 2023-10-03 23:01:57 +13:00
kahrendt
88bb051f37 Add xor automation condition (#5453) 2023-10-03 22:58:11 +13:00
Jesse Hills
0d800958aa Merge pull request #5474 from esphome/bump-2023.9.3
2023.9.3
2023-10-03 21:25:58 +13:00
Jesse Hills
471533d041 Bump version to 2023.9.3 2023-10-03 13:35:19 +13:00
Faidon Liambotis
7dfc4c74da Tuya Number: split "multiply" to a separate option (#5458) 2023-10-03 13:35:19 +13:00
dwildstr
f709350b04 Sleep mode fix for BP5758D driver (#5461)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-03 13:35:19 +13:00
dependabot[bot]
85c5928baa Bump zeroconf from 0.115.0 to 0.115.1 (#5470)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 13:35:19 +13:00
Clyde Stubbs
f5dfbaff4b Support RP2040 hardware SPI (#5466) 2023-10-03 13:35:18 +13:00
Maxime Gauduin
689c2f11a3 add pin config for denky_d4 (#5471) 2023-10-03 13:35:18 +13:00
dependabot[bot]
f73fd97525 Bump zeroconf from 0.112.0 to 0.115.0 (#5432)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 13:35:18 +13:00
Faidon Liambotis
f38849828d Tuya Number: split "multiply" to a separate option (#5458) 2023-10-03 13:23:18 +13:00
dwildstr
e95ba57a61 Sleep mode fix for BP5758D driver (#5461)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-02 23:06:54 +00:00
dependabot[bot]
4913256597 Bump zeroconf from 0.115.0 to 0.115.1 (#5470)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 10:51:29 +13:00
dependabot[bot]
401a386219 Bump actions/setup-python from 4.7.0 to 4.7.1 (#5467)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-03 10:25:15 +13:00
Clyde Stubbs
205f41509b Support RP2040 hardware SPI (#5466) 2023-10-03 10:24:20 +13:00
Maxime Gauduin
e87c8d550b add pin config for denky_d4 (#5471) 2023-10-02 21:15:29 +00:00
De Cock Xavier
a33b8abce8 Feat/component poller suspend (#5423) 2023-10-03 09:25:13 +13:00
Jesse Hills
40523e6823 Merge pull request #5465 from esphome/bump-2023.9.2
2023.9.2
2023-10-02 21:24:01 +13:00
Jesse Hills
5e1472185c Bump version to 2023.9.2 2023-10-02 17:01:22 +13:00
Jesse Hills
af005a6554 Ensure esphome directory exists on addon startup (#5464) 2023-10-02 17:01:22 +13:00
Angel Nunez Mencias
efd31be21c Fix SPI support for second bus on 2023.9.1 (#5456) 2023-10-02 17:01:22 +13:00
Avri Chen-Roth
e9bda2810f Fix an Issue with IR Remote Climate and Whirlpool protocol toggle (#5447)
Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-10-02 17:01:22 +13:00
Clyde Stubbs
ec4777b8d0 SPI fixes for buggy components (#5446) 2023-10-02 17:01:22 +13:00
Jesse Hills
589b9e10b2 Ensure esphome directory exists on addon startup (#5464) 2023-10-02 13:45:24 +13:00
Angel Nunez Mencias
2513ede3ec Add testcases for multiple SPI buses on ESP32 Arduino (#5457) 2023-09-29 20:48:51 -05:00
Angel Nunez Mencias
0b5a57ead4 Fix SPI support for second bus on 2023.9.1 (#5456) 2023-09-29 23:34:56 +00:00
John K. Luebs
b3dc2d43a5 Do not enable SHT3x heater by default. Fixes #4886. (#5445) 2023-09-29 18:27:40 -05:00
De Cock Xavier
d3913be7e5 [ssd1351] fix: wait for the component to be at least in setup phase b… (#5454) 2023-09-29 17:08:56 -05:00
leoshusar
2c94c3d96f [BP1658CJ] Missing clock line delays and ack bit (#5448)
* fix: missing clock line delays and ack bit

* chore: remove esphome namespace from delay methods

* style: removed trailing whitespace
2023-09-29 16:40:56 +13:00
Avri Chen-Roth
4d81153150 Fix an Issue with IR Remote Climate and Whirlpool protocol toggle (#5447)
Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-09-29 14:17:32 +13:00
Clyde Stubbs
507dc5f496 SPI fixes for buggy components (#5446) 2023-09-29 00:36:31 +00:00
dependabot[bot]
4335543575 Bump zeroconf from 0.112.0 to 0.115.0 (#5432)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-29 10:58:51 +13:00
Jesse Hills
9b75121337 Merge pull request #5442 from esphome/bump-2023.9.1
2023.9.1
2023-09-28 13:05:04 +13:00
Jesse Hills
d262548d2e Bump version to 2023.9.1 2023-09-28 11:52:35 +13:00
Jesse Hills
b5b654e054 Migrate dashboard json files to /data folder instead of wiping out (#5441) 2023-09-28 11:52:35 +13:00
Marc J
dae8ab563c Tuya Number Scaling by step value (#5108) 2023-09-28 11:52:35 +13:00
Jesse Hills
12365976c4 Migrate dashboard json files to /data folder instead of wiping out (#5441) 2023-09-28 11:40:36 +13:00
Jesse Hills
4ac4492241 Fix .esphome path when not using envvar (#5440) 2023-09-28 11:20:44 +13:00
Jimmy Hedman
57b7dd0fa2 Refactor ip address representation (#5252) 2023-09-27 21:38:43 +13:00
Marc J
9d4f471855 Tuya Number Scaling by step value (#5108) 2023-09-27 07:45:21 +00:00
Jesse Hills
5751e9ec59 Merge pull request #5435 from esphome/bump-2023.9.0
2023.9.0
2023-09-27 17:19:58 +13:00
Jesse Hills
cc1b7a7a56 Bump version to 2023.9.0 2023-09-27 16:21:35 +13:00
Jesse Hills
29249cdc1b Merge pull request #5434 from esphome/bump-2023.9.0b4
2023.9.0b4
2023-09-27 13:34:33 +13:00
Jesse Hills
e5bae8187f Bump version to 2023.9.0b4 2023-09-27 12:28:12 +13:00
Clyde Stubbs
69adebfefa Fix #4896 and #4903 (#5433) 2023-09-27 12:28:12 +13:00
Guillermo Ruffino
7dabbb65d0 Wireguard keepalive remove uint16 type (#5430) 2023-09-27 12:28:11 +13:00
Kuba Szczodrzyński
b30bab8c1b LibreTiny: enable MQTT, bump to v1.4.1 (#5419) 2023-09-27 12:28:11 +13:00
Clyde Stubbs
5360e14a9c Fix #4896 and #4903 (#5433) 2023-09-27 12:25:14 +13:00
Guillermo Ruffino
86db559f6e Wireguard keepalive remove uint16 type (#5430) 2023-09-27 12:25:00 +13:00
Kuba Szczodrzyński
2f7a378c7b LibreTiny: enable MQTT, bump to v1.4.1 (#5419) 2023-09-27 10:23:21 +13:00
dependabot[bot]
607d0b4264 Bump pylint from 2.17.5 to 2.17.6 (#5429)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-26 09:28:25 +13:00
Jesse Hills
0a1ed58454 Merge pull request #5426 from esphome/bump-2023.9.0b3
2023.9.0b3
2023-09-25 16:15:14 +13:00
Jesse Hills
5f5ee9c920 Bump version to 2023.9.0b3 2023-09-25 12:10:35 +13:00
dependabot[bot]
0aeebdd289 Bump zeroconf from 0.108.0 to 0.112.0 (#5392)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-25 12:10:35 +13:00
Odd Stråbø
33e2aa341e dallas: limit addresses to 64 bits (#5413) 2023-09-25 12:10:35 +13:00
Ilia Sotnikov
a42788812e [RP2040W] Fix WiFi bootloop upon LibreTiny support (#5414) 2023-09-25 12:10:35 +13:00
Clyde Stubbs
b07a038bc8 Fix SPI inverted clock on ESP8266 (#5416) 2023-09-25 12:10:34 +13:00
Kapil Yedidi
17e1d4c245 Fix typo in documentation (#5425) 2023-09-25 12:05:56 +13:00
dependabot[bot]
a031cc3b84 Bump zeroconf from 0.108.0 to 0.112.0 (#5392)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-25 10:25:51 +13:00
dependabot[bot]
c34d5111fc Bump actions/checkout from 4.0.0 to 4.1.0 (#5420)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-25 10:23:40 +13:00
Odd Stråbø
727056a28c dallas: limit addresses to 64 bits (#5413) 2023-09-25 10:15:28 +13:00
Ilia Sotnikov
0ca8dcd08e [RP2040W] Fix WiFi bootloop upon LibreTiny support (#5414) 2023-09-24 22:44:55 +13:00
Andrew Garrett
3c7c4e1dba Make ESPHome data dir configurable (#5417) 2023-09-24 22:34:37 +13:00
Clyde Stubbs
518ecb4cc4 Fix SPI inverted clock on ESP8266 (#5416) 2023-09-21 21:15:50 -07:00
Jesse Hills
55e36ab982 Merge pull request #5412 from esphome/bump-2023.9.0b2
2023.9.0b2
2023-09-21 12:52:21 +12:00
Jesse Hills
90835ab917 Bump version to 2023.9.0b2 2023-09-21 10:35:38 +12:00
Samuel Sieb
5b46088ae4 support keypads with pulldowns (#5404)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-09-21 10:35:38 +12:00
Kuba Szczodrzyński
d7e267eca5 Wizard: fix colored text in input prompts (#5313) 2023-09-21 10:35:38 +12:00
Trent Houliston
807c47a076 Make the pulse meter timeout on startup when no pulses are received (#5388) 2023-09-21 10:35:38 +12:00
Kevin P. Fleming
7ebe6a5894 http_request: Cleanups and safety improvements (#5360) 2023-09-21 10:35:37 +12:00
Anthony
41c829fa32 Remove Wi-Fi dependency from Midea component (#5394) 2023-09-21 10:35:37 +12:00
Joris S
8f1ce8c7f7 Climate preset fix (#5407) 2023-09-21 10:35:37 +12:00
Samuel Sieb
e55636ed52 fix handling of web server version (#5405)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-09-21 10:35:37 +12:00
Samuel Sieb
e886262055 fix disabled wifi power on 8266 (#5409)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-09-21 10:35:37 +12:00
Philipp Helo Rehs
2fa7f8c511 Add E-Trailer Gaslevel support to Mopeka Std Check (#5397)
* Add E-Trailer Gaslevel support to Mopeka Std Check

Signed-off-by: Philipp Helo Rehs <Philipp.Rehs@hhu.de>

* fix format

---------

Signed-off-by: Philipp Helo Rehs <Philipp.Rehs@hhu.de>
Co-authored-by: Philipp Helo Rehs <Philipp.Rehs@hhu.de>
2023-09-21 10:35:37 +12:00
Trevor North
4622ef770d Add shelly-dimmer-stm32 51.7 to known versions (#5400)
This version removes support for no-neutral setups in favor of fixing flickering some users have experienced.
2023-09-21 10:35:37 +12:00
rmmacias
d76f18b4f2 Update radon_eye_listener.cpp (#5401)
New devices identifiers do not star by the hardcoded string. FR:RE222 is the 8-char length string of my devices bought in 2023. This proposal aims at solve the topic by making the detection track devices starting only by FR:R
2023-09-21 10:35:37 +12:00
phoenixswiss
ec20778d83 Fix Waveshare 7.5v2 epaper screens are always powered on (#5283) 2023-09-21 10:35:37 +12:00
Michael Hansen
b3ca71c6fb Add patch to apt install (#5389) 2023-09-21 10:35:37 +12:00
Samuel Sieb
1100f67b66 support keypads with pulldowns (#5404)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-09-21 10:26:36 +12:00
Kuba Szczodrzyński
056a28906b Wizard: fix colored text in input prompts (#5313) 2023-09-21 10:09:23 +12:00
Trent Houliston
2c2821cd96 Make the pulse meter timeout on startup when no pulses are received (#5388) 2023-09-21 10:04:03 +12:00
Kevin P. Fleming
157a3e53dd http_request: Cleanups and safety improvements (#5360) 2023-09-21 10:02:29 +12:00
Anthony
61edf8c196 Remove Wi-Fi dependency from Midea component (#5394) 2023-09-21 09:30:22 +12:00
Joris S
397f57ce74 Climate preset fix (#5407) 2023-09-21 09:28:03 +12:00
Samuel Sieb
bf253c21fa fix handling of web server version (#5405)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-09-21 09:25:16 +12:00
Samuel Sieb
e3eef1cc6d fix disabled wifi power on 8266 (#5409)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-09-21 09:20:54 +12:00
Philipp Helo Rehs
11f6e555f9 Add E-Trailer Gaslevel support to Mopeka Std Check (#5397)
* Add E-Trailer Gaslevel support to Mopeka Std Check

Signed-off-by: Philipp Helo Rehs <Philipp.Rehs@hhu.de>

* fix format

---------

Signed-off-by: Philipp Helo Rehs <Philipp.Rehs@hhu.de>
Co-authored-by: Philipp Helo Rehs <Philipp.Rehs@hhu.de>
2023-09-17 17:30:52 +12:00
Fabian
164631fcec Ci find YAML tests dynamically (#5399)
* Find all YAML test files dynamically.

* Merge error

* GitHub set-ouput syntax upgrade.

---------

Co-authored-by: Your Name <you@example.com>
2023-09-17 17:24:31 +12:00
Trevor North
a61e3fadf6 Add shelly-dimmer-stm32 51.7 to known versions (#5400)
This version removes support for no-neutral setups in favor of fixing flickering some users have experienced.
2023-09-17 17:20:31 +12:00
rmmacias
b5f2d69ca5 Update radon_eye_listener.cpp (#5401)
New devices identifiers do not star by the hardcoded string. FR:RE222 is the 8-char length string of my devices bought in 2023. This proposal aims at solve the topic by making the detection track devices starting only by FR:R
2023-09-17 17:18:51 +12:00
phoenixswiss
55b5c0fc32 Fix Waveshare 7.5v2 epaper screens are always powered on (#5283) 2023-09-14 06:20:21 +00:00
Michael Hansen
280b090dfc Add patch to apt install (#5389) 2023-09-13 18:13:55 -05:00
Jesse Hills
2d53dd05d8 Merge pull request #5386 from esphome/bump-2023.9.0b1
2023.9.0b1
2023-09-13 15:30:39 +12:00
Jesse Hills
9d97807587 Bump version to 2023.10.0-dev 2023-09-13 14:22:39 +12:00
vr6racer
11433c8c17 SX1509 component (#5385) 2023-09-13 14:14:54 +12:00
Jesse Hills
68a2c45edf Bump version to 2023.9.0b1 2023-09-13 13:05:06 +12:00
Jesse Hills
d2616cd6c6 Merge branch 'dev' into bump-2023.9.0b1 2023-09-13 13:05:05 +12:00
Keith Burzinski
736dbfac13 Add IDF 5 test yaml, add adc to IDF tests, fix adc for IDF 5 (#5379) 2023-09-13 11:36:17 +12:00
rufuswilson
b8fa737bc9 Force heater off on setup (#5161)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-09-13 10:20:00 +12:00
Tercio Filho
bf5352b44e Modbus Controller added some features (#5318) 2023-09-13 10:15:01 +12:00
Jesse Hills
bff74af882 Workflow updates (#5384) 2023-09-13 10:06:32 +12:00
Jimmy Hedman
dadbc1aefa Enable IPv6 for ESP8266 and Raspberry pi pico w (RP2040) (#4759) 2023-09-13 08:05:02 +12:00
Jesse Hills
fc354eec0e Attempt to fix rp2040 adc with vcc (#5378) 2023-09-12 14:14:10 +12:00
dependabot[bot]
47b1b45828 Bump black from 23.7.0 to 23.9.1 (#5377)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-09-11 22:38:58 +00:00
dependabot[bot]
e6da2313e6 Bump zeroconf from 0.102.0 to 0.108.0 (#5376)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 10:02:13 +12:00
Jesse Hills
fe81bcc003 Use /data directory for .esphome folder when running as HA add-on (#5374) 2023-09-12 09:26:48 +12:00
Daniel Dunn
10eee47b6b Make string globals persist-able using fixed size allocations (#5296)
Co-authored-by: Daniel Dunn <dannydunn@eternityforest.com>
2023-09-12 09:26:00 +12:00
Stijn Tintel
c930c86cfa debug: add ESP32-C6 support (#5354) 2023-09-12 08:19:26 +12:00
Péter Sárközi
d3196e0e34 Fix disabled wifi crash on boot (#5370) 2023-09-12 08:12:56 +12:00
Kevin P. Fleming
deb34c9473 time: Make std::string version of strftime() avoid runaway memory allocations (#5348) 2023-09-12 08:02:07 +12:00
Kuba Szczodrzyński
892d2ce34f Bump LibreTiny version to 1.4.0 (#5375) 2023-09-12 07:15:24 +12:00
Lubos Horacek
b107948c47 Wireguard component (#4256)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Simone Rossetto <simros85@gmail.com>
Co-authored-by: Thomas Bernard <thomas0bernard@gmail.com>
2023-09-12 07:13:24 +12:00
Clyde Stubbs
d2648657fb Native SPI RGB LED component (#5288)
* Add testing branch to workflow

* Add workflow

* Checkpoint

* Align SPI data rates in c++ code with Python code.

* Checkpoint

* CI fixes

* Update codeowners

* Workflow cleanup

* Rename to spi_rgb_led

* Rename header file

* Clang tidy

* Disable spi after transfer.

* Move enable() to where it belongs

* Call spi_setup before enable

* Clang tidy

* Add test

* Rename to spi_led_strip

* Include 'defines.h'

* Fix CODEOWNERS

* Migrate data rate to new style setting.

* Remove defines.h

* Fix class name

* Fix name in .py

* And more more name tidy up.

---------

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-09-10 21:20:06 -05:00
Kevin P. Fleming
32b103eb1d Use black-pre-commit-mirror to speed up pre-commit runs. (#5372) 2023-09-11 07:42:42 +12:00
Flaviu Tamas
e66047e072 Add BMI160 support (#5143)
* Add BMI160 support

* BMI160: use set_timeout for delay

* Add support for old compilers

Fix "warning: missing terminating ' character"

* Increase power-on delay to be more conservative

* Add helper for reading little-endian data over i2c

* Replace configuration names with globals

Note: for testing with external components, you will need to comment out the import & define your own CONF_GYROSCOPE_X, etc, in this file

* Improve icons

* Fix tests & lint
2023-09-09 21:25:09 -05:00
Kevin P. Fleming
0c84224ca2 Move CONF_PHASE_A/B/C constants to const.py. (#5304) 2023-09-09 18:19:54 -05:00
Ilia Sotnikov
7bb67ae94b [ADC] Support measuring VCC on Raspberry Pico (W) (#5335)
* [ADC] Support measuring VCC on Raspberry Pico (W)

Added support for measuring VCC on Raspberry Pico (W) with ADC.
GPIO pin is provided as `VCC`, same as with ESP8266. VSYS is the voltage
being actually processed, and might have an offset from actual power
supply voltage (e.g. USB on VBUS) due to voltage drop on
Schottky diode between VSYS and VBUS on Rasberry Pico. The offset has
experimentally been found to be ~0.25V on Pico W and ~0.1 on Pico,
presumably due to different power consumption.

Example usage:

	sensor:
	  - platform: adc
	    pin: VCC
	    name: "VSYS"

* + Added tests for VCC measuring on `rpipicow` board
2023-09-09 04:00:45 -05:00
dependabot[bot]
ccc30116ba Bump pytest from 7.4.1 to 7.4.2 (#5357)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.1 to 7.4.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.4.1...7.4.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>
2023-09-09 09:20:54 +12:00
Kuba Szczodrzyński
9cf115a752 Fix dashboard download for ESP32 variants (#5355) 2023-09-09 09:20:26 +12:00
Péter Sárközi
d9523a0cbf Fix repeat.count = 0 case (#5364)
* Only play first action if count is non-zero

* Add test to  yaml

* Update test5.yaml
2023-09-09 09:10:20 +12:00
dependabot[bot]
2fd6942de4 Bump zeroconf from 0.88.0 to 0.102.0 (#5368)
Bumps [zeroconf](https://github.com/python-zeroconf/python-zeroconf) from 0.88.0 to 0.102.0.
- [Release notes](https://github.com/python-zeroconf/python-zeroconf/releases)
- [Changelog](https://github.com/python-zeroconf/python-zeroconf/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python-zeroconf/python-zeroconf/compare/0.88.0...0.102.0)

---
updated-dependencies:
- dependency-name: zeroconf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-09 08:57:35 +12:00
dependabot[bot]
b19a7e006e Bump actions/cache from 3.3.1 to 3.3.2 (#5367)
Bumps [actions/cache](https://github.com/actions/cache) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.3.1...v3.3.2)

---
updated-dependencies:
- dependency-name: actions/cache
  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-09-09 08:57:10 +12:00
Clyde Stubbs
5c26f95a4b Refactor SPI code; Add ESP-IDF hardware support (#5311)
* Checkpoint

* Checkpoint

* Checkpoint

* Revert hal change

* Checkpoint

* Checkpoint

* Checkpoint

* Checkpoint

* ESP-IDF working

* clang-format

* use bus_list

* Add spi_device; fix 16 bit transfer.

* Enable multi_conf;
Fix LSB 16 bit transactions

* Formatting fixes

* Clang-format, codeowners

* Add test

* Formatting

* clang tidy

* clang-format

* clang-tidy

* clang-format

* Checkpoint

* Checkpoint

* Checkpoint

* Revert hal change

* Checkpoint

* Checkpoint

* Checkpoint

* Checkpoint

* ESP-IDF working

* clang-format

* use bus_list

* Add spi_device; fix 16 bit transfer.

* Enable multi_conf;
Fix LSB 16 bit transactions

* Formatting fixes

* Clang-format, codeowners

* Add test

* Formatting

* clang tidy

* clang-format

* clang-tidy

* clang-format

* Clang-tidy

* Clang-format

* clang-tidy

* clang-tidy

* Fix ESP8266

* RP2040

* RP2040

* Avoid use of spi1 as id

* Refactor SPI code.
Add support for ESP-IDF hardware SPI

* Force SW only for RP2040

* Break up large transfers

* Add interface: option for spi.
validate pins in python.

* Can't use match/case with Python 3.9.
Check for inverted pins.

* Work around target_platform issue with

* Remove debug code

* Optimize write_array16

* Show errors in hex

* Only one spi on ESP32Cx variants

* Ensure bus is claimed before asserting /CS.

* Check on init/deinit

* Allow maximum rate write only SPI on GPIO MUXed pins.

* Clang-format

* Clang-tidy

* Fix issue with reads.

* Finger trouble...

* Make comment about missing SPI on Cx variants

* Pacify CI clang-format. Did not complain locally??

* Restore 8266 to its former SPI glory

* Fix per clang-format

* Move validation and choice of SPI into Python code.

* Add test for interface: config

* Fix issues found on self-review.

---------

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-09-08 02:27:19 -05:00
Keith Burzinski
ce171f5c00 Fix cpu_ll_get_cycle_count() deprecated warning (#5353) 2023-09-07 21:49:12 +12:00
Keith Burzinski
ab872b075a Fix PN532 for IDF 5 and ultralight enhancements (#5352) 2023-09-07 21:48:44 +12:00
Jesse Hills
87395d259e Allow "--device SERIAL" on cli to flash only via serial (#5351) 2023-09-06 20:22:39 -05:00
Jesse Hills
72f29b1283 Allow upload command to flash file via serial (#5274) 2023-09-07 10:15:54 +12:00
Jesse Hills
f2a6f18553 esp32: Extra build customization (#5322) 2023-09-06 17:02:21 +12:00
Jesse Hills
8cac5ca90c Only run ci-docker when ci-docker workflow changes (#5347) 2023-09-06 15:32:14 +12:00
Jesse Hills
01ec414873 Merge pull request #5345 from esphome/bump-2023.8.3
2023.8.3
2023-09-06 11:31:23 +12:00
dependabot[bot]
6b0fb3dd06 Bump platformio from 6.1.10 to 6.1.11 (#5323)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-09-05 23:31:21 +00:00
dependabot[bot]
e89c6494a6 Bump tornado from 6.3.2 to 6.3.3 (#5236)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-06 10:45:17 +12:00
dependabot[bot]
eff76d578b Bump flake8 from 6.0.0 to 6.1.0 (#5171)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-06 10:44:47 +12:00
Christian
76ebbfefd2 Integration LightwaveRF switches (#4812)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-09-06 10:33:49 +12:00
Jesse Hills
150c9b5fa3 Bump version to 2023.8.3 2023-09-06 10:14:19 +12:00
Mat931
55df88d7ae Fix checksum calculation for pipsolar (#5299) 2023-09-06 10:14:18 +12:00
kahrendt
619787e6d2 Bugfix: disable channels after IO if multiple tca9548a I2C multiplexers are configured (#5317) 2023-09-06 10:14:18 +12:00
Jesse Hills
3f8bad3ed1 Attempt to fix secret blurring (#5326) 2023-09-06 10:14:18 +12:00
luka6000
c146712b16 fix to PR # 3887 MQTT connection not using discovery: false (#5275) 2023-09-06 10:14:18 +12:00
Sebastian Rasor
2cabe59c22 Introduce cv.temperature_delta and fix problematic thermostat configuration behavior (#5297) 2023-09-06 10:14:18 +12:00
Stijn Tintel
feba9ffdc4 mdns: bump IDF mdns component to 1.2.0 (#5217) 2023-09-06 10:11:07 +12:00
JJ
74ab940aff Adding DFRobot Ozone Sensor Support (sen0321) (#4782) 2023-09-06 10:09:22 +12:00
JJ
82c1988a2d Support MaxBotix XL in addition to HRXL (#4510) 2023-09-06 09:59:23 +12:00
Jimmy Hedman
ac5c6ec288 Add debug component to all tests (#5333) 2023-09-06 07:38:58 +12:00
Pavlo Dudnytskyi
47735d1dae Fixed default temperature step values for haier climate (#5330) 2023-09-06 07:37:01 +12:00
dependabot[bot]
35b5dadb99 Bump pytest from 7.4.0 to 7.4.1 (#5342)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-06 07:32:00 +12:00
esphomebot
e2d784a5b5 Synchronise Device Classes from Home Assistant (#5328) 2023-09-06 07:29:41 +12:00
Keith Burzinski
b7a16d5a59 Add defines.h to ethernet_component.h for ENABLE_IPV6 (#5344) 2023-09-05 22:35:20 +12:00
Jimmy Hedman
97dcbe84da Disable IPv6 when config explicitly says false (#5310) 2023-09-05 02:56:17 -05:00
Clyde Stubbs
32b24726ed Add Lilygo T-Embed to st7789v display config. (#5337)
* Add Lilygo T-Embed to st7789v display config.

* Move all configuration into the Python code.
Add presets for TTGO.
All preset configuration can be overridden.

* Add Adafruit S2 pin presets

* Add test

* Add funhouse pins.

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>

* Keep ordering of options consistent

* Remove unused declarations

---------

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-09-05 02:01:28 -05:00
dependabot[bot]
343278b291 Bump actions/checkout from 3 to 4 (#5341)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 18:11:46 +12:00
Jesse Hills
b11824b058 libretiny: fix uart_port framework config (#5343) 2023-09-05 02:33:42 +00:00
kahrendt
562f7c8718 Debug component: add free PSRAM sensor (#5334)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-09-05 14:02:59 +12:00
mkaiser
d382ca2401 Extend ESP32 CAN bit rates /bus speed support (#5280)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: mkaiser <mkaiser@techfak.uni-bielefeld.de>
2023-09-05 10:27:58 +12:00
Kuba Szczodrzyński
a9630ac847 Support for LibreTiny platform (RTL8710, BK7231 & other modules) (#3509)
Co-authored-by: Kuba Szczodrzyński <kuba@szczodrzynski.pl>
Co-authored-by: Sam Neirinck <git@samneirinck.com>
Co-authored-by: David Buezas <dbuezas@users.noreply.github.com>
Co-authored-by: Stroe Andrei Catalin <catalin2402@gmail.com>
Co-authored-by: Sam Neirinck <github@samneirinck.be>
Co-authored-by: Péter Sárközi <xmisterhu@gmail.com>
Co-authored-by: Hajo Noerenberg <hn@users.noreply.github.com>
2023-09-05 10:16:08 +12:00
Keith Burzinski
22c0b0abaa Tweak Improv serial to build in IDF 5 (#5331) 2023-09-04 21:47:53 +00:00
Jimmy Hedman
aabe0091cc Prepare api and time for ESP-IDF >= 5 (#5332) 2023-09-04 15:51:04 -05:00
croessi
3d9af2a67c Added Handling for Nack "file not found" (#5338) 2023-09-05 08:40:46 +12:00
Jesse Hills
4ae582c305 Bump esphome-dashboard to 20230904.0 (#5339) 2023-09-04 20:43:17 +12:00
Mat931
5fdafc00e6 Fix checksum calculation for pipsolar (#5299) 2023-09-02 21:54:03 +12:00
Christian
2165960ba1 add heating functionality to SI7021 (#4828)
* add heating functoinality

* add test

* add heat

* fix

* fix

* fix

* fix

* fix

* fix sensor

* restore class

* Update esphome/components/htu21d/sensor.py

* Update esphome/components/htu21d/sensor.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/htu21d/sensor.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-09-01 19:03:30 -05:00
Clyde Stubbs
2bb5f53b98 Make uart error message go away (#5329)
* Make error message in log go away.

* Test for IDF version.
2023-09-01 17:10:08 -05:00
kahrendt
211b3eddea Bugfix: disable channels after IO if multiple tca9548a I2C multiplexers are configured (#5317) 2023-09-02 08:55:59 +12:00
Jesse Hills
bec53f97a2 Attempt to fix secret blurring (#5326) 2023-09-02 08:41:52 +12:00
Kuba Szczodrzyński
c3332e4a39 Add dashboard API to get firmware binaries (#4675)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-09-01 18:17:33 +12:00
Josh Barnard
f8a03be2f1 Adding heating coil and fan icons, enum device_class (#5325)
* Adding heating cool and fan icons.

* Adding Enum device_class as well.
2023-09-01 00:10:42 -05:00
dependabot[bot]
712634b301 Bump zeroconf from 0.86.0 to 0.88.0 (#5315)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-01 14:03:10 +12:00
Daniel Dunn
19d53c6643 Use gzip compression for the web server component's static resources (#5291)
Co-authored-by: Daniel Dunn <dannydunn@eternityforest.com>
2023-09-01 14:02:26 +12:00
Jimmy Hedman
f14419bab5 Bump Arduino Pico to 3.4.0 (#5321) 2023-09-01 13:21:01 +12:00
luka6000
3003485dc6 fix to PR # 3887 MQTT connection not using discovery: false (#5275) 2023-09-01 13:20:21 +12:00
Clyde Stubbs
01f6791d1c 7789 controller fixes take 2 (#5320)
* Fix 7789 clock mode and increase clock rate.

* Reverse change from dev.

* Speed up 8 bit color.

* Tweak buffer size
2023-08-31 23:43:24 +00:00
Clyde Stubbs
cdb67fc90e Add extra SLPOUT for waking up some ST7789 chips (#5319) 2023-08-31 09:12:25 +00:00
Keith Burzinski
78cb098691 Add PSRAM mode and speed config (#5312)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-08-29 20:50:29 +12:00
dependabot[bot]
45152ad55e Bump zeroconf from 0.80.0 to 0.86.0 (#5308)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-29 19:04:37 +12:00
J. Nick Koston
45879e3100 Fix legacy zeroconf record update method (#5294) 2023-08-29 17:25:43 +12:00
Keith Burzinski
c4adb30ab2 Update PSRAM config params for IDF4+ (#5298) 2023-08-29 17:11:58 +12:00
Sebastian Rasor
b20bae23cc Introduce cv.temperature_delta and fix problematic thermostat configuration behavior (#5297) 2023-08-23 13:01:34 +12:00
Christian
11ed2d5f18 Add Invert method for SSD1306 (#5292) 2023-08-23 10:13:38 +12:00
dependabot[bot]
f814b6d47c Bump platformio from 6.1.9 to 6.1.10 (#5237)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-08-21 04:27:17 +00:00
Jesse Hills
a67b92a04c Merge pull request #5286 from esphome/bump-2023.8.2
2023.8.2
2023-08-21 13:31:33 +12:00
Stefan Rado
2a48b810a4 Fix equality check when setting current-based cover position (#5167) 2023-08-21 12:35:13 +12:00
Jesse Hills
9fb8e9edef Bump version to 2023.8.2 2023-08-21 12:33:49 +12:00
Clyde Stubbs
d2bccbe8ac Reserve keyword "clock" (#5279) 2023-08-21 12:33:48 +12:00
Jesse Hills
e44a60e814 Change htu21d sensors from required to optional (#5285) 2023-08-21 12:33:48 +12:00
Clyde Stubbs
02a71cb6a7 Align SPI data rates in C++ code with Python (#5284) 2023-08-21 12:33:48 +12:00
mwolter805
e600784ebf Resolve offline ESPs in dashboard when using ESPHOME_DASHBOARD_USE_PING=true (#5281) 2023-08-21 12:33:48 +12:00
Jesse Hills
5e19a3b892 Move libcairo to all architectures in docker (#5276) 2023-08-21 12:33:48 +12:00
Rob Deutsch
0443310385 Bump arduino-heatpumpir to v1.0.23 (#5269) 2023-08-21 12:20:00 +12:00
Clyde Stubbs
03ab23fec8 Reserve keyword "clock" (#5279) 2023-08-21 12:17:22 +12:00
Jesse Hills
da8afd36b2 Change htu21d sensors from required to optional (#5285) 2023-08-21 12:16:14 +12:00
Austin
fe7893d1b3 Support for ESP32-C2 & ESP32-C6 (#4377)
Co-authored-by: Stijn Tintel <stijn@linux-ipv6.be>
2023-08-21 09:42:03 +12:00
jayme-github
d19bf5d6ee Add support for ESP32-{S2,S3,C3} to debug component (#4731) 2023-08-21 09:34:50 +12:00
Clyde Stubbs
bfdcfa4766 Align SPI data rates in C++ code with Python (#5284) 2023-08-21 08:57:02 +12:00
mwolter805
c47c1a7867 Resolve offline ESPs in dashboard when using ESPHOME_DASHBOARD_USE_PING=true (#5281) 2023-08-20 12:15:45 -07:00
Jesse Hills
f16a24ddf4 Move libcairo to all architectures in docker (#5276) 2023-08-18 19:13:46 +12:00
Jesse Hills
8bf112669f Merge pull request #5273 from esphome/bump-2023.8.1
2023.8.1
2023-08-18 09:09:07 +12:00
Jesse Hills
4278664208 Bump version to 2023.8.1 2023-08-18 08:12:42 +12:00
Jesse Hills
0789657fd5 Change haier from AUTO to HEAT_COOL (#5267) 2023-08-18 08:12:42 +12:00
Mat931
b566c78f00 Fix checksum calculation for sml (#5271) 2023-08-18 08:12:42 +12:00
Jesse Hills
c287e529a8 Change haier from AUTO to HEAT_COOL (#5267) 2023-08-18 08:06:21 +12:00
Clyde Stubbs
164d05fdce Add manufacturer data config to BLE server (#5251) 2023-08-18 08:05:25 +12:00
SeByDocKy
c11c4dad2f Add pmwcs3 capacitive soil moisture & temperature sensor component (#4624)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-08-18 08:03:39 +12:00
Jimmy Hedman
0af8d0b7ea Remove support for ESP-IDF version < 4 (#5261) 2023-08-18 08:02:57 +12:00
Mat931
2b4ed0c273 Fix checksum calculation for sml (#5271) 2023-08-18 07:57:18 +12:00
dependabot[bot]
9fc50e8dbc Bump click from 8.1.6 to 8.1.7 (#5272)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-17 19:41:24 +00:00
Jesse Hills
a35122231c Merge pull request #5264 from esphome/bump-2023.8.0
2023.8.0
2023-08-17 16:00:56 +12:00
Jesse Hills
7e4ee32b54 Bump version to 2023.8.0 2023-08-17 14:33:35 +12:00
Jesse Hills
7df80eadcf Merge pull request #5263 from esphome/bump-2023.8.0b4
2023.8.0b4
2023-08-17 14:30:18 +12:00
Jesse Hills
2aaba1d2b8 Bump version to 2023.8.0b4 2023-08-17 13:04:32 +12:00
dependabot[bot]
7c129a4018 Bump zeroconf from 0.74.0 to 0.80.0 (#5260)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-17 13:04:32 +12:00
Jimmy Hedman
cb66ce069e Add delay before enabling ipv6 (#5256) 2023-08-17 13:04:31 +12:00
Pierre Gordon
a27e72362a Add libfreetype-dev Debian package for armv7 Docker builds (#5262) 2023-08-17 13:04:31 +12:00
dependabot[bot]
c5be5e6d12 Bump zeroconf from 0.74.0 to 0.80.0 (#5260)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-17 12:23:44 +12:00
Jimmy Hedman
63fc16d872 Add delay before enabling ipv6 (#5256) 2023-08-17 12:22:37 +12:00
Pierre Gordon
5f99ed943a Add libfreetype-dev Debian package for armv7 Docker builds (#5262) 2023-08-17 12:22:04 +12:00
Jesse Hills
f44e5d3142 Merge pull request #5258 from esphome/bump-2023.8.0b3
2023.8.0b3
2023-08-16 13:25:54 +12:00
Jesse Hills
532163738e Bump version to 2023.8.0b3 2023-08-16 11:49:08 +12:00
Regev Brody
63fa922547 Add configuration flow abilites to the ld2410 component (#4434) 2023-08-16 11:49:07 +12:00
Carson Full
48e4cb5ae2 Fix IDFI2CBus::writev ignoring stop parameter (#4840)
Co-authored-by: Alexander Dimitrov <admin@sharkydog.info>
2023-08-16 11:49:07 +12:00
mulder-fbi
ff8a73c2d1 Fix 24 bit signed integer parsing in sml parser (#5250) 2023-08-16 11:49:07 +12:00
Sergey Dudanov
afd26c6f1a rmt_base additional minor changes (#5245) 2023-08-16 11:49:07 +12:00
MrEditor97
67b06a88b2 Change XL9535 setup_priority to IO (#5246) 2023-08-16 11:49:07 +12:00
Regev Brody
5cb5594288 Add configuration flow abilites to the ld2410 component (#4434) 2023-08-16 11:31:18 +12:00
Carson Full
87629191b3 Fix IDFI2CBus::writev ignoring stop parameter (#4840)
Co-authored-by: Alexander Dimitrov <admin@sharkydog.info>
2023-08-16 11:13:43 +12:00
Sergey Dudanov
4a518e3e7a remote_base: change dumpers log level (#5253) 2023-08-16 11:11:44 +12:00
mulder-fbi
6089526975 Fix 24 bit signed integer parsing in sml parser (#5250) 2023-08-16 10:52:56 +12:00
Sergey Dudanov
b9e9223fdd rmt_base additional minor changes (#5245) 2023-08-15 07:21:22 +12:00
MrEditor97
e963eedb64 Change XL9535 setup_priority to IO (#5246) 2023-08-15 07:14:08 +12:00
MrEditor97
3b2c61e813 Updated my username in Code Owners (#5247) 2023-08-15 07:12:03 +12:00
Jesse Hills
265e019381 Merge pull request #5244 from esphome/bump-2023.8.0b2
2023.8.0b2
2023-08-14 12:48:17 +12:00
Jesse Hills
560e36a65c Bump version to 2023.8.0b2 2023-08-14 11:09:49 +12:00
Jesse Hills
b05a3fbb55 Fix duplicate tuya time warning (#5243) 2023-08-14 11:09:48 +12:00
Kjell Braden
3a899e28dc tuya: add time sync callback only once to prevent memleak (#5234) 2023-08-14 11:09:48 +12:00
Pavlo Dudnytskyi
f26238e824 Fixing smartair2 protocol implementation if no Wi-Fi (#5238) 2023-08-14 11:09:48 +12:00
Sergey Dudanov
3717e34bba fix midea: undo approved PR#4053 (#5233) 2023-08-14 11:09:48 +12:00
Steve Rodgers
be6f95d43e pca9554 cache reads (#5137) 2023-08-14 11:09:48 +12:00
Pavlo Dudnytskyi
99a765dc06 New features added for Haier integration (#5196)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-08-14 11:09:48 +12:00
Jesse Hills
351e7ea16b Expose start to speaker interface (#5228) 2023-08-14 11:09:48 +12:00
Samuel Sieb
2fa79a2e2f fix aeha data template (#5231)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-08-14 11:09:48 +12:00
Jesse Hills
44a917929d Read string of bool env and match against well known values (#5232) 2023-08-14 11:09:48 +12:00
Jesse Hills
2dd4aa7bf6 Fix duplicate tuya time warning (#5243) 2023-08-14 10:09:20 +12:00
Kjell Braden
4c1af007ca tuya: add time sync callback only once to prevent memleak (#5234) 2023-08-14 09:09:51 +12:00
Pavlo Dudnytskyi
08013be6dd Fixing smartair2 protocol implementation if no Wi-Fi (#5238) 2023-08-14 09:08:18 +12:00
Sergey Dudanov
0daf4545a9 fix midea: undo approved PR#4053 (#5233) 2023-08-14 09:06:04 +12:00
Steve Rodgers
1269bf9791 pca9554 cache reads (#5137) 2023-08-12 00:50:33 +00:00
Pavlo Dudnytskyi
5cb21324a1 New features added for Haier integration (#5196)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-08-11 05:51:53 +00:00
Jesse Hills
3eef80506b Expose start to speaker interface (#5228) 2023-08-11 16:21:44 +12:00
Samuel Sieb
283d9a0f5f fix aeha data template (#5231)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-08-11 16:21:24 +12:00
Jesse Hills
a84365659b Read string of bool env and match against well known values (#5232) 2023-08-11 16:20:58 +12:00
Jesse Hills
21ebc7f95b Merge pull request #5224 from esphome/bump-2023.8.0b1
2023.8.0b1
2023-08-10 19:17:58 +12:00
Jesse Hills
72e72d7d4b Fix duplicate 2023-08-10 18:40:13 +12:00
Jesse Hills
db9dc11022 Bump version to 2023.9.0-dev 2023-08-10 17:30:26 +12:00
Jesse Hills
02ed2c0ebe Bump version to 2023.8.0b1 2023-08-10 17:30:26 +12:00
Jesse Hills
0f506ea8eb Merge branch 'dev' into bump-2023.8.0b1 2023-08-10 17:30:26 +12:00
Keith Burzinski
8e7e8da4a3 Tweak Color init because IDF 5+ (#5221) 2023-08-10 17:11:57 +12:00
Samuel Sieb
b56c606523 add value option to timeout filter (#5222)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-08-10 17:11:03 +12:00
Francesco Ciocchetti
f457269a68 Add missing on_(arming|pending|armed_home|armed_night|armed_away|disarmed) triggers to alarm_control_panel (#5219) 2023-08-10 17:09:21 +12:00
matthias882
5b0b9da0b9 Daly BMS improvements (#3388)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Samuel Sieb <samuel-github@sieb.net>
2023-08-10 17:05:01 +12:00
Greg Cormier
0ed0bdc655 New PM sensor Panasonic SN-GCJA5 (#4988) 2023-08-10 17:04:22 +12:00
kahrendt
a8fa4b56f9 New component: Add support for bmp581 pressure and temperature sensors (#4657) 2023-08-08 17:05:08 +12:00
dependabot[bot]
cd514b140e Bump platformio from 6.1.7 to 6.1.9 (#5066)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-08-08 14:31:49 +12:00
Rudd-O
f3329fdc8c Add KMeterISO component. (#5170)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-08-08 12:32:34 +12:00
dependabot[bot]
689bbf2419 Bump pyupgrade from 3.9.0 to 3.10.1 (#5189)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-08-07 23:59:46 +00:00
Francesco Ciocchetti
a6b89e4e8a Add arm night to alarm control panel (#5186) 2023-08-08 11:57:40 +12:00
Stijn Tintel
ffd2cb9814 ledc: check SOC_LEDC_SUPPORT_APB_CLOCK (#5212) 2023-08-07 23:47:57 +00:00
dependabot[bot]
1d5f088740 Bump pytest-asyncio from 0.21.0 to 0.21.1 (#5187)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-08 11:21:51 +12:00
Stijn Tintel
4e7011c25d esp32_ble_beacon: enable CONFIG_BT_BLE_42_FEATURES_SUPPORTED (#5211) 2023-08-08 11:18:06 +12:00
Stijn Tintel
f4ac176d77 core: read ESP32 MAC address from eFuse if IEEE802.15.4 is supported (#5176) 2023-08-07 22:45:50 +00:00
Jesse Hills
e4cf7b86fa Add socket define for rp2040 dev (#4968) 2023-08-08 10:22:10 +12:00
Stijn Tintel
9876d5276c i2c: fix build on ESP-IDF >= 5.1 (#5200)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-08-08 09:51:22 +12:00
Jesse Hills
0b1b25191d Add read interface to microphone (#5131) 2023-08-08 09:45:56 +12:00
Jimmy Hedman
9980b9972f Change MQTT client for ESP32 Arduino (#5157)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-08-08 09:16:42 +12:00
Trent Houliston
93b7ca77ca Refactor pulse_meter to better handle higher frequencies (#4231) 2023-08-08 08:14:20 +12:00
Lucas Prim
40697fea96 Implemented Waveshare 7.5in B V3 (#5210) 2023-08-08 07:31:09 +12:00
dependabot[bot]
c541fa1763 Bump zeroconf from 0.71.4 to 0.74.0 (#5199)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-07 13:55:38 +12:00
Keith Burzinski
fd08f1e23d Add ESP32-S2/S3 capacitive touch support (#5116)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-08-07 13:54:25 +12:00
Paweł Kozubal
3a07121784 Change device name in MQTT discovery messages to friendly names (#5205) 2023-08-07 13:46:31 +12:00
André Cirne
1495fada90 Add support for a01nyub (#4863)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-08-07 12:22:18 +12:00
arno1801
62fed4c1eb Improved compensation sgp30 (#5208) 2023-08-07 11:59:17 +12:00
Jesse Hills
00f9af70a9 Fix some configs after #5181 (#5209) 2023-08-07 11:48:23 +12:00
Maciej Sokołowski
0ae3fcb0b7 PWM Output on RP2040 for high frequencies (#5204) 2023-08-07 11:41:44 +12:00
dependabot[bot]
dfffa67c0f Bump click from 8.1.5 to 8.1.6 (#5179)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-02 16:35:16 +12:00
Jesse Hills
f81c556b63 Update components "if x in config" (#5181) 2023-08-02 16:25:26 +12:00
Jesse Hills
ce8091c14e Speaker return bytes written and do not wait for queue (#5182) 2023-08-02 16:24:52 +12:00
Jesse Hills
581cb642ff Add get_board function to esp32 module (#5184) 2023-08-02 16:24:02 +12:00
Jesse Hills
e02aaedc42 Microphone add is_stopped (#5183) 2023-08-02 16:21:30 +12:00
Pavlo Dudnytskyi
8c66de2391 Vertical and horizontal airflow actions fix for Haier climate (#5164)
Co-authored-by: Pavlo Dudnytskyi <pdudnytskyi@astrata.eu>
2023-08-02 11:06:23 +12:00
dependabot[bot]
cb8ca433d9 Bump pyupgrade from 3.7.0 to 3.9.0 (#5083)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-08-02 07:57:51 +12:00
Jesse Hills
b914d6e305 Merge pull request #5173 from esphome/bump-2023.7.1
2023.7.1
2023-08-01 16:54:20 +12:00
Jesse Hills
956e19be7d Bump version to 2023.7.1 2023-08-01 12:08:36 +12:00
Maxime Michel
b3d5a4dfdb Fix graininess & streaks for 7.50inV2alt Waveshare e-paper (#5168) 2023-08-01 12:08:36 +12:00
Joris S
c63cdae84f invert min_rssi check (#5150) 2023-08-01 12:08:36 +12:00
J. Nick Koston
dec044ad8b Increase maximum number of BLE notifications (#5155) 2023-08-01 12:08:36 +12:00
PlainTechEnthusiast
2a12ec09fb update "Can't convert" warning to match others in homeassistant_sensor (#5162) 2023-08-01 12:08:36 +12:00
cvwillegen
91e920c498 Slightly lower template switch setup priority (#5163) 2023-08-01 12:08:35 +12:00
Stijn Tintel
9b19c45735 wifi: handle WIFI_REASON_ROAMING reason in event (#5153) 2023-08-01 12:08:35 +12:00
Keith Burzinski
3843d21dbf Swap ADC back to use 'int' because C3 (#5151) 2023-08-01 12:08:35 +12:00
Kuba Szczodrzyński
73db164fb1 Dashboard: use Popen() on Windows (#5110) 2023-08-01 12:08:35 +12:00
Maxime Michel
17be6b106b Fix graininess & streaks for 7.50inV2alt Waveshare e-paper (#5168) 2023-08-01 12:03:34 +12:00
dependabot[bot]
869981cfe4 Bump pylint from 2.17.4 to 2.17.5 (#5172)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-01 10:16:46 +12:00
dependabot[bot]
7dd56fb0fa Bump black from 23.3.0 to 23.7.0 (#5126)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-07-30 23:28:26 +00:00
dependabot[bot]
f0f09d3714 Bump zeroconf from 0.69.0 to 0.71.4 (#5148)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-31 10:32:55 +12:00
Joris S
9a66199904 invert min_rssi check (#5150) 2023-07-31 10:30:21 +12:00
J. Nick Koston
bf732f2a2b Increase maximum number of BLE notifications (#5155) 2023-07-31 10:23:52 +12:00
Jimmy Hedman
c418eecf83 Enable IPv6 for ESP32 Arduino, wifi and ethernet (#4865) 2023-07-30 22:20:55 +00:00
Mat931
98bf427600 Add standardized CRC helper functions (#4798)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-07-30 21:45:56 +00:00
PlainTechEnthusiast
9aa5ee3372 update "Can't convert" warning to match others in homeassistant_sensor (#5162) 2023-07-31 09:40:55 +12:00
cvwillegen
ccb3d3d308 Slightly lower template switch setup priority (#5163) 2023-07-31 09:32:09 +12:00
Sergey Dudanov
9ff0471274 duty_time: fix build without binary_sensor. Parented in automations. (#5156)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-07-30 21:30:11 +00:00
Stijn Tintel
fdb20e4a30 wifi: handle WIFI_REASON_ROAMING reason in event (#5153) 2023-07-31 09:23:30 +12:00
Keith Burzinski
56630bb717 Swap ADC back to use 'int' because C3 (#5151) 2023-07-31 09:19:06 +12:00
mullerdavid
08a41d9bd6 Adding Inkplate 6 v2 model variant (#5165) 2023-07-31 09:10:46 +12:00
Mat931
cd46a69f2c Add 'map_linear' and 'clamp' sensor filters (#5040) 2023-07-31 09:09:09 +12:00
Sergey Dudanov
794a4bd9a1 remote_base changes (#5124) 2023-07-31 08:07:33 +12:00
Sergey Dudanov
a120a455bf climate triggers Climate and ClimateCall references (#5028) 2023-07-31 07:52:01 +12:00
Sergey Dudanov
cd72a2ed7e Bump clang-tidy from 11 to 14 (#5160) 2023-07-31 07:44:56 +12:00
Jimmy Hedman
3eff7e76aa Prepare some components for idf >= 5 (#5061) 2023-07-27 00:18:02 -05:00
esphomebot
959d1944fd Synchronise Device Classes from Home Assistant (#5147) 2023-07-24 07:17:18 +00:00
Jesse Hills
b0966532bf Allow esp32 idf components to specify submodules and specific components (#5128) 2023-07-23 20:22:46 +12:00
Sergey Dudanov
827b2def1e Coolix IR protocol improvements (#5105)
* coolix protocol

* tests

* 24-bit range

* some DRY in coolix

* added short condition

* one more change

* final prettify

* v2023.8
2023-07-23 08:15:37 +12:00
Kuba Szczodrzyński
80154b280e Init colorama in ESPHome main (#5111) 2023-07-22 20:25:01 +12:00
Jesse Hills
efd0dd4c3d Update known boards to 5.4.0 (#5134) 2023-07-22 20:24:40 +12:00
esphomebot
c91b775b73 Synchronise Device Classes from Home Assistant (#5136) 2023-07-21 22:17:48 +12:00
Jimmy Hedman
1c237aef77 Version bump for ESP32 IDF and Arduino (#5035) 2023-07-21 15:35:44 +12:00
Graham Brown
89c5298bb9 Streamer mode (#5119) 2023-07-21 08:47:37 +12:00
Jimmy Hedman
76c0d0912f Change datatype in e131 addressable light (#5127) 2023-07-20 15:54:25 +12:00
Jimmy Hedman
5eb12ac5fe Make docker use pip installed pillow (#5074) 2023-07-20 15:52:41 +12:00
Jesse Hills
d238155640 Add size getter to CallbackManager (#5129) 2023-07-20 12:37:42 +12:00
Jesse Hills
de626c0f5f ignore components folder in root (#5130) 2023-07-20 12:37:29 +12:00
Kuba Szczodrzyński
973e78355f Dashboard: use Popen() on Windows (#5110) 2023-07-20 08:39:35 +12:00
Jesse Hills
ab32dd7420 Merge pull request #5122 from esphome/bump-2023.7.0
2023.7.0
2023-07-19 15:44:34 +12:00
dependabot[bot]
b82c7ad608 Bump pyyaml from 6.0 to 6.0.1 (#5117)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-19 14:30:12 +12:00
Jesse Hills
2a7aa2fc0d bump pyyaml to 6.0.1 2023-07-19 14:07:42 +12:00
Jesse Hills
f5e98eb86f Bump version to 2023.7.0 2023-07-19 12:59:51 +12:00
Jesse Hills
362a19c2e1 Merge pull request #5121 from esphome/bump-2023.7.0b3
2023.7.0b3
2023-07-19 12:40:27 +12:00
Jesse Hills
f4a4956dd4 Bump version to 2023.7.0b3 2023-07-19 11:41:24 +12:00
Jesse Hills
746488cabf Fix silence detection flag on voice assistant (#5120) 2023-07-19 11:41:24 +12:00
voed
4449248c6f [LD2410] Remove baud_rate check (#5112) 2023-07-19 11:41:24 +12:00
PlainTechEnthusiast
036e14ab7f Sigma delta fix (#4911) 2023-07-19 11:41:24 +12:00
Kevin P. Fleming
f840eee1b7 airthings_wave: Silence compiler warnings (#5098) 2023-07-19 11:41:24 +12:00
bwynants
553132443f P1 values for capacity tariff in Belgium (#5081) 2023-07-19 11:41:24 +12:00
Jesse Hills
417d45939f Fix silence detection flag on voice assistant (#5120) 2023-07-19 11:38:47 +12:00
voed
837c749cd7 [LD2410] Remove baud_rate check (#5112) 2023-07-18 12:50:32 +12:00
PlainTechEnthusiast
b0e286972d Sigma delta fix (#4911) 2023-07-18 12:49:04 +12:00
dependabot[bot]
3cfe1e3083 Bump click from 8.1.3 to 8.1.5 (#5099)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-18 12:47:06 +12:00
Kevin P. Fleming
6738295475 airthings_wave: Silence compiler warnings (#5098) 2023-07-17 10:43:57 +12:00
bwynants
1617eba764 P1 values for capacity tariff in Belgium (#5081) 2023-07-17 10:42:49 +12:00
Jesse Hills
d20242f589 Merge pull request #5107 from esphome/bump-2023.7.0b2
2023.7.0b2
2023-07-17 10:19:32 +12:00
Jesse Hills
68affce274 Bump version to 2023.7.0b2 2023-07-17 09:29:32 +12:00
Clyde Stubbs
c4b9065749 Add timeout filter (#5104) 2023-07-17 09:29:32 +12:00
Jesse Hills
d57a5d1793 Remove template switch restore_state (#5106) 2023-07-17 09:29:32 +12:00
Ilia Sotnikov
74e062fdb3 [Sprinkler] Resume fixes (#5100) 2023-07-17 09:29:32 +12:00
Pierre-Alexis Ciavaldini
6bdc0c92fe ESP32 enable ADC2 when wifi is disabled (#4381)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-07-17 09:29:32 +12:00
Jesse Hills
d7945de001 Dont do mqtt ip lookup if use_address has ip address (#5096)
* Dont do mqtt ip lookup id `use_address` is in config

* Fix after actually testing =)
2023-07-17 09:29:32 +12:00
Dave T
899aa31df3 Mark repo as safe directory to git config (#5102) 2023-07-17 09:19:08 +12:00
Clyde Stubbs
ac81fae855 Add timeout filter (#5104) 2023-07-17 09:17:31 +12:00
Jesse Hills
8c6cddf1bb Remove template switch restore_state (#5106) 2023-07-17 09:11:43 +12:00
Ilia Sotnikov
508392db6e [Sprinkler] Resume fixes (#5100) 2023-07-16 15:28:31 -05:00
Pierre-Alexis Ciavaldini
3ac0165f00 ESP32 enable ADC2 when wifi is disabled (#4381)
Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-07-17 07:42:01 +12:00
Kamil Trzciński
1691c13b47 display: Add helper methods to Display::clip and Display::clamp_x/y_ (#5003)
* display: `Rect` make most of methods `const`

* display: add `clip` and `clamp_x/y_` methods for clipping to `Display`
2023-07-14 15:30:19 -05:00
Jimmy Hedman
f8df694aa3 Mk2 to prepare color.h for idf >= 5 (#5070) 2023-07-12 19:32:05 -05:00
Jesse Hills
ac05495781 Dont do mqtt ip lookup if use_address has ip address (#5096)
* Dont do mqtt ip lookup id `use_address` is in config

* Fix after actually testing =)
2023-07-12 19:19:04 -05:00
Jesse Hills
3ba2a29e54 Merge pull request #5095 from esphome/bump-2023.7.0b1
2023.7.0b1
2023-07-13 10:53:51 +12:00
Jesse Hills
306ab0c56c Bump version to 2023.8.0-dev 2023-07-13 09:50:48 +12:00
Jesse Hills
76b438f79c Bump version to 2023.7.0b1 2023-07-13 09:50:48 +12:00
Jesse Hills
bc14f06a07 Merge branch 'dev' into bump-2023.7.0b1 2023-07-13 09:50:47 +12:00
Jesse Hills
844cf316e2 Edit error message for pillow install to add version restrictions (#5094) 2023-07-13 09:38:24 +12:00
Lewis Baker
9344d85414 Fix PIDController::in_deadband() to give correct result when error is zero (#5078) 2023-07-13 08:57:45 +12:00
Sergey Dudanov
a539197bc4 New 'Duty Time' sensor component (#5069) 2023-07-13 08:48:16 +12:00
Sergey Dudanov
eb859e83f8 Fix use of optional<T> (#5091) 2023-07-13 08:44:30 +12:00
Pavlo Dudnytskyi
e4a640844c Fixing colon for tm1637 display if inverted set true (#5072) 2023-07-13 08:24:49 +12:00
Christian
119bbba254 Grove amend name (#5093) 2023-07-13 08:13:50 +12:00
danieltwagner
8c5978599a Add support for ATM90E26 (#4366)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-07-12 17:10:22 +12:00
Sergey Dudanov
bbf3d382e8 added uart final validate data bits (#5079) 2023-07-12 16:12:40 +12:00
Jesse Hills
c85f70a236 Bump esphome-dashboard to 20230711.0 (#5085) 2023-07-12 16:02:37 +12:00
Jesse Hills
7e52d4f5d6 Restrict pillow to versions before 10.0.0 (#5090) 2023-07-12 15:28:20 +12:00
Clyde Stubbs
6d9dbf9e54 Correct message for standard transmission. (#5088) 2023-07-12 15:22:52 +12:00
Clyde Stubbs
ec37dece12 Add MCP2515 12MHz xtal support (#5089) 2023-07-12 15:12:48 +12:00
Christian
e0fd8cd850 Add support for Grove tb6612 fng (#4797)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-07-12 15:02:53 +12:00
Kevin P. Fleming
cf65bd8ad7 airthings_wave: Battery level reporting (#4979) 2023-07-12 13:38:52 +12:00
Stefan Klug
8a9352939a Fix typo in mpu6050.cpp (#5086) 2023-07-12 13:29:38 +12:00
kswt
6ecc1c14d2 tuya_light: fix float->int conversion while setting color temperature (#5067)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: kswt <kswt@xmpp.is>
2023-07-12 13:28:48 +12:00
Stefan Rado
5f531ac9b0 Add TT21100 touchscreen component (#4793)
Co-authored-by: Rajan Patel <rpatel3001@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-07-12 13:19:19 +12:00
dentra
7a551081ee web server esp idf suppport (#3500)
* initial web_server_idf implementation

* initial web_server_idf implementation

* fix lint errors

* fix lint errors

* add captive_portal support

* fix lint errors

* fix lint errors

* add url decode

* Increase the max supported size of headers section in HTTP request

* add ota support

* add mulipart form data support (ota required)

* make linter happy

* make linter happy

* make linter happy

* fix review marks

* add DefaultHeaders support

* add DefaultHeaders support

* unify file names

* using std::isnan

* parse multipart requests only when ota enabled

* parse multipart requests only when ota enabled

* parse multipart requests only when ota enabled

* parse multipart requests only when ota enabled

* parse multipart requests only when ota enabled

* drop multipart request support

* drop multipart request support

* drop multipart request support

* OTA is disabled by default

* fail when OTA enabled on IDF framework

* changing file permissions to remove execute bit

* return back PGM_P and strncpy_P macro

* temp web_server fix to be compat with 2022.12

* fix config handling w/o web_server

* fix compilation with "local"

* fully remove all idf ota

* merge with esphome 2023.6

* add core/hal to web_server_base

* Update esphome/components/web_server_base/__init__.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update __init__.py

* Update __init__.py

---------

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-07-11 19:08:03 -05:00
KoenBreeman
74139985c9 RTC implementation of pcf8563 (#4998)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-07-12 09:19:28 +12:00
jan-hofmeier
f3cdcc008a Add Alpha3 pump component (#3787)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-07-11 17:12:43 +12:00
kahrendt
a391815921 Add Zio Ultrasonic Distance Sensor Component (#5059) 2023-07-11 16:24:18 +12:00
Kamil Trzciński
98fd092053 display: rename DisplayBufferRef to DisplayRef (#5002) 2023-07-10 16:38:28 -05:00
Jesse Hills
feee075122 Merge pull request #5077 from esphome/bump-2023.6.5
2023.6.5
2023-07-10 13:53:25 +12:00
Jimmy Hedman
ddde1ee31e Allow pillow versions over 10 (#5071) 2023-07-10 11:34:43 +12:00
Jimmy Hedman
c5aacdd682 Update RP2040 Aruino framwork and platform to latest (#5025) 2023-07-10 11:30:39 +12:00
Jesse Hills
a77cf1beec Bump version to 2023.6.5 2023-07-10 11:24:49 +12:00
Kevin P. Fleming
d7bfdd0efc binary_sensor: Validate max_length for on_click/on_double_click (#5068) 2023-07-10 11:24:49 +12:00
J. Nick Koston
62aee36f82 Fix bulk and single Bluetooth parser coexistence (#5073) 2023-07-10 11:24:49 +12:00
Trevor North
8ca9115dc8 Improve BME680 BSEC sensor device classes (#4859) 2023-07-10 10:03:54 +12:00
Fabian
8bf8892ab3 [Ethernet] ksz8081rna support (#4739)
Co-authored-by: Your Name <you@example.com>
2023-07-10 10:02:42 +12:00
Kevin P. Fleming
8739552c0b binary_sensor: Validate max_length for on_click/on_double_click (#5068) 2023-07-10 09:55:02 +12:00
J. Nick Koston
e6834f25ed Fix bulk and single Bluetooth parser coexistence (#5073) 2023-07-10 09:08:46 +12:00
NP v/d Spek
f9fc438de8 Fixed ili9xxx_display update() method (#5013)
There was an obsolete `if` statement left over from an other implementation.
2023-07-05 20:58:04 -05:00
Kamil Trzciński
677b2c6618 display: split DisplayBuffer and Display (#5001) 2023-07-05 14:33:26 -05:00
Tobias Oort
301a78f983 Adds 1.54" e-ink display (gdew0154m09) support to waveshare_epaper component (#4939)
* Added GDEW0154M09 in waveshare_epaper component

* noop change - trigger workflow

* Make linter happy

* Update test4.yaml

* linter doing linty things

* revert the newline removal.

* revert to prove unstable test

* add code back into test.

* no partial updates supported yet - removed from test.

* Update esphome/components/waveshare_epaper/waveshare_epaper.cpp

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>

---------

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2023-07-05 14:32:00 -05:00
Jimmy Hedman
979f014799 Make scheduler debuging work with idf >= 5 (#5052) 2023-07-05 22:05:27 +12:00
Fabian
a326dcaf0e [ili9xxx] Allow config of spi data rate. (#4701)
* Allow 80MHz ili9xxx display.

* python foo.

* update based on feedback.

* Change python

---------

Co-authored-by: Your Name <you@example.com>
2023-07-05 02:53:14 -05:00
lnicolas83
5bf2fa5c56 [ILI9xxx] Add ili9488_a (alternative gamma configuration for ILI9488) (#5027)
* Add ili9488_a

* Fix clang-tidy
2023-07-04 19:21:26 -05:00
Jimmy Hedman
fe0404a084 Some tests wasn't running (locally) (#5050) 2023-07-05 10:33:46 +12:00
Jesse Hills
22a1134f0e Fix when idf component has broken symlinks (#5058) 2023-07-05 10:31:58 +12:00
Jimmy Hedman
fc3d558d47 Initial debug component support for rp2040 (#5056) 2023-07-05 10:28:12 +12:00
Jesse Hills
45c72f1f22 Log start of i2c setup (#5049) 2023-07-04 15:26:31 +12:00
Jesse Hills
fd9cca565b Log component long time message at warning level (#5048) 2023-07-04 15:02:53 +12:00
Jesse Hills
0709367587 Merge pull request #5047 from esphome/bump-2023.6.4
2023.6.4
2023-07-04 14:42:36 +12:00
Jesse Hills
98277f6ceb Bump version to 2023.6.4 2023-07-04 14:03:58 +12:00
Jesse Hills
8dd509ba53 Update webserver to ea86d81 (#5023) 2023-07-04 14:03:57 +12:00
J. Nick Koston
8df455f55b Advertise noise is enabled (#5034) 2023-07-04 14:03:57 +12:00
Graham Brown
36782f13bf Add alarm to reserved ids (#5042) 2023-07-04 14:03:57 +12:00
Sergey Dudanov
e823067a6b fix template binary_sensor publish_initial_state option (#5033) 2023-07-04 14:03:57 +12:00
Ryan DeShone
c3ef12d580 [SCD30] Disable negative temperature offset (#4850) 2023-07-04 14:03:57 +12:00
Jesse Hills
d64d1650e3 Update webserver to ea86d81 (#5023) 2023-07-04 13:45:06 +12:00
J. Nick Koston
a74abb8ea8 Adjust signature for on_disconnect (#5009) 2023-07-04 12:57:44 +12:00
Fabian
e74ab00b3e Mopeka std fixes (#5041)
Co-authored-by: Your Name <you@example.com>
2023-07-04 12:55:04 +12:00
J. Nick Koston
2e2ac53071 Advertise noise is enabled (#5034) 2023-07-04 12:52:42 +12:00
Jimmy Hedman
87c0f48095 Prepare debug and logger component to work with idf 5.0 (#5036) 2023-07-04 12:49:27 +12:00
Jimmy Hedman
25b9bde0a5 Prepare ethernet to work with esp idf 5.0 (#5037) 2023-07-04 12:48:05 +12:00
guillempages
63d3a0e8b3 Improve the gamma settings for the S3-Box-lite display (#5046) 2023-07-04 12:43:03 +12:00
Graham Brown
4cc0f3fd53 Add alarm to reserved ids (#5042) 2023-07-04 12:28:19 +12:00
Sergey Dudanov
5b2176562b binary_sensor filters templatable delays (#5029) 2023-07-04 12:25:48 +12:00
Sergey Dudanov
099dc8d1d2 fix template binary_sensor publish_initial_state option (#5033) 2023-07-04 12:18:51 +12:00
Sergey Dudanov
cf98c497d5 binary_sensor removed unused filter (#5039) 2023-07-03 10:35:53 +12:00
dependabot[bot]
c5eb3941b9 Bump pytest-mock from 3.10.0 to 3.11.1 (#4977)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-29 11:44:23 +12:00
dependabot[bot]
0e93b8ee0d Bump esptool from 4.6 to 4.6.2 (#4949)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-29 11:44:10 +12:00
Ryan DeShone
807621402d [SCD30] Disable negative temperature offset (#4850) 2023-06-29 11:42:39 +12:00
Jesse Hills
321155eb40 Merge pull request #5020 from esphome/bump-2023.6.3
2023.6.3
2023-06-29 07:26:05 +12:00
Jesse Hills
d34c074b92 Bump version to 2023.6.3 2023-06-28 12:35:16 +12:00
Jesse Hills
abc8e903c1 Add CONFIG_BT_BLE_42_FEATURES_SUPPORTED for ble (#5008) 2023-06-28 12:35:15 +12:00
F.D.Castel
832ba38f1b Fixes compressed downloads (#5014)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-28 12:35:15 +12:00
esphomebot
70de2f5278 Synchronise Device Classes from Home Assistant (#5018) 2023-06-28 12:35:15 +12:00
Jesse Hills
604d4eec79 Update webserver to 56d73b5 (#5007) 2023-06-28 12:35:14 +12:00
Jesse Hills
ac5246e21d Remove yaml test cache (#5019) 2023-06-28 12:22:14 +12:00
Jesse Hills
951157dc26 Add CONFIG_BT_BLE_42_FEATURES_SUPPORTED for ble (#5008) 2023-06-28 11:35:35 +12:00
Jesse Hills
68119ddcd4 Attempt to fix script parameters (#4627) 2023-06-28 11:34:08 +12:00
F.D.Castel
c82be2cd60 Fixes compressed downloads (#5014)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-28 11:13:14 +12:00
esphomebot
9a149a7aba Synchronise Device Classes from Home Assistant (#5018) 2023-06-27 22:19:36 +00:00
dependabot[bot]
108fabe18f Bump pytest from 7.3.2 to 7.4.0 (#5000)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-28 09:41:39 +12:00
dependabot[bot]
8ce98dd15a Bump pyupgrade from 3.4.0 to 3.7.0 (#4971)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-28 09:41:02 +12:00
dependabot[bot]
9d21cccac1 Bump aioesphomeapi from 14.1.0 to 15.0.0 (#5012)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-28 09:40:08 +12:00
Jesse Hills
8f4abf6a63 Update sync workflow (#5017) 2023-06-28 09:34:31 +12:00
jerome992
bd9a4ff8de add water delivered to dsmr component (#4237)
Co-authored-by: Jerome <jerome992@internet.lu>
2023-06-27 15:35:20 -03:00
Philippe Vlérick
d9398a91d1 update dsmr to 0.7 (#5011) 2023-06-26 17:09:52 -03:00
Jesse Hills
ef84937fd6 Update webserver to 56d73b5 (#5007) 2023-06-26 10:27:03 +12:00
Guillermo Ruffino
2a2d20a7fc support empty schemas and one platform components (#4999) 2023-06-26 09:38:36 +12:00
Kamil Trzciński
8a1c49a4ae display: move Image, Font and Animation code into components (#4967)
* display: move `Font` to `components/font`

* display: move `Animation` to `components/animation`

* display: move `Image` to `components/image`
2023-06-24 17:56:29 -05:00
Jesse Hills
b806eb6a61 Merge pull request #4997 from esphome/bump-2023.6.2
2023.6.2
2023-06-23 22:47:41 +12:00
Jesse Hills
39948db59a Bump version to 2023.6.2 2023-06-23 17:17:43 +12:00
Jesse Hills
fbfb4e2a73 Fix rp2040 pio tool download (#4994) 2023-06-23 17:17:43 +12:00
Samuel Sieb
595ac84779 remove unused static declarations (#4993) 2023-06-23 17:17:43 +12:00
Jesse Hills
eb145757e5 Fix rp2040 pio tool download (#4994) 2023-06-23 16:42:37 +12:00
Samuel Sieb
fc0e1a3cb9 remove unused static declarations (#4993) 2023-06-23 13:03:31 +12:00
Jesse Hills
746f72a279 Merge pull request #4992 from esphome/bump-2023.6.1
2023.6.1
2023-06-23 08:50:39 +12:00
Jesse Hills
ec3d5fc427 Merge branch 'release' into dev 2023-06-23 07:49:08 +12:00
Jesse Hills
dec6f04499 Bump version to 2023.6.1 2023-06-23 07:34:55 +12:00
Kamil Trzciński
a90d266017 display: fix white screen on binary displays (#4991) 2023-06-23 07:34:54 +12:00
Jimmy Hedman
df9fcf9850 Make ethernet_info work with esp-idf framework (#4976) 2023-06-23 07:34:54 +12:00
Kamil Trzciński
85608a8ab7 display: fix white screen on binary displays (#4991) 2023-06-22 14:18:29 -05:00
Jesse Hills
5ef9cd5f86 Merge pull request #4990 from esphome/bump-2023.6.0
2023.6.0
2023-06-22 17:15:13 +12:00
Jimmy Hedman
52d7d2cae7 Make ethernet_info work with esp-idf framework (#4976) 2023-06-22 16:09:00 +12:00
Jesse Hills
ceca91d1e7 Bump version to 2023.6.0 2023-06-22 13:39:10 +12:00
Jesse Hills
bc7c11be96 Merge pull request #4989 from esphome/bump-2023.6.0b7
2023.6.0b7
2023-06-22 13:31:03 +12:00
Jesse Hills
a2734330e1 Bump version to 2023.6.0b7 2023-06-22 11:50:46 +12:00
F.D.Castel
ef8180c8a8 dashboard: Adds "compressed=1" to /download.bin endpoint. (...) (#4966)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-22 11:50:45 +12:00
J. Nick Koston
cd773a1dec Migrate VOC sensors that use ppb to use volatile_organic_compounds_parts device class (#4982) 2023-06-22 11:50:45 +12:00
Kevin P. Fleming
244a212592 airthings_wave: refactor to eliminate code duplication (#4910) 2023-06-22 11:50:45 +12:00
F.D.Castel
f72b07eb0e dashboard: Adds "compressed=1" to /download.bin endpoint. (...) (#4966)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-22 11:48:17 +12:00
J. Nick Koston
314c1c8b5c Migrate VOC sensors that use ppb to use volatile_organic_compounds_parts device class (#4982) 2023-06-22 11:45:41 +12:00
Jesse Hills
98e3426769 Merge pull request #4987 from esphome/bump-2023.6.0b6
2023.6.0b6
2023-06-22 11:22:48 +12:00
Jesse Hills
7ef8d67831 Bump version to 2023.6.0b6 2023-06-22 10:31:23 +12:00
Jesse Hills
c455a5dd6a Update webserver and captive portal pages to 67c48ee9 (#4986) 2023-06-22 10:31:23 +12:00
Dion Hulse
74daca668e Add configuration option to disable the log UI. (#4419)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-22 10:31:23 +12:00
Jesse Hills
211453df43 Update webserver and captive portal pages to 67c48ee9 (#4986) 2023-06-22 10:12:25 +12:00
Dion Hulse
1cc7428445 Add configuration option to disable the log UI. (#4419)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-22 09:58:49 +12:00
Jesse Hills
a40fa22055 Merge pull request #4984 from esphome/bump-2023.6.0b5
2023.6.0b5
2023-06-21 17:17:13 +12:00
Jesse Hills
2047bba4f7 Bump version to 2023.6.0b5 2023-06-21 16:39:52 +12:00
Jesse Hills
a064ab5c2b Fix pypi release (#4983) 2023-06-21 16:39:52 +12:00
Jesse Hills
e8ce7048d8 Fix pypi release (#4983) 2023-06-21 16:36:54 +12:00
Jesse Hills
0c37d06936 Merge pull request #4981 from esphome/bump-2023.6.0b4
2023.6.0b4
2023-06-21 15:49:32 +12:00
Jesse Hills
d919373853 Bump version to 2023.6.0b4 2023-06-21 14:32:53 +12:00
Jesse Hills
6c00be0a63 Bump esphome-dashboard to 20230621.0 (#4980) 2023-06-21 14:32:47 +12:00
Onne
0671287b80 Make growatt play nicer with other modbus components. (#4947)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-21 14:31:24 +12:00
Martin Murray
867b4719d1 Apply configured IIR filter setting in generated BMP280 code (#4975)
Co-authored-by: Martin Murray <murrayma@gmail.com>
2023-06-21 14:31:24 +12:00
Jesse Hills
de6c527ca4 Bump esphome-dashboard to 20230621.0 (#4980) 2023-06-21 14:30:19 +12:00
Onne
9e7e3708e3 Make growatt play nicer with other modbus components. (#4947)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-21 00:22:32 +00:00
Kevin P. Fleming
8bd9f50659 airthings_wave: refactor to eliminate code duplication (#4910) 2023-06-21 11:53:44 +12:00
Stijn Tintel
cb5a01da29 mqtt: add ESP-IDF >= 5.0 support (#4854)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-20 23:53:32 +00:00
Martin Murray
bfe85dd710 Apply configured IIR filter setting in generated BMP280 code (#4975)
Co-authored-by: Martin Murray <murrayma@gmail.com>
2023-06-21 11:53:21 +12:00
Jesse Hills
fc544dc389 Merge pull request #4974 from esphome/bump-2023.6.0b3
2023.6.0b3
2023-06-21 11:50:59 +12:00
dependabot[bot]
24067312f6 Bump zeroconf from 0.63.0 to 0.69.0 (#4970)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-20 11:18:06 +12:00
Jesse Hills
501fe83710 Bump version to 2023.6.0b3 2023-06-20 11:10:48 +12:00
Stanislav Habich
5513b0e121 Update pca9685_output.cpp (#4929) 2023-06-20 11:10:48 +12:00
J. Nick Koston
959e7745a6 Construct web_server assets at build time instead of run time (#4944)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-20 11:10:48 +12:00
J. Nick Koston
76e947651d Store app comment and compilation_time in flash (#4945) 2023-06-20 11:10:48 +12:00
Hawawa McTaru
5ba04eb620 Fix for Fujitsu AC not having Quiet Fan Mode (#4962) 2023-06-20 11:10:48 +12:00
guillempages
ee12c68b8f Add actions to animation (#4959) 2023-06-20 10:50:02 +12:00
dependabot[bot]
b2ccd32cd7 Bump aioesphomeapi from 14.0.0 to 14.1.0 (#4972)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-20 10:35:26 +12:00
Jimmy Hedman
7ceb16cc5a Preprocess away unused code when IPv6 is disabled (#4973) 2023-06-20 10:34:46 +12:00
Jesse Hills
5a8b7c17da Fix python venv restoring (#4965)
* Fix python venv restoring

* Add shell

* Fix indentation
2023-06-19 16:08:23 -05:00
MrEditor97
41a618737b XL9535 I/O Expander (#4899)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-19 15:26:06 +12:00
Carson Full
67771abc9d Add read/write for 16bit registers (#4844) 2023-06-19 14:10:05 +12:00
dependabot[bot]
c151df32bc Bump pytest from 7.3.1 to 7.3.2 (#4936)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 13:58:01 +12:00
Stanislav Habich
b346ad8080 Update pca9685_output.cpp (#4929) 2023-06-19 13:56:12 +12:00
J. Nick Koston
cd57271386 Construct web_server assets at build time instead of run time (#4944)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-19 13:51:19 +12:00
J. Nick Koston
b9f20b36cb Store app comment and compilation_time in flash (#4945) 2023-06-19 11:35:47 +12:00
Kamil Trzciński
62d2640c37 display: move Rect into rect.cpp/.h (#4957) 2023-06-18 23:32:39 +00:00
Kamil Trzciński
54eb52c19a display/font: optimise font rendering by about 25% (#4956) 2023-06-18 23:29:43 +00:00
Hawawa McTaru
77a7d3f24b Fix for Fujitsu AC not having Quiet Fan Mode (#4962) 2023-06-19 11:20:32 +12:00
Kamil Trzciński
8c9d63f48f display: add BaseFont and introduce Font::draw methods (#4963) 2023-06-19 11:04:19 +12:00
Pavlo Dudnytskyi
5a8e93ed0a Upgraded Haier climate component implementation (#4521)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Pavlo Dudnytskyi <pdudnytskyi@astrata.eu>
Co-authored-by: esphomebot <esphome@nabucasa.com>
2023-06-19 10:24:52 +12:00
Jesse Hills
2d32e89b87 Merge pull request #4964 from esphome/bump-2023.6.0b2
2023.6.0b2
2023-06-19 09:22:14 +12:00
Jesse Hills
88c13768e3 Bump version to 2023.6.0b2 2023-06-19 07:35:03 +12:00
Jesse Hills
29f4430658 Use HW SPI for rp2040 (#4955) 2023-06-19 07:35:03 +12:00
Kamil Trzciński
b558a1c9dd display: allow to align image with ImageAlign (#4933) 2023-06-19 07:35:03 +12:00
guillempages
a4ef26749b Add support for ESP32-S3-BOX displays (#4942)
The ESP32-S3-BOX display has an ILI9xxx driver
Add the needed configuration so that it works.
2023-06-19 07:35:03 +12:00
guillempages
6aa3092be0 Split display_buffer sub-components into own files (#4950)
* 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
2023-06-19 07:35:03 +12:00
guillempages
abca47f36f Add support for ESP32-S3-BOX-Lite displays (#4941) 2023-06-19 07:35:03 +12:00
Samuel Sieb
407b5e199e fix vbus sensor offsets (#4952) 2023-06-19 07:35:03 +12:00
Clyde Stubbs
2ffd430b0b Add support in vbus component for Deltasol BS 2009 (#4943) 2023-06-19 07:35:03 +12:00
Jesse Hills
d4099d68a7 Use HW SPI for rp2040 (#4955) 2023-06-19 07:24:44 +12:00
Kamil Trzciński
e1b0d86098 display: allow to align image with ImageAlign (#4933) 2023-06-19 07:24:23 +12:00
guillempages
1a7f121ac6 Add support for ESP32-S3-BOX displays (#4942)
The ESP32-S3-BOX display has an ILI9xxx driver
Add the needed configuration so that it works.
2023-06-17 03:38:44 -05:00
guillempages
ffa669899a Split display_buffer sub-components into own files (#4950)
* 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
2023-06-17 03:32:07 -05:00
guillempages
17fed954bf Add support for ESP32-S3-BOX-Lite displays (#4941) 2023-06-16 11:39:50 +12:00
Samuel Sieb
467e42d8aa fix vbus sensor offsets (#4952) 2023-06-15 01:05:28 -07:00
Clyde Stubbs
a023f24a08 Add support in vbus component for Deltasol BS 2009 (#4943) 2023-06-14 23:51:44 -07:00
Keith Burzinski
81736447ee Merge pull request #4951 from esphome/bump-2023.6.0b1
2023.6.0b1
2023-06-14 22:35:29 -05:00
Jesse Hills
27f69f5439 Bump version to 2023.7.0-dev 2023-06-15 14:25:36 +12:00
Jesse Hills
5ebb468ccf Bump version to 2023.6.0b1 2023-06-15 14:25:36 +12:00
Jesse Hills
0ead802333 Merge branch 'dev' into bump-2023.6.0b1 2023-06-15 14:25:35 +12:00
Graham Brown
54474e5b33 Add Alarm Control Panel (#4770)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-15 12:34:39 +12:00
Kamil Trzciński
0411d52420 display: add BaseImage and provide only Image::get_pixel method (#4932) 2023-06-15 11:15:46 +12:00
Kamil Trzciński
cef659b0de display: Improve Image rendering by removing usage of virtual functions (#4931) 2023-06-15 09:50:24 +12:00
Jesse Hills
035c3ef8fe Add MULTI_CONF to pn53_i2c (#4938) 2023-06-13 15:30:40 -05:00
Carlos Cordero
5afdb1e97f I2S media player allow setting communication format for external DACs (#4918)
Co-authored-by: Carlos Cordero <ccordero@bkool.com>
2023-06-13 07:48:01 +12:00
Jesse Hills
f7c0ec6595 proto generation updates (#4653) 2023-06-12 17:00:34 +12:00
Pascal
0a407c5425 [max7219digit] fix 270° rotation (#4930)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-06-12 16:59:25 +12:00
jimtng
b9e7fdd2b0 Add !extend to devcontainer's customTags (#4749) 2023-06-12 13:31:00 +12:00
guillempages
c74105aad7 Add SVG image support (#4922) 2023-06-12 09:36:37 +12:00
RoboMagus
5f0892dec4 Allow multiple MAC addresses for 'on_ble_advertise' filter (#4773) 2023-06-09 12:53:30 +12:00
Jesse Hills
302dea4169 Move ESPTime into core esphome namespace (#4926)
* 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
2023-06-08 17:24:44 -05:00
Jesse Hills
ce13979690 Bluetooth Proxy: Raw bundled advertisements (#4924) 2023-06-09 07:41:09 +12:00
dependabot[bot]
1cf210fa25 Bump aioesphomeapi from 13.9.0 to 14.0.0 (#4925)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-08 08:27:39 +12:00
Simone Rossetto
d1253922c3 Increase SNTP setup priority (#4917) 2023-06-07 10:38:18 +12:00
guillempages
6b00622329 Add support for mdi images (#4654) 2023-06-07 09:32:21 +12:00
PlainTechEnthusiast
aeb94e166b Support for Adafruit ESP32-S2 TFT Feather (#4912)
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.
2023-06-03 16:07:24 -05:00
Nick Owens
8bb4c65272 prometheus: fix compilation with EntityBase (#4895) 2023-06-01 14:31:58 +12:00
dependabot[bot]
09a4d869f6 Bump esptool from 4.5.1 to 4.6 (#4906)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-01 01:47:16 +00:00
dependabot[bot]
ae4c130a61 Bump zeroconf from 0.62.0 to 0.63.0 (#4890)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-01 13:18:29 +12:00
dependabot[bot]
5621d592b4 Bump pytest-cov from 4.0.0 to 4.1.0 (#4888)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-01 13:18:12 +12:00
dependabot[bot]
4858882816 Bump frenck/action-yamllint from 1.4.0 to 1.4.1 (#4876)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-01 13:17:57 +12:00
Jesse Hills
b06bdc2da3 Allow WIFI to be disabled and enabled (#4810)
Co-authored-by: Péter Sárközi <xmisterhu@gmail.com>
Co-authored-by: Ash McKenzie <ash@the-rebellion.net>
2023-06-01 11:34:35 +12:00
Jesse Hills
1ea5d90ea3 Continuous voice_assistant and silence detection (#4892) 2023-05-31 16:30:53 +12:00
Stijn Tintel
f9f335e692 light: fix compile with ESP-IDF >= 5 (#4855) 2023-05-31 13:49:31 +12:00
Stijn Tintel
3ead48f0db ota: fix TWDT with ESP-IDF >= 5 (#4858) 2023-05-31 13:48:34 +12:00
Stijn Tintel
ccba94197d ota: fix compile with ESP-IDF >= 5 (#4857) 2023-05-31 13:47:11 +12:00
dependabot[bot]
8adb7dc97c Bump aioesphomeapi from 13.7.5 to 13.9.0 (#4907)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-31 09:05:40 +12:00
Stijn Tintel
796b64541f esp32_rmt_led_strip: fix compile with ESP-IDF >= 5 (#4856)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-30 11:07:36 +12:00
Jesse Hills
b8c27bc17d Merge pull request #4905 from esphome/bump-2023.5.5
2023.5.5
2023-05-29 10:25:22 +12:00
Regev Brody
7dcdf80f49 add SUB_SWITCH macro (#4898) 2023-05-29 09:44:35 +12:00
Regev Brody
57023457ee add SUB_SELECT macro (#4897) 2023-05-29 09:44:05 +12:00
Jesse Hills
1057ac4db7 Bump version to 2023.5.5 2023-05-29 09:42:12 +12:00
Jesse Hills
69f5674d9e Fix version printing not breaking yaml parsing (#4904) 2023-05-29 09:42:12 +12:00
Jesse Hills
ebad407586 Fix version printing not breaking yaml parsing (#4904) 2023-05-28 21:18:01 +00:00
Samuel Sieb
71387846dc move pio tools to LED component (#4903) 2023-05-28 20:49:27 +00:00
Sybren A. Stüvel
97c1c34708 Add support for TMP1075 temperature sensor (#4776)
* 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
2023-05-26 00:01:21 -05:00
Jesse Hills
79abd773a2 Allow i2s microphone bits per sample to be configured (#4884) 2023-05-26 15:50:44 +12:00
guillempages
9cd173ef83 Allow partially looping animations (#4693)
Add the possibility of specifying a "loop" in an animation; where the
requested frames (start - end) will be repeateadly shown for "count" times.
2023-05-25 16:49:52 -05:00
Keith Burzinski
b723728177 Merge pull request #4889 from esphome/bump-2023.5.4
2023.5.4
2023-05-24 17:21:24 -05:00
Keith Burzinski
316171491f Bump version to 2023.5.4 2023-05-24 15:58:54 -05:00
Jesse Hills
91ff502872 Fix esp32_rmt_led_strip color modes (#4886) 2023-05-24 15:58:53 -05:00
Samuel Sieb
6e414180e0 fix modbus sending FP32_R values (#4882) 2023-05-24 15:58:53 -05:00
Jesse Hills
7d2ae4e252 Print ESPHome version when running commands (#4883) 2023-05-24 15:58:53 -05:00
Davrosx
fb4cb07c6f Update cover.h for compile errors with stop() (#4879) 2023-05-24 15:58:53 -05:00
Fabian
19f91a7deb [internal_temperature] ESP32-S3 needs ESP IDF V4.4.3 or higher (#4873)
Co-authored-by: Your Name <you@example.com>
2023-05-24 15:58:53 -05:00
Rajan Patel
bb044a789c Add i2s mclk (#4885) 2023-05-24 19:28:08 +12:00
Jesse Hills
2153cfc749 Fix esp32_rmt_led_strip color modes (#4886) 2023-05-24 02:20:06 -05:00
Jesse Hills
2e8b4fbdc8 Fix rp2040_pio_led_strip color modes (#4887) 2023-05-24 02:19:49 -05:00
Samuel Sieb
4141100b1c fix modbus sending FP32_R values (#4882) 2023-05-23 15:00:33 -07:00
Jesse Hills
baa08160bb Print ESPHome version when running commands (#4883) 2023-05-23 21:56:15 +00:00
Davrosx
35ef4aad60 Update cover.h for compile errors with stop() (#4879) 2023-05-24 07:52:34 +12:00
Fabian
ffa5e29dab [internal_temperature] ESP32-S3 needs ESP IDF V4.4.3 or higher (#4873)
Co-authored-by: Your Name <you@example.com>
2023-05-24 07:51:12 +12:00
Evgeny
28b5c535ec add codeowners (#4875) 2023-05-22 22:28:35 +00:00
Keith Burzinski
3807350c61 Merge pull request #4877 from esphome/bump-2023.5.3
2023.5.3
2023-05-22 17:25:56 -05:00
Keith Burzinski
9d2467cf62 Bump version to 2023.5.3 2023-05-22 16:53:10 -05:00
Fabian
d2480d3194 [PSRam] Change log unit to KB to minimize rounding error. (#4872)
Co-authored-by: Your Name <you@example.com>
2023-05-22 16:53:10 -05:00
Jesse Hills
148eb03d13 Allow microphone channel to be specified in config (#4871) 2023-05-22 16:53:10 -05:00
Fabian
ed8aec62fc [PSRam] Change log unit to KB to minimize rounding error. (#4872)
Co-authored-by: Your Name <you@example.com>
2023-05-23 08:43:03 +12:00
Jesse Hills
f7b5c6307c Allow microphone channel to be specified in config (#4871) 2023-05-23 07:02:16 +12:00
Lucas Reiners
40d110fc3f Update ili9xxx_init.h for correct white balance (#4849) 2023-05-22 23:24:17 +12:00
Jesse Hills
70aa5d0f6c Merge pull request #4870 from esphome/bump-2023.5.2
2023.5.2
2023-05-22 12:15:07 +12:00
Jesse Hills
8fcec8e2cb Bump version to 2023.5.2 2023-05-22 11:31:30 +12:00
Stefan Rado
2d3b48f86f Fix i2s_audio media_player mutex acquisition (#4867)
Co-authored-by: Rajan Patel <rpatel3001@gmail.com>
2023-05-22 11:31:30 +12:00
Daniel Mahaney
a15ac06771 Rp2040 pio ledstrip (#4818)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-22 10:31:27 +12:00
Stefan Rado
784cc3bc29 Fix i2s_audio media_player mutex acquisition (#4867)
Co-authored-by: Rajan Patel <rpatel3001@gmail.com>
2023-05-22 08:10:23 +12:00
Stefan Rado
8384bd7fc7 Run YAML test 8 during CI and fix board used (#4862) 2023-05-22 08:08:33 +12:00
guillempages
8a518f0def Add transparency support to all image types (#4600) 2023-05-22 08:03:21 +12:00
Jesse Hills
99c10bc6de Merge pull request #4852 from esphome/bump-2023.5.1
2023.5.1
2023-05-18 14:27:55 +12:00
Jesse Hills
f30f20db86 Bump version to 2023.5.1 2023-05-18 13:00:37 +12:00
Keith Burzinski
9bf946e196 Sprinkler fixes (#4816) 2023-05-18 13:00:36 +12:00
Jesse Hills
bfaad1f28d Remove i2c dependency from ttp229_bsf (#4851) 2023-05-18 13:00:36 +12:00
Keith Burzinski
c61a3bf431 Sprinkler fixes (#4816) 2023-05-18 11:36:52 +12:00
Jesse Hills
1b77996ccd Remove i2c dependency from ttp229_bsf (#4851) 2023-05-18 11:34:18 +12:00
Jesse Hills
9e3ecc8372 Migrate e131 to use socket instead of WiFiUDP arduino library (#4832) 2023-05-18 08:41:21 +12:00
dependabot[bot]
18f4e41550 Bump platformio from 6.1.6 to 6.1.7 (#4795)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-17 05:29:15 +00:00
dependabot[bot]
26cdbaa3df Bump pyupgrade from 3.3.2 to 3.4.0 (#4842)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-17 05:26:29 +00:00
dependabot[bot]
c76c1337ba Bump zeroconf from 0.60.0 to 0.62.0 (#4781)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 16:53:23 +12:00
dependabot[bot]
fe3b779016 Bump pylint from 2.17.3 to 2.17.4 (#4843)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 16:50:11 +12:00
dependabot[bot]
682638d4de Bump tornado from 6.3.1 to 6.3.2 (#4841)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 16:42:50 +12:00
Lukas Lindner
c96663daca Insert Europe Tank Types from mopeka_std_check (#4757) 2023-05-17 16:41:53 +12:00
Joel Goguen
b3ed988119 Allow substitutions to be valid names (#4726) 2023-05-17 16:33:08 +12:00
Carson Full
77695aa55b Move some I2C logic out of header file (#4839) 2023-05-17 16:32:20 +12:00
Markus
c5a45645a6 allow to use MQTT for discovery of IPs if mDNS is no option (#3887)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-17 16:29:56 +12:00
Christian
0de47e2a4e Add DNS to Text info (#4821)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-17 16:29:21 +12:00
Jesse Hills
90598d2405 Rework CI into multiple dependent jobs (#4823) 2023-05-17 16:28:09 +12:00
Jesse Hills
f90e9ba871 Merge pull request #4846 from esphome/bump-2023.5.0
2023.5.0
2023-05-17 13:17:10 +12:00
Jesse Hills
726bdd7be2 Bump version to 2023.5.0 2023-05-17 12:45:42 +12:00
Jesse Hills
52db40eb41 Merge pull request #4845 from esphome/bump-2023.5.0b5
2023.5.0b5
2023-05-17 12:04:22 +12:00
Jesse Hills
3c371a0c59 Bump version to 2023.5.0b5 2023-05-17 09:57:36 +12:00
Samuel Sieb
c941bc4109 handle Wiegand 8-bit keys (#4837)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-05-17 09:57:35 +12:00
Samuel Sieb
cc76e5353c support sending keys to the collector (#4838)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-05-17 09:57:35 +12:00
Samuel Sieb
edfd82fd42 handle Wiegand 8-bit keys (#4837)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-05-17 09:30:14 +12:00
Samuel Sieb
492bad645b support sending keys to the collector (#4838)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-05-16 23:36:02 +12:00
Jesse Hills
ab4517f611 Fix stale bot ignoring not-stale (#4836) 2023-05-15 23:45:35 -05:00
Jesse Hills
11bb46e393 Merge pull request #4835 from esphome/bump-2023.5.0b4
2023.5.0b4
2023-05-16 12:00:39 +12:00
Jesse Hills
2bfcfa6dae Use token so PR checks are run (#4834) 2023-05-16 11:30:25 +12:00
Jesse Hills
71c4714a6e Bump version to 2023.5.0b4 2023-05-16 11:16:14 +12:00
github-actions[bot]
a4e63c5f86 Synchronise Device Classes from Home Assistant (#4825)
Co-authored-by: esphomebot <esphome@nabucasa.com>
2023-05-16 11:16:14 +12:00
Justin Gerace
c71e7d0132 Start UART assignment at UART0 if the logger is not enabled or is not configured for hardware logging on ESP32 (#4762) 2023-05-16 11:16:13 +12:00
dependabot[bot]
daa966975e Bump tzlocal from 4.2 to 5.0.1 (#4829)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 11:16:13 +12:00
Federico G. Schwindt
2e5757a3f0 Fix time period validation for the auto cleaning interval (#4811) 2023-05-16 11:16:13 +12:00
Jesse Hills
f66024b37c Bump esphome-dashboard to 20230516.0 (#4831) 2023-05-16 11:16:13 +12:00
Christian
c16ca7be13 Update PulseLightEffect with range brightness (#4820)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-16 11:16:13 +12:00
dependabot[bot]
e13e754bc4 Bump aioesphomeapi from 13.7.2 to 13.7.5 (#4830)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 11:16:13 +12:00
RoboMagus
6ccea59f71 Fix missing stop trait in send_cover_info (#4826) 2023-05-16 11:16:13 +12:00
github-actions[bot]
d7fd23d8a8 Synchronise Device Classes from Home Assistant (#4825)
Co-authored-by: esphomebot <esphome@nabucasa.com>
2023-05-15 23:13:17 +00:00
Justin Gerace
d0ca69bc27 Start UART assignment at UART0 if the logger is not enabled or is not configured for hardware logging on ESP32 (#4762) 2023-05-16 11:00:05 +12:00
dependabot[bot]
2a7d6addde Bump tzlocal from 4.2 to 5.0.1 (#4829)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 10:30:08 +12:00
Federico G. Schwindt
8e4aeec3bd Fix time period validation for the auto cleaning interval (#4811) 2023-05-16 10:28:01 +12:00
Jesse Hills
7f83a6e667 Bump esphome-dashboard to 20230516.0 (#4831) 2023-05-16 10:25:49 +12:00
Christian
ae838b13a8 Update PulseLightEffect with range brightness (#4820)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-16 08:29:00 +12:00
dependabot[bot]
ce5dc6f100 Bump aioesphomeapi from 13.7.2 to 13.7.5 (#4830)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 08:24:58 +12:00
RoboMagus
b1551d0436 Fix missing stop trait in send_cover_info (#4826) 2023-05-16 08:24:03 +12:00
Jesse Hills
b4c2433bac Run black over tests folder (#4824) 2023-05-15 16:09:56 +12:00
Jesse Hills
71b28be3c8 Merge pull request #4822 from esphome/bump-2023.5.0b3
2023.5.0b3
2023-05-15 13:06:10 +12:00
Jesse Hills
e25d92e1f5 Bump version to 2023.5.0b3 2023-05-15 11:37:55 +12:00
Jesse Hills
65cda10884 Dontr try stop if not actually started (#4814) 2023-05-15 11:37:55 +12:00
Jesse Hills
625126df68 Fix i2s media player volume control (#4813) 2023-05-15 11:37:55 +12:00
richardhopton
e0ee8ca17c Tuya: Prevent loop when setting colors on case-sensitive dps (#4809)
Co-authored-by: Samuel Sieb <samuel-github@sieb.net>
2023-05-15 11:37:54 +12:00
Federico G. Schwindt
af95e781f5 Wording (#4805) 2023-05-15 11:37:54 +12:00
Jesse Hills
1d8227788b Dontr try stop if not actually started (#4814) 2023-05-15 10:11:48 +12:00
Jesse Hills
5fdd8440ac Fix i2s media player volume control (#4813) 2023-05-13 00:19:06 -05:00
richardhopton
5d8daa6990 Tuya: Prevent loop when setting colors on case-sensitive dps (#4809)
Co-authored-by: Samuel Sieb <samuel-github@sieb.net>
2023-05-13 15:16:28 +12:00
Federico G. Schwindt
cf802d0d38 Wording (#4805) 2023-05-12 13:46:47 +12:00
Jesse Hills
9b230a7d93 Merge pull request #4808 from esphome/bump-2023.5.0b2
2023.5.0b2
2023-05-12 11:02:45 +12:00
Jesse Hills
e2f3e7c3a6 Bump version to 2023.5.0b2 2023-05-12 10:32:59 +12:00
Alex Dekker
2fd2e5ceb2 Supposed to fix #4069, by changing the default value to 0s (timeunit instead of int) to pass validation (#4806)
Co-authored-by: Alex1602 <alex1602@gmail.com>
2023-05-12 10:32:59 +12:00
Jesse Hills
d88358be8e Remove AUTO_LOAD from apds9960 (#4746) 2023-05-12 10:32:59 +12:00
Jimmy Hedman
d80885c7a8 Fixed access point for ESP32 IDF platform (#4784) 2023-05-12 10:32:59 +12:00
Alex Dekker
9cbf437509 Supposed to fix #4069, by changing the default value to 0s (timeunit instead of int) to pass validation (#4806)
Co-authored-by: Alex1602 <alex1602@gmail.com>
2023-05-11 16:25:34 -05:00
NP v/d Spek
cd7e8e4bdd Add minimum RSSI check to ble presence (#4646)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-12 04:28:24 +12:00
Jesse Hills
ed024a0aa5 Remove AUTO_LOAD from apds9960 (#4746) 2023-05-11 11:33:59 +12:00
Jesse Hills
c7c9c49f4e Merge pull request #4803 from esphome/bump-2023.5.0b1
2023.5.0b1
2023-05-11 10:54:30 +12:00
Jesse Hills
75d0514d05 Merge branch 'release' into dev 2023-05-11 10:50:16 +12:00
Jimmy Hedman
5b02715c7b Fixed access point for ESP32 IDF platform (#4784) 2023-05-11 10:00:28 +12:00
Jesse Hills
2c160a8a25 Bump version to 2023.5.0b1 2023-05-11 09:38:21 +12:00
Jesse Hills
3b0eea69ce Bump version to 2023.6.0-dev 2023-05-11 09:38:21 +12:00
Jesse Hills
cc576cf1a9 Merge branch 'dev' into bump-2023.5.0b1 2023-05-11 09:38:20 +12:00
Jesse Hills
97a71482a9 Validate project details are set for dashboard_import (#4802) 2023-05-11 08:55:05 +12:00
Jesse Hills
8822b6c808 Make i2s_audio bclk_pin optional (#4801) 2023-05-11 07:17:59 +12:00
Jesse Hills
5099595aee Wrap VA code (#4800) 2023-05-10 16:46:32 +12:00
Jesse Hills
39a650ee54 Add more configuration for microphones - i2s/pdm/adc (#4775) 2023-05-10 16:37:21 +12:00
Jimmy Hedman
b19c7d462b Fixed calculation of start and end dhcp range (#4785) 2023-05-10 13:03:43 +12:00
Fabian
a8b821c213 [display] Small display print performance improvement (#4788) 2023-05-10 12:47:24 +12:00
Fabian
535003014b Keep Unit of Measurement in Flash. (#4719)
Co-authored-by: Your Name <you@example.com>
2023-05-10 11:42:55 +12:00
Jesse Hills
3c05ae4e1a Add more envs to root platformio (#4799) 2023-05-10 11:38:51 +12:00
Jesse Hills
c835b67bac Add host target platform (#4783)
Co-authored-by: Otto winter <otto@otto-winter.com>
2023-05-10 11:38:18 +12:00
Fabian
8c32941428 [ili9xxx] Improve fill operation performance (#4702)
Co-authored-by: Your Name <you@example.com>
2023-05-10 11:19:28 +12:00
Alfredo
b5dac00dcb Fix ezo parsing (#4792) 2023-05-10 11:16:14 +12:00
bouhaa
ffdc721c79 SM2135 Add optional current configuration, avoid communication failures. (#3850)
Co-authored-by: matika77 <xmaximx@gmx.net>
Co-authored-by: Dion <contact@dd32.id.au>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-10 11:06:26 +12:00
Jesse Hills
0828a9fc11 Bump ESP32-audioI2s to 2.0.7 (#4796) 2023-05-10 09:13:01 +12:00
Jesse Hills
4b664b6f09 Create esp32 rmt addressable light driver (#4708) 2023-05-09 09:33:43 +12:00
Jesse Hills
679633245d Add gp8403 output component (#4495)
Co-authored-by: Samuel Sieb <samuel-github@sieb.net>
2023-05-08 12:45:12 +12:00
Jesse Hills
ce8a77c765 Speaker support (#4743) 2023-05-08 10:36:17 +12:00
Jesse Hills
2f78c4acfa Merge pull request #4778 from esphome/bump-2023.4.4
2023.4.4
2023-05-04 11:31:40 +12:00
Jesse Hills
72f6841aac Bump version to 2023.4.4 2023-05-04 10:53:06 +12:00
Tim Niemueller
10bd9b14fc Fixes for Arduino 2.7.4 (for FastLED) (#4777) 2023-05-04 10:53:05 +12:00
Guillermo Ruffino
3498aade85 update schema gen to 2023.4.0 (#4772) 2023-05-04 10:18:45 +12:00
Chris Nussbaum
c4539e10fb Revert "Template sensors always publish on update interval (#2224)" (#4774) 2023-05-04 10:16:00 +12:00
Tim Niemueller
2b3052e9d7 Fixes for Arduino 2.7.4 (for FastLED) (#4777) 2023-05-04 10:13:30 +12:00
Jesse Hills
e725e15f7a Merge pull request #4769 from esphome/bump-2023.4.3
2023.4.3
2023-05-02 17:28:32 +12:00
Jesse Hills
4d1113e265 Bump version to 2023.4.3 2023-05-02 17:10:46 +12:00
Jesse Hills
52352ac27a Fix i2s media player on devices with no internal DAC (#4768) 2023-05-02 17:10:46 +12:00
Keith Burzinski
f60b2b754d Fix sprinkler switch restore_mode (#4756) 2023-05-02 17:10:46 +12:00
Jesse Hills
4a3f9712b2 Fix i2s media player on devices with no internal DAC (#4768) 2023-05-02 16:57:40 +12:00
dependabot[bot]
fb094fca0f Bump zeroconf from 0.56.0 to 0.60.0 (#4767)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-02 09:52:42 +12:00
looping40
de10b356cf Max6956 support added (#3764)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-02 09:51:48 +12:00
cooki35
bd6d6caa8a Add support for V2 of the waveshare 5.83in e-paper display. (#3660) 2023-05-02 09:36:20 +12:00
Mat931
1c4af08ed3 Add support for BLE passkey authentication (#4258)
Co-authored-by: Branden Cash <203336+ammmze@users.noreply.github.com>
2023-05-02 09:25:10 +12:00
Philippe FOUQUET
c97d361b6c Add support for hyt271 (#4282)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-01 16:18:31 +12:00
marshn
379b1d84dd RF Codec for Drayton Digistat heating controller (#4494) 2023-05-01 16:12:53 +12:00
Luis Andrade
c13e20643b play_folder bugfix and addition of play_mp3 (#4758) 2023-05-01 16:01:24 +12:00
Mat931
76b6fcf554 Add PCA6416A Support (#4681) 2023-05-01 16:00:21 +12:00
Jesse Hills
57e909e790 Only pre-install libraries in docker images (#4766) 2023-05-01 15:57:57 +12:00
dependabot[bot]
d6f7876e68 Bump pyupgrade from 3.3.1 to 3.3.2 (#4751)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-01 00:01:52 +00:00
Jesse Hills
56e0923c22 Switch ESPAsyncTCP-esphome to esphome fork (#4764) 2023-05-01 11:09:01 +12:00
tracestep
f4b98f5e32 Power down PN532 before deep sleep (#4707) 2023-05-01 09:24:15 +12:00
Jesse Hills
2d56b70a36 Bump git version in Dockerfile (#4763) 2023-05-01 08:51:46 +12:00
dependabot[bot]
980cfaf295 Bump aioesphomeapi from 13.7.1 to 13.7.2 (#4753)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-01 07:57:02 +12:00
Keith Burzinski
c2a43c733a Fix sprinkler switch restore_mode (#4756) 2023-05-01 07:52:05 +12:00
RoboMagus
568e65a6ab Fix assumed_state switch webserver (#4259) 2023-05-01 07:28:21 +12:00
Jesse Hills
59d6b3afa0 Merge branch 'release' into dev 2023-04-27 20:06:04 +12:00
Jesse Hills
b89c04b928 Merge pull request #4748 from esphome/bump-2023.4.2
2023.4.2
2023-04-27 20:02:15 +12:00
Jesse Hills
12090657bb Bump version to 2023.4.2 2023-04-27 19:36:21 +12:00
itpeters
4e21cf0bdd Don't allow fingerprint_grow enroll cancellation when no enrollment started (#4745) 2023-04-27 19:36:21 +12:00
Jesse Hills
ba4ef72d56 Only request VA port from first client that is subscribed (#4747) 2023-04-27 19:36:21 +12:00
Jimmy Hedman
f3e6a4314f Debug component doesn't work on RP2040 (#4728) 2023-04-27 19:36:21 +12:00
gcopeland
e14ce3d950 I2c scan recovery reset fix (#4724)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-04-27 19:36:21 +12:00
itpeters
70aa38f5bd Don't allow fingerprint_grow enroll cancellation when no enrollment started (#4745) 2023-04-27 16:34:20 +12:00
Jesse Hills
55ec082628 Only request VA port from first client that is subscribed (#4747) 2023-04-27 04:22:12 +00:00
Jesse Hills
6f27126c8d Move am43 sensor code and remove auto load on cover (#4631) 2023-04-27 13:24:42 +12:00
Jesse Hills
ee21a91313 Add mlx90614 sensors (#3749)
Co-authored-by: Greg Arnold <greg@arnoldassociates.com>
Co-authored-by: notsonominal <130870838+notsonominal@users.noreply.github.com>
2023-04-27 13:17:09 +12:00
Jesse Hills
c5efaa1c00 Remove climate legacy away flags (#4744) 2023-04-27 13:11:32 +12:00
Jesse Hills
6476357596 Expand the platformio dep installer to also install platforms and tools (#4716) 2023-04-27 12:26:06 +12:00
dependabot[bot]
77f71acbc8 Bump pytest from 7.3.0 to 7.3.1 (#4686)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-27 11:45:23 +12:00
dependabot[bot]
4a08a5413d Bump tornado from 6.2 to 6.3.1 (#4741) 2023-04-27 11:00:34 +12:00
dependabot[bot]
e3d89cc6b6 Bump pylint from 2.17.2 to 2.17.3 (#4740)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-27 10:49:40 +12:00
RoboMagus
64afb07e91 Fix 'blutooth' typo in esp32_ble component (#4738) 2023-04-27 10:48:53 +12:00
Keith Burzinski
f639f7c280 Add on_tag_removed trigger for RC522 (#4742) 2023-04-27 10:47:45 +12:00
Jimmy Hedman
986dd2ddd2 Debug component doesn't work on RP2040 (#4728) 2023-04-27 08:03:30 +12:00
gcopeland
7abdb5d046 I2c scan recovery reset fix (#4724)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-04-27 08:00:37 +12:00
Jesse Hills
0f1e186189 Merge pull request #4732 from esphome/bump-2023.4.1
2023.4.1
2023-04-24 09:47:08 +12:00
Jesse Hills
96d208e0d8 Bump version to 2023.4.1 2023-04-24 09:11:07 +12:00
Jesse Hills
38ed38864e Use proper schema for delta filter (#4723) 2023-04-24 09:11:07 +12:00
Samuel Sieb
a12ba7bd38 fix flip_x (#4727) 2023-04-24 09:11:06 +12:00
dependabot[bot]
4a177e3931 Bump aioesphomeapi from 13.7.0 to 13.7.1 (#4725)
Bumps [aioesphomeapi](https://github.com/esphome/aioesphomeapi) from 13.7.0 to 13.7.1.
- [Release notes](https://github.com/esphome/aioesphomeapi/releases)
- [Commits](https://github.com/esphome/aioesphomeapi/compare/v13.7.0...v13.7.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-04-23 20:53:50 +00:00
Alexander Momchilov
bef5b38d49 Add supports_stop trait to Cover (#3897)
* 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>
2023-04-23 20:51:32 +00:00
Rebbe Pod
0a95f116fc Get Sunrise & Sunset for a Specific Date (#4712)
* 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
2023-04-23 20:44:35 +00:00
Jesse Hills
327cd662b4 Use proper schema for delta filter (#4723) 2023-04-23 20:42:46 +00:00
Samuel Sieb
bb05ba3d00 fix flip_x (#4727) 2023-04-22 07:41:12 +00:00
Keith Burzinski
c0ad5d1d16 Initial attempt at supporting ESP-IDF 5.0.0 (#4364)
* 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>
2023-04-20 03:54:06 +00:00
Bella Coola
4c39631428 Add support for passive WiFi scanning (#4666)
* Add support for passive WiFi scanning.

* Apply suggestions from code review

Made changes suggested by @jesserockz

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

---------

Co-authored-by: BellaCoola <unknown>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-04-20 03:53:42 +00:00
Fabian
afc2b3b74f Keep Device Class in Flash. (#4639)
* Keep Device Class in Flash.

* Remove blank line

---------

Co-authored-by: Your Name <you@example.com>
2023-04-20 03:53:35 +00:00
Jesse Hills
19fc1417ae Merge pull request #4715 from esphome/bump-2023.4.0
2023.4.0
2023-04-20 15:18:09 +12:00
Jesse Hills
e2fefa51f5 Bump version to 2023.4.0 2023-04-20 14:06:53 +12:00
Jesse Hills
f668d5617f Merge branch 'beta' into bump-2023.4.0 2023-04-20 14:06:52 +12:00
Jesse Hills
47c4ff15d6 Merge pull request #4714 from esphome/bump-2023.4.0b4
2023.4.0b4
2023-04-20 14:00:12 +12:00
Jesse Hills
ccf1bdc0b4 Bump version to 2023.4.0b4 2023-04-20 13:10:26 +12:00
Jesse Hills
e993fcf80c Bump arduino platform version to 5.3.0 (#4713)
* Bump arduino platform version to 5.3.0

* Update root platformio.ini
2023-04-20 13:10:25 +12:00
tracestep
1bdc30a09e Add ethernet powerdown (fixes esphome/issues#4420) (#4706)
* Add ethernet powerdown

* Add on_shutdown (fixes esphome/issues#4420

* Sync dev and clang-tidy fix

* fix typo and trainling space

* Initialize phy_ member

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Use `this` pointer

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Member initialized at declaration

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Use `this` pointer

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Use `this` pointer

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-04-20 13:10:25 +12:00
Jesse Hills
0f7e34e7ec Bump arduino platform version to 5.3.0 (#4713)
* Bump arduino platform version to 5.3.0

* Update root platformio.ini
2023-04-20 00:44:49 +00:00
Jesse Hills
f56e89597f Merge pull request #4711 from esphome/bump-2023.4.0b3
2023.4.0b3
2023-04-20 11:14:00 +12:00
Jesse Hills
9460fb28c4 Bump version to 2023.4.0b3 2023-04-20 10:15:34 +12:00
Jesse Hills
7207b9734f Call on_error if no api client connected that handles voice (#4709) 2023-04-20 10:15:34 +12:00
tracestep
2be703b329 Add ethernet powerdown (fixes esphome/issues#4420) (#4706)
* Add ethernet powerdown

* Add on_shutdown (fixes esphome/issues#4420

* Sync dev and clang-tidy fix

* fix typo and trainling space

* Initialize phy_ member

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Use `this` pointer

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Member initialized at declaration

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Use `this` pointer

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Use `this` pointer

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-04-19 22:10:01 +00:00
Jesse Hills
4cea74ef3b Call on_error if no api client connected that handles voice (#4709) 2023-04-19 20:56:37 +00:00
Jesse Hills
3be3267d06 Merge pull request #4700 from esphome/bump-2023.4.0b2
2023.4.0b2
2023-04-17 17:16:16 +12:00
Jesse Hills
98db604dba Bump version to 2023.4.0b2 2023-04-17 15:45:35 +12:00
Jesse Hills
ebf6f8c6de Add event triggers to voice_assistant (#4699)
* Add event triggers to voice_assistant

* Add triggers to test
2023-04-17 15:45:34 +12:00
Szewcson
2ebacad398 Add timeout to i2c write error logs (#4697) 2023-04-17 15:45:34 +12:00
Jimmy Hedman
53c59cf675 Fixed dns2 for ethernet (#4698) 2023-04-17 15:45:34 +12:00
Jesse Hills
9da261cb39 debug component, allow without debug logging (#4685) 2023-04-17 15:45:34 +12:00
Jesse Hills
3a587ea0d4 Add event triggers to voice_assistant (#4699)
* Add event triggers to voice_assistant

* Add triggers to test
2023-04-17 02:57:28 +00:00
Szewcson
8a60919e1f Add timeout to i2c write error logs (#4697) 2023-04-16 20:12:13 +00:00
Jimmy Hedman
382dcddf12 Fixed dns2 for ethernet (#4698) 2023-04-16 20:10:07 +00:00
Jesse Hills
6b67acbeb5 debug component, allow without debug logging (#4685) 2023-04-14 02:29:28 +00:00
dependabot[bot]
7b0fca6824 Bump docker/build-push-action from 3 to 4 (#4367)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-13 08:13:13 +00:00
dependabot[bot]
47555d314a Bump peter-evans/create-pull-request from 4 to 5 (#4661)
Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 4 to 5.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](https://github.com/peter-evans/create-pull-request/compare/v4...v5)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-13 08:12:24 +00:00
dependabot[bot]
0643b71908 Bump aioesphomeapi from 13.5.1 to 13.7.0 (#4676)
Bumps [aioesphomeapi](https://github.com/esphome/aioesphomeapi) from 13.5.1 to 13.7.0.
- [Release notes](https://github.com/esphome/aioesphomeapi/releases)
- [Commits](https://github.com/esphome/aioesphomeapi/compare/v13.5.1...v13.7.0)

---
updated-dependencies:
- dependency-name: aioesphomeapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-13 05:31:47 +00:00
kahrendt
afc848bf22 Add Bayesian type for binary_sensor_map component (#4640)
* 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>
2023-04-13 01:48:29 +00:00
Jesse Hills
9fbbcd6d8a Merge pull request #4683 from esphome/bump-2023.4.0b1
2023.4.0b1
2023-04-13 11:06:53 +12:00
Jesse Hills
cc1eb648f9 Only allow 5 jobs from each CI run to be in parallel (#4682) 2023-04-12 22:46:19 +00:00
Jesse Hills
04a139fe3d Bump version to 2023.5.0-dev 2023-04-13 10:13:53 +12:00
Jesse Hills
1a86167a47 Bump version to 2023.4.0b1 2023-04-13 10:13:52 +12:00
Jesse Hills
614ed7fd0c Merge branch 'dev' into bump-2023.4.0b1 2023-04-13 10:13:52 +12:00
spacemanspiff2007
4eb69d6af5 Fix restore (#4655)
* ALWAYS_OFF for fan

* ALWAYS_OFF for light

* ALWAYS_OFF for switch
2023-04-12 21:28:02 +00:00
Fabian
0547f2a931 Add KSZ8081 support. (#4668)
Co-authored-by: Your Name <you@example.com>
2023-04-12 21:22:08 +00:00
unhold
b5fbe0b145 Fix cut-off on 2.13" waveshare/ttgo epaper displays (#4255)
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.
2023-04-12 21:19:52 +00:00
unhold
443c3c2a56 Fix graph limits for negative values and other corner cases (#4253)
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.
2023-04-12 21:18:09 +00:00
X-Ryl669
d75daa9644 Add always trigger stop (#4249)
* feat: Add manual control config override 1/3

* feat: Add manual control config override 2/3

* feat: Add manual control config override 3/3

* No magical number is better

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>

---------

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2023-04-12 21:16:44 +00:00
Joe
7963abb27a Fix BedJet setup priority [fixes esphome/issues#3807] (#4677)
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.
2023-04-12 08:33:15 +00:00
Jesse Hills
0b9e8fda34 Fix pin schema for i2s microphone (#4680) 2023-04-12 08:25:19 +00:00
Dave Johnston
a3cacc0c8b Add support for SSD1306 72x40 displays (#4659)
* add SSD1306 72x40

* fix indents

* fix clang style
2023-04-12 04:02:29 +00:00
Keith Burzinski
5a4840f641 Fix some NFC/PN532 crashes (#4678)
* Add + use some constants, fix some crashes

* Fix PN532 crashes
2023-04-12 02:29:06 +00:00
Keith Burzinski
3d7d689040 Fix ESP32 SPI hardware assignment in Arduino fw (#4669) 2023-04-12 01:38:41 +00:00
Jesse Hills
b60c08dd28 Add push to talk voice assistant (#4648)
* 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
2023-04-11 23:45:10 +00:00
dependabot[bot]
80bc567c31 Bump pytest from 7.2.2 to 7.3.0 (#4673)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.2.2 to 7.3.0.
- [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.2...7.3.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-10 22:29:40 +00:00
dependabot[bot]
888ac2e180 Bump zeroconf from 0.47.4 to 0.56.0 (#4674)
Bumps [zeroconf](https://github.com/python-zeroconf/python-zeroconf) from 0.47.4 to 0.56.0.
- [Release notes](https://github.com/python-zeroconf/python-zeroconf/releases)
- [Changelog](https://github.com/python-zeroconf/python-zeroconf/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python-zeroconf/python-zeroconf/compare/0.47.4...0.56.0)

---
updated-dependencies:
- dependency-name: zeroconf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-10 22:29:22 +00:00
Jörg Thalheim
421ebcc8b2 use PRIx macros for printing u32/i32 ints (#4671)
This fix compilation issues with the latest esp-idf.
2023-04-10 22:20:02 +00:00
dependabot[bot]
b56fa8c50a Bump black from 23.1.0 to 23.3.0 (#4635)
* Bump black from 23.1.0 to 23.3.0

Bumps [black](https://github.com/psf/black) from 23.1.0 to 23.3.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/23.1.0...23.3.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update black in pre-commit

---------

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-04-04 02:34:36 +00:00
Ben Hoff
42401775e1 Added in mmc5603 code (#4175)
* added in mmc5603 code

* added in codeowner

* fix linter errors

* whitespace linter errors

* added codeowner

* clang format

* remove clang format from python code

* fix whitespace

* add tests

* fix test

* make requested edits

* remove status manipulation

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-04-04 02:34:14 +00:00
dependabot[bot]
9c9bc58c16 Bump pylint from 2.16.4 to 2.17.2 (#4650)
* Bump pylint from 2.16.4 to 2.17.2

Bumps [pylint](https://github.com/PyCQA/pylint) from 2.16.4 to 2.17.2.
- [Release notes](https://github.com/PyCQA/pylint/releases)
- [Commits](https://github.com/PyCQA/pylint/compare/v2.16.4...v2.17.2)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Add return 0 to run_miniterm

---------

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-04-03 23:55:00 +00:00
tracestep
fbc129cccc Version retry (fixes esphome/issues#3823) (#4651) 2023-04-03 22:23:31 +00:00
Jesse Hills
99638190cb VSCode / devcontainer updates (#4647) 2023-04-03 19:44:46 +00:00
RoboMagus
d78e9e6aa8 Number step not optional (#4649)
* Number step not optional

* Update __init__.py

* Update __init__.py

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-04-03 19:31:11 +00:00
Mikkel Jeppesen
878155a03d Log calibration results at level INFO (#4240)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-31 09:05:28 +00:00
Fabian
9922eb83e2 Support advanced UART customization (#4465)
* Add methods to get hardware uart details.

* Fix `setRxBufferSize` error.

---------

Co-authored-by: Your Name <you@example.com>
2023-03-31 04:30:24 +00:00
Fabian
79f861f012 Avoid sensor padding. (#4638)
Co-authored-by: Your Name <you@example.com>
2023-03-31 04:29:17 +00:00
Fabian
4faa9d109e entity_base avoid padding bytes. (#4637)
Co-authored-by: Your Name <you@example.com>
2023-03-31 04:28:49 +00:00
kahrendt
28534ecc61 Binary map bugfixes (#4636)
* 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
2023-03-31 04:27:24 +00:00
felixlungu
616e0a21d8 add bluetooth mac address in dump_config() (#4628)
* add bluetooth mac address in dump_config()

* Update ble.cpp

* Update ble.cpp

* Update ble.cpp

* Update ble.cpp

* Update ble.cpp

* Update ble.cpp

* Update ble.cpp
2023-03-30 01:12:06 +00:00
Jesse Hills
a546ffd490 Add ifdef to new bt proxy unsubscribe (#4634)
* Add ifdef to new bt proxy unsubscribe

* Also add to subscribe message and wrap api conneciton code

* Format file
2023-03-30 01:08:51 +00:00
Jesse Hills
b5d0aede38 Remove AUTO_LOAD from as3935 (#4630) 2023-03-30 01:08:31 +00:00
github-actions[bot]
a014d853a4 Synchronise Device Classes from Home Assistant (#4633)
* 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>
2023-03-29 02:47:00 +00:00
Jesse Hills
c4ddf7697d Update sync-device-classes.yml 2023-03-29 14:02:34 +13:00
Jesse Hills
a2931b6774 Add workflow to sync device classes with HA dev (#4629) 2023-03-28 23:31:07 +00:00
Fabian
3ac7bf3761 EntityBase: Move ObjectId to Flash (#4569)
* 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>
2023-03-28 09:00:34 +00:00
richardhopton
922344811f feat: Add support to unsubscribe from BLE advertisements (#4620)
* feat: Add support to unsubscribe from BLE advertisements

* Fix tests & clang

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-28 08:54:58 +00:00
Fabian
cb2fcaa9b1 EntityBase Name can stay in flash. (#4594)
* `EntityBase`can stay in flash.

* Trying to please the CI.

---------

Co-authored-by: Your Name <you@example.com>
2023-03-28 06:38:56 +00:00
Alfredo
1f50bd0649 Fix EzoCommandType enum (#4593)
* Fix EzoCommandType enum

Assign explicit value to EZO_CALIBRATION, and rescale all subsequent values.

* Remove enum values

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-27 22:08:26 +00:00
Jesse Hills
e4b2de5c68 Merge pull request #4623 from esphome/bump-2023.3.2
2023.3.2
2023-03-27 16:45:14 +13:00
Jesse Hills
f862b479e7 Bump version to 2023.3.2 2023-03-27 15:58:29 +13:00
tracestep
358c59bd8d SX1509 minimum loop period (fixes esphome/issues#4325) (#4613)
* Minimum loop period (fixes esphome/issues#4325)

* clang-tidy suggestions

* More clang-tidy suggestions
2023-03-27 15:58:28 +13:00
guillempages
74fe135c9c Fix animation resizing (#4608)
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.
2023-03-27 15:58:28 +13:00
Jesse Hills
8d3896172d Swap curly brackets for round on LockGuard (#4610) 2023-03-27 15:58:28 +13:00
Kai Gerken
9d9725144d Fix compile error on pzemdc.h (#4583) 2023-03-27 15:58:28 +13:00
Jesse Hills
06f83bf1c0 Fix platform restriction for bme680_bsec (#4616)
* Fix platform restriction for bme680_bsec

* Fix

* revert spi change

* Add comment back

* Dont crash on rp2040 platform
2023-03-26 22:50:33 +00:00
Jesse Hills
c2756d57d8 Allow entity names to be set to None (#4607)
* Allow entity names to be set to None so they take on the device friendly_name automatically

* Use empty
2023-03-26 22:49:09 +00:00
Berend Haan
56504692af Lower range of CONF_FREQUENCY (#4619) 2023-03-26 22:48:17 +00:00
Jesse Hills
e542e75b9e Require step to be set when calling register_number (#4622) 2023-03-26 22:44:56 +00:00
tracestep
806e43c34c SX1509 minimum loop period (fixes esphome/issues#4325) (#4613)
* Minimum loop period (fixes esphome/issues#4325)

* clang-tidy suggestions

* More clang-tidy suggestions
2023-03-26 21:59:57 +00:00
dependabot[bot]
29e7d00894 Bump actions/stale from 7 to 8 (#4615)
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-26 21:51:37 +00:00
J. Nick Koston
9ee661c1e4 Add ability to clear the gatt cache (#4621)
* 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/4156

https://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
2023-03-26 21:48:56 +00:00
Regev Brody
36c0e2416d add select_schema to select component (#4545)
* add select_schema to select component

* add select_schema to select component

* fix cr
2023-03-26 20:01:35 +00:00
RoboMagus
e4ba3ff1db Limit range on filter time period for remote_receiver (#4604)
* Limit range on filter time period for remote_receiver

* pylint
2023-03-23 18:41:14 +00:00
dependabot[bot]
be69b49880 Bump pytest-asyncio from 0.20.3 to 0.21.0 (#4599)
Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 0.20.3 to 0.21.0.
- [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
- [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.20.3...v0.21.0)

---
updated-dependencies:
- dependency-name: pytest-asyncio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-23 18:38:47 +00:00
dependabot[bot]
cc317d27f5 Bump zeroconf from 0.47.3 to 0.47.4 (#4597)
Bumps [zeroconf](https://github.com/python-zeroconf/python-zeroconf) from 0.47.3 to 0.47.4.
- [Release notes](https://github.com/python-zeroconf/python-zeroconf/releases)
- [Changelog](https://github.com/python-zeroconf/python-zeroconf/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python-zeroconf/python-zeroconf/compare/0.47.3...0.47.4)

---
updated-dependencies:
- dependency-name: zeroconf
  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-23 18:38:20 +00:00
Dominik Skalník
c16709ed95 fix wrong port multiplexer name in dump GPIO function (#4592) 2023-03-23 18:37:40 +00:00
guillempages
e13eaf6706 Fix animation resizing (#4608)
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.
2023-03-22 08:05:09 +00:00
Jesse Hills
a1eb3b8475 Swap curly brackets for round on LockGuard (#4610) 2023-03-22 07:56:02 +00:00
Jesse Hills
d52e425ba2 Remove EntityBase from sprinkler (#4606)
* 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>
2023-03-22 07:35:16 +00:00
Jesse Hills
dd8dc1ef1d Merge pull request #4609 from esphome/bump-2023.3.1
2023.3.1
2023-03-22 12:40:28 +13:00
Jesse Hills
bc427de16a Bump version to 2023.3.1 2023-03-22 12:03:34 +13:00
Jesse Hills
db5988bbe1 rp2040: Use fake Mutex lock (#4602) 2023-03-22 12:03:34 +13:00
Nathaniel Wesley Filardo
a3875af4b4 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-22 12:03:34 +13:00
Jesse Hills
d70e7da0ef rp2040: Use fake Mutex lock (#4602) 2023-03-21 20:25:19 +00:00
Jesse Hills
d42f35de5d Wrap ipv6 code a bit more (#4574)
* Wrap ipv6 code a bit more for when ipv6 support should not be compiled in

* More checks

* More uses

* Fix
2023-03-21 20:24:14 +00:00
jerome992
cd57469e06 Fix negative sqrt root in ct_clamp_sensor.cpp (#2701) (#4236)
Co-authored-by: Jerome <jerome992@internet.lu>
2023-03-20 04:22:22 +00:00
Aaron S. Jackson
d98d6ff45f B/W support for GooDisplay GDEY029T94 (as used on Adafruit MagTag) (#4222)
* B/W support for GooDisplay GDEY029T94

* Fix python style ci

* linter recommendations

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-20 03:45:50 +00:00
Oxan van Leeuwen
14e38f0469 Upgrade clang-format to v13 (#4535)
* Upgrade clang-format to v13

* Apply clang-format-13 formatting changes

* Format

* Format bme_680

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-20 03:38:41 +00:00
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
Jesse Hills
e6737479f7 Merge pull request #4568 from esphome/bump-2023.3.0
2023.3.0
2023-03-16 10:40:18 +13:00
Jesse Hills
7f75832bf1 Bump version to 2023.3.0 2023-03-16 09:38:19 +13:00
Jesse Hills
33339e3bd8 Merge branch 'beta' into bump-2023.3.0 2023-03-16 09:38:19 +13:00
Jesse Hills
c298c1166f Merge pull request #4567 from esphome/bump-2023.3.0b6
2023.3.0b6
2023-03-16 09:34:00 +13:00
Jesse Hills
c3d9eef01f Bump version to 2023.3.0b6 2023-03-16 08:57:54 +13:00
NP v/d Spek
5ffdc66864 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-16 08:57:54 +13: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
9922c1503a Merge pull request #4564 from esphome/bump-2023.3.0b5
2023.3.0b5
2023-03-15 23:46:14 +13:00
Jesse Hills
fce99d4b17 Bump version to 2023.3.0b5 2023-03-15 21:20:08 +13:00
Jesse Hills
11567085d8 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 21:20:08 +13:00
Keith Burzinski
83f8e84247 Remove switch actions during config; bump setup priority (#4563) 2023-03-15 21:20:08 +13: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
Jesse Hills
11eb5cb0fa Merge pull request #4559 from esphome/bump-2023.3.0b4
2023.3.0b4
2023-03-14 16:17:51 +13:00
Jesse Hills
9a7af97b2d Bump version to 2023.3.0b4 2023-03-14 14:11:55 +13:00
Stroe Andrei Catalin
5e11469f50 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 14:11:55 +13:00
DAVe3283
0c7a3d1fff Revert "Remove state class from uptime sensor (#4345)" (#4557)
This reverts commit 36c2e770bf.
Addresses esphome/issues#4193.
2023-03-14 14:11:55 +13:00
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
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
Nathaniel Wesley Filardo
05ab49a615 climate: add on_control callbacks (#4511)
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
2023-03-07 04:19:49 +00:00
Fabian
3773c385c7 Ensure component is ready before update. (#4523)
Co-authored-by: Your Name <you@example.com>
2023-03-07 04:16:42 +00:00
dependabot[bot]
3227ef4bca Bump aioesphomeapi from 13.4.0 to 13.5.0 (#4525)
Bumps [aioesphomeapi](https://github.com/esphome/aioesphomeapi) from 13.4.0 to 13.5.0.
- [Release notes](https://github.com/esphome/aioesphomeapi/releases)
- [Commits](https://github.com/esphome/aioesphomeapi/compare/v13.4.0...v13.5.0)

---
updated-dependencies:
- dependency-name: aioesphomeapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-07 04:07:15 +00:00
Jesse Hills
5a07e8d32b Bump docker dependencies (#4526)
* Bump curl to 7.74.0-1.3+deb11u7

* Bump docker base images
2023-03-07 04:06:42 +00:00
Fredrik Gustafsson
29571a1acd implement pairing for bluetooth proxy (#4475)
* default to just-works encryption

This patch will turn on encryption when making active connections in order to comply with just-works BLE encryption.

* Revert "default to just-works encryption"

This reverts commit 05bc9e9f1c.

* implement pair method

* adhere to clang formatter

* fix oopsie

* bump bluetooth_proxy_version

* add auth callback

* generate new protos

* fix another oopsie

* add pairing status to connection

* clear paired on connect()

* lint

* add unpair ("forget") ble method

* compile protos

* fix oopsie

* add missing unpairing method

* add unpairing

* fix get_paired return type

* remove unused memcpy

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* change to is_paired

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update bluetooth_proxy.cpp

* actually add missing method

* send auth cb on set_encryption failure

* cleanup from havin the worst test setup

* lint

* match auth events to bd_addr

* add second addr check to auth cb

* add addr check to third auth cb

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-06 18:04:35 +00:00
Oxan van Leeuwen
b8538c2c12 Fix typo (#4515) 2023-03-05 23:02:36 +00:00
tljuniper
7466773ac8 substitutions: Don't warn when passwords look like a substitution (#4161)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-05 20:28:46 +00:00
Jesse Hills
b8ca40170e Remove idf components before checking if any in config (#4506)
* Remove idf components before checking if any in config

* Fix bug with no refresh time specified
2023-03-05 20:17:32 +00:00
Aliasghar Dashkhaneh
bd86a0ac3b Update __init__.py (#4514)
In some Sony remote codes, the **data** is more than 16 bits.
2023-03-05 18:45:54 +00:00
Jesse Hills
df3f13ded8 Add int16 to codegen (#4507) 2023-03-04 07:19:51 +00:00
Jesse Hills
a428e2b689 Fix copy-pasta mistake (#4492) 2023-02-27 01:20:56 +00:00
GitforZhangXL
86407b9f6f Change variable "skip_updates" and "skip_updates_counter" type from "uint8_t" to "uint16_t" (#4487)
* change 'skip_updates'from 'uint8' to 'uint16_t'

* Delete modbus_controller_fix.md

* Update modbus_controller.h

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-26 22:35:00 +00:00
Jesse Hills
eceb79ceab Make test3 use huge_app (#4488) 2023-02-26 22:34:51 +00:00
Oxan van Leeuwen
43fb68f8a0 Fix parallel invocations of repeat action (#4480)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-26 22:23:04 +00:00
Jesse Hills
14e7b8a1ef Run CI on merge group (#4489) 2023-02-26 20:13:45 +00:00
Fabian
62459a8ae1 Move Font glyphs to SPI RAM. (#4485)
Co-authored-by: Your Name <you@example.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-26 18:45:30 +00:00
Oxan van Leeuwen
86c0e6114f Lock scheduler items while modifying them (#4410)
* Cosmetic fixes to scheduler code

* Add generic Mutex API

* Lock scheduler items while modifying them

* Always defer MQTT callbacks on Arduino
2023-02-26 18:43:08 +00:00
Fabian
1a9141877d use same heap_caps_malloc parameter as ps_malloc. (#4484)
Co-authored-by: Your Name <you@example.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-26 18:42:29 +00:00
Jesse Hills
6ec18fc630 Update esp32 esp-idf dev and latest version numbers (#4479) 2023-02-26 18:25:22 +00:00
Andreas Hergert
4d674392e8 Add energy to pzemdc (#3626)
* added energy to pzemdc

* fixed calculation

* added test

* moved tests

---------

Co-authored-by: Andreas Hergert <andreas.hergert@otrs.com>
2023-02-23 17:38:34 +00:00
J. Nick Koston
6704b2cedf Bump esp-idf to 4.4.3 via platformio/espressif32 @ 5.3.0 (#4254)
* 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
2023-02-23 02:08:06 +00:00
Yaroslav Heriatovych
fe4fb5f1ac Add Haier climate component (#4001)
* Basic functionality works

* Cleanup

* Add tests

* Separate header

* Fix send_data_

* Formatting fix

* Add __init__.py

* Fix type

* Add codeowners

* Rename supported_swing_modes

* Use multiple swing modes, same as midea platform

* Add CLIMATE_FAN_QUIET handler

* PR fixes
2023-02-23 02:05:33 +00:00
Samuel Sieb
350d4e5071 add kuntze component (#4411)
* add kuntze component

* fixes

* more lint

---------

Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-02-23 01:31:35 +00:00
Jesse Hills
23f47d0ad2 Initial stab at importing idf components (#4000)
* 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
2023-02-23 01:22:39 +00:00
Jesse Hills
c037e95861 Merge pull request #4478 from esphome/bump-2023.2.4
2023.2.4
2023-02-23 14:17:01 +13:00
Jesse Hills
2e1b35959f Bump version to 2023.2.4 2023-02-23 13:42:02 +13:00
Jesse Hills
7f46d9e0f9 Fix multiple remote_receivers with triggers (#4477) 2023-02-23 13:42:01 +13:00
Samuel Sieb
069b5f81a0 fix parity (#4476)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-02-23 13:42:01 +13:00
konsulten
3a36d0b13f BL0939 state_class set for energy sensors (#4463)
BL0939 was missing TOTAL_INCREASING for energy (kWh) thus it did not show as statistics in home assistant
2023-02-23 13:42:01 +13:00
Jesse Hills
f98d93efa8 Fix multiple remote_receivers with triggers (#4477) 2023-02-23 00:38:45 +00:00
Shreyas Karnik
91e037346b add person sensor (SEN21231) from usefulsensors (#4454)
* add person sensor (SEN21231) from usefulsensors

* add person sensor (SEN21231) from usefulsensors

* change file mode

* fix tests

* fix tests

* rollback un-intended changes

* Update esphome/components/sen21231/sen21231.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/sen21231/sen21231.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/sen21231/sen21231.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/sen21231/sen21231.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/sen21231/sen21231.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/sen21231/sen21231.h

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/sen21231/sensor.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/sen21231/sensor.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/sen21231/sensor.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/sen21231/sensor.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* remove unused import

* Update esphome/components/sen21231/sen21231.h

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/sen21231/sensor.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/sen21231/sensor.py

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/sen21231/sen21231.h

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/sen21231/sen21231.h

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* remove unused import

* Update sen21231.h

* lint changes

* linting

* linting

* Update sen21231.h

* Update sen21231.cpp linting

* linting fixes

* fix codeowners

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-23 00:37:23 +00:00
Samuel Sieb
8e1430243e fix parity (#4476)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-02-22 23:40:20 +00:00
Keith Burzinski
98b3d294aa Sprinkler "v2" updates (#4159)
* 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
2023-02-22 01:47:50 +00:00
Mikhail Zakharov
38a01988a5 fix library override logic (#4474)
* fix library override logic

* formatting
2023-02-21 21:52:06 +00:00
Fabian
d16eff5039 Support Mopeka Standard LPG tank bluetooth sensor (#4351)
* 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>
2023-02-21 21:48:29 +00:00
dependabot[bot]
8fb481751f Bump esptool from 4.4 to 4.5 (#4428)
Bumps [esptool](https://github.com/espressif/esptool) from 4.4 to 4.5.
- [Release notes](https://github.com/espressif/esptool/releases)
- [Commits](https://github.com/espressif/esptool/compare/v4.4...v4.5)

---
updated-dependencies:
- dependency-name: esptool
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-20 23:01:49 +00:00
Michael Muré
ba6f89a757 toshiba: add support for quiet fan mode (#4283) 2023-02-20 22:31:25 +00:00
dependabot[bot]
48e76e1538 Bump aioesphomeapi from 13.3.1 to 13.4.0 (#4472)
Bumps [aioesphomeapi](https://github.com/esphome/aioesphomeapi) from 13.3.1 to 13.4.0.
- [Release notes](https://github.com/esphome/aioesphomeapi/releases)
- [Commits](https://github.com/esphome/aioesphomeapi/compare/v13.3.1...v13.4.0)

---
updated-dependencies:
- dependency-name: aioesphomeapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-20 22:29:20 +00:00
Jesse Hills
0e1d018ce3 Allow specifying target and current visual steps for climate (#4440)
* Allow specifying target and current visual steps for climate

* Fixes

* format

* format
2023-02-20 22:22:43 +00:00
Jesse Hills
50fbbf2d3b Move remaining SENSOR_SCHEMA to use sensor_schema() (#4471) 2023-02-20 03:22:37 +00:00
konsulten
247916fe89 BL0939 state_class set for energy sensors (#4463)
BL0939 was missing TOTAL_INCREASING for energy (kWh) thus it did not show as statistics in home assistant
2023-02-20 02:48:59 +00:00
Mat931
ed801f7a27 Add internal_temperature component (#4330)
* Add cpu_temperature component

* Add tests

* Fix formatting

* Possible fix for "sensor not shown in HomeAssistant"

* Rename component to internal_temperature

* Update esphome/components/internal_temperature/internal_temperature.cpp

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>

* Update esphome/components/internal_temperature/internal_temperature.cpp

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>

* Update esphome/components/internal_temperature/internal_temperature.cpp

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>

* Update internal_temperature.h

* Remove unique_id

* Update ESP32 variant detection

---------

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
2023-02-20 02:47:37 +00:00
irtimaled
f68d577986 Add configurable color datapoint (#4383)
* Add configurable color datapoint

* Lint fixes

* Review comments

* Linting
2023-02-19 21:50:46 +00:00
Jesse Hills
5c49730cb9 Simplify binary_sensor_schema function (#4469) 2023-02-19 21:13:40 +00:00
Jesse Hills
04c12823b5 Simplify button_schema function (#4468) 2023-02-19 21:13:37 +00:00
Jesse Hills
add40c7652 Simplify number_schema function (#4467) 2023-02-19 21:13:35 +00:00
Jesse Hills
f0760e99b7 Merge pull request #4466 from esphome/bump-2023.2.3
2023.2.3
2023-02-20 08:54:32 +13:00
Regev Brody
72391389a3 add SUB_BUTTON macro and ability to button schema to define the class (#4450)
* add ability to button schema to define the class

* add SUB_BUTTON macro
2023-02-19 19:54:03 +00:00
Regev Brody
e68beb8a43 add SUB_NUMBER macro and schema to number (#4449)
* add SUB_NUMBER macro and schema

* add SUB_NUMBER macro and schema

* add SUB_NUMBER macro and schema
2023-02-19 19:54:00 +00:00
Paulus Schoutsen
40e2832e67 Simplify sensor schema generation (#4462)
* Simplify sensor schema generation

* Mark class not optional

* Fix assignment
2023-02-19 19:20:13 +00:00
Jesse Hills
18fecf8c09 Bump version to 2023.2.3 2023-02-20 08:16:47 +13:00
Jesse Hills
414cf1b333 Update Manifest to rmeove unused dashboard files and include .c ethernet drivers (#4459) 2023-02-20 08:16:46 +13:00
jmichiel
d10f891f51 fix preset discovery config (#4451)
Co-authored-by: Michiel, Jeroen <jeroen.michiel@teledyneflir.com>
2023-02-20 08:16:46 +13:00
Jesse Hills
36a1f6cfb1 Update Manifest to rmeove unused dashboard files and include .c ethernet drivers (#4459) 2023-02-19 19:12:29 +00:00
Regev Brody
12bef16d54 add SUB_TEXT_SENSOR macro (#4448) 2023-02-19 19:11:24 +00:00
Regev Brody
77db8c8401 add SUB_BINARY_SENSOR macro (#4447) 2023-02-19 19:11:21 +00:00
Adam Jacques
66eecd3675 NeoPixel - Add support for ESP32-S3 (#4435) 2023-02-19 13:38:27 +00:00
jmichiel
c03b1fae68 fix preset discovery config (#4451)
Co-authored-by: Michiel, Jeroen <jeroen.michiel@teledyneflir.com>
2023-02-19 13:33:52 +00:00
Jesse Hills
b5927322e6 Merge pull request #4458 from esphome/bump-2023.2.2
2023.2.2
2023-02-17 19:38:01 +13:00
Jesse Hills
1cf4107e1c Bump version to 2023.2.2 2023-02-17 19:11:15 +13:00
Jesse Hills
c12408326c Fix adoption of variants and pico-w (#4455) 2023-02-17 19:11:14 +13:00
Jesse Hills
37d55b55fc Fix adoption of variants and pico-w (#4455) 2023-02-17 06:06:18 +00:00
Jesse Hills
4434e59e5a Merge pull request #4445 from esphome/bump-2023.2.1
2023.2.1
2023-02-16 15:44:32 +13:00
Jesse Hills
45180d98f6 Bump version to 2023.2.1 2023-02-16 14:06:42 +13:00
Jesse Hills
44494ad18e Add ESPHome version to generated platformio.ini (#4443)
* Add ESPHome version to generated platformio.ini

* Move description to platformio section
2023-02-16 14:06:42 +13:00
Oxan van Leeuwen
9aed758d1b Automate syncing device classes with HA (#4438)
* Sync device classes with HA

* Rename blacklist
2023-02-16 00:28:12 +00:00
Jesse Hills
dbe5587806 Add ESPHome version to generated platformio.ini (#4443)
* Add ESPHome version to generated platformio.ini

* Move description to platformio section
2023-02-16 00:27:32 +00:00
Jesse Hills
1447536906 Merge pull request #4441 from esphome/bump-2023.2.0
2023.2.0
2023-02-15 22:33:31 +13:00
Jesse Hills
27ec517084 Remove dup line 2023-02-15 21:39:17 +13:00
Jesse Hills
ce1f034bac Bump version to 2023.2.0 2023-02-15 19:29:02 +13:00
Jesse Hills
f1f96f16e9 Merge branch 'beta' into bump-2023.2.0 2023-02-15 19:29:02 +13:00
dependabot[bot]
30eec5adee Bump zeroconf from 0.47.1 to 0.47.3 (#4437)
Bumps [zeroconf](https://github.com/python-zeroconf/python-zeroconf) from 0.47.1 to 0.47.3.
- [Release notes](https://github.com/python-zeroconf/python-zeroconf/releases)
- [Changelog](https://github.com/python-zeroconf/python-zeroconf/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python-zeroconf/python-zeroconf/compare/0.47.1...0.47.3)

---
updated-dependencies:
- dependency-name: zeroconf
  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-02-15 06:19:03 +00:00
Oxan van Leeuwen
5307dfee21 Initialize all fields in ESPTime in PCF85063 (#4439) 2023-02-14 22:45:27 +00:00
Dominik Wagenknecht
8b5b9e508b Deep Sleep capable ports for ESP32S3 (#4230)
Update to provide RTC capable ports for ESP32S3.
Fresh from [espressif gpio docs](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/gpio.html)
2023-02-14 21:09:07 +00:00
Jesse Hills
7665e9b076 Merge pull request #4433 from esphome/bump-2023.2.0b5
2023.2.0b5
2023-02-14 14:51:00 +13:00
Jesse Hills
227d94f38d Bump version to 2023.2.0b5 2023-02-14 13:59:49 +13:00
Sergey Dudanov
b724ae9e0e Fix setting wrong traits on midea climate component (#4425)
* Fix issue3914

* Remove also default presets and modes

* Fix traits after autoconf
2023-02-14 13:59:49 +13:00
Jesse Hills
df6cc14201 Bump esphome-dashboard to 20230214.0 (#4431) 2023-02-14 13:59:49 +13:00
Jesse Hills
d981d7859d Handle uart.write in json-config endpoint (#4430) 2023-02-14 13:59:49 +13:00
Jesse Hills
0f1ec515c1 Add version api endpoint (#4429) 2023-02-14 13:59:49 +13:00
WitchKing
78e18256f7 Ledc fix (#4338) 2023-02-14 13:59:49 +13:00
Sergey Dudanov
a0d04ba091 Fix setting wrong traits on midea climate component (#4425)
* Fix issue3914

* Remove also default presets and modes

* Fix traits after autoconf
2023-02-14 00:34:50 +00:00
Jesse Hills
c02871fdfe Add final job so branch protection can require matrix ci steps (#4432) 2023-02-13 23:54:38 +00:00
Jesse Hills
0d52f555b2 Add concurrency limit to ci-docker (#4407) 2023-02-13 23:07:09 +00:00
dependabot[bot]
025cf6320f Bump aioesphomeapi from 13.1.0 to 13.3.1 (#4427)
Bumps [aioesphomeapi](https://github.com/esphome/aioesphomeapi) from 13.1.0 to 13.3.1.
- [Release notes](https://github.com/esphome/aioesphomeapi/releases)
- [Commits](https://github.com/esphome/aioesphomeapi/compare/v13.1.0...v13.3.1)

---
updated-dependencies:
- dependency-name: aioesphomeapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-13 22:56:14 +00:00
dependabot[bot]
5997401e9e Bump pylint from 2.15.10 to 2.16.2 (#4426)
* Bump pylint from 2.15.10 to 2.16.2

Bumps [pylint](https://github.com/PyCQA/pylint) from 2.15.10 to 2.16.2.
- [Release notes](https://github.com/PyCQA/pylint/releases)
- [Commits](https://github.com/PyCQA/pylint/compare/v2.15.10...v2.16.2)

---
updated-dependencies:
- dependency-name: pylint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Lint

---------

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-02-13 22:55:36 +00:00
dependabot[bot]
b4068dac56 Bump platformio from 6.1.5 to 6.1.6 (#4341)
* Bump platformio from 6.1.5 to 6.1.6

Bumps [platformio](https://github.com/platformio/platformio) from 6.1.5 to 6.1.6.
- [Release notes](https://github.com/platformio/platformio/releases)
- [Changelog](https://github.com/platformio/platformio-core/blob/develop/HISTORY.rst)
- [Commits](https://github.com/platformio/platformio/compare/v6.1.5...v6.1.6)

---
updated-dependencies:
- dependency-name: platformio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update dockerfile

---------

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-02-13 22:41:14 +00:00
Jesse Hills
458d6e24fc Bump esphome-dashboard to 20230214.0 (#4431) 2023-02-14 11:38:37 +13:00
Jesse Hills
4f4ca61ada Handle uart.write in json-config endpoint (#4430) 2023-02-14 11:38:21 +13:00
Jesse Hills
dfeeccfcca Add version api endpoint (#4429) 2023-02-14 11:38:05 +13:00
WitchKing
3a101e8ec5 Ledc fix (#4338) 2023-02-13 15:53:40 +13:00
Expaso
7a2d7fdd19 Fixed PlatformIO Build on DEV (#4422)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-13 15:43:52 +13:00
Jesse Hills
4899dfe642 Merge pull request #4423 from esphome/bump-2023.2.0b4
2023.2.0b4
2023-02-13 15:17:05 +13:00
Andre Borie
78f5c417a4 Gracefully reject vacuum map upload requests (#4414)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-13 14:43:11 +13:00
Andre Borie
b8c0f88440 Improve tuya network status command (#4415) 2023-02-13 14:14:35 +13:00
Jesse Hills
d6b6e94059 Bump version to 2023.2.0b4 2023-02-13 11:54:27 +13:00
NP v/d Spek
310355a00b Fix check for empty clipping array (#4421) 2023-02-13 11:54:26 +13:00
NP v/d Spek
8cf26d6f3c Add Clipping to displaybuffer (#4271)
* 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>
2023-02-13 11:54:26 +13:00
Patrick Collins
b15a10f905 Climate PID Autotune Logging fixes (#4136)
* pid autotune logging fixes

* fixed clang-format request

* improved and clarified logging

* changed logging not to alter the TAG

* logging now does not alter TAG. fixed clang formattting

* fixed string issues

* playing with strings to please the clang gods

* playing with strings

* Delete secrets.yaml

* Delete console-fan-autotune-test.yaml

* Update esphome/components/pid/pid_autotuner.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/pid/pid_autotuner.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/pid/pid_autotuner.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/pid/pid_autotuner.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/pid/pid_autotuner.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-13 11:54:26 +13:00
NP v/d Spek
58eeb6b1b8 Fix check for empty clipping array (#4421) 2023-02-12 17:03:53 +01:00
NP v/d Spek
f8acc45be4 Add Clipping to displaybuffer (#4271)
* 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>
2023-02-11 09:56:15 +13:00
dependabot[bot]
b7ab00b699 Bump black from 22.12.0 to 23.1.0 (#4375)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-10 07:40:04 +13:00
Patrick Collins
045489e6d7 Climate PID Autotune Logging fixes (#4136)
* pid autotune logging fixes

* fixed clang-format request

* improved and clarified logging

* changed logging not to alter the TAG

* logging now does not alter TAG. fixed clang formattting

* fixed string issues

* playing with strings to please the clang gods

* playing with strings

* Delete secrets.yaml

* Delete console-fan-autotune-test.yaml

* Update esphome/components/pid/pid_autotuner.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/pid/pid_autotuner.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/pid/pid_autotuner.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/pid/pid_autotuner.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

* Update esphome/components/pid/pid_autotuner.cpp

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-09 22:37:31 +13:00
dependabot[bot]
b14e774a27 Bump pyupgrade from 3.3.0 to 3.3.1 (#4160)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-09 18:27:58 +13:00
dependabot[bot]
2a8745d7e0 Bump frenck/action-yamllint from 1.3.1 to 1.4.0 (#4289)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-09 18:27:30 +13:00
Oxan van Leeuwen
499cb615f1 socket: Format IPv4-mapped IPv6 addresses as regular IPv4 address (#4382) 2023-02-09 18:17:45 +13:00
Jesse Hills
5dcf1debd7 Merge pull request #4406 from esphome/bump-2023.2.0b3
2023.2.0b3
2023-02-09 18:04:35 +13:00
Jesse Hills
9b57e1ac1d Bump version to 2023.2.0b3 2023-02-09 17:38:54 +13:00
Jesse Hills
68683e3a50 Fix release workflow (#4405) 2023-02-09 17:38:54 +13:00
Jesse Hills
4d192c7387 Fix release workflow (#4405) 2023-02-09 17:37:55 +13:00
Jesse Hills
d83324c4dc Merge pull request #4404 from esphome/bump-2023.2.0b2
2023.2.0b2
2023-02-09 16:55:48 +13:00
Jesse Hills
ecde4c1d2d Bump version to 2023.2.0b2 2023-02-09 16:27:25 +13:00
Jesse Hills
bd8e470726 Bump curl version in docker (#4403) 2023-02-09 16:27:24 +13:00
Jesse Hills
9dd01b30bd Bump curl version in docker (#4403) 2023-02-09 16:26:06 +13:00
Jesse Hills
d2913fe627 Merge pull request #4402 from esphome/bump-2023.2.0b1
2023.2.0b1
2023-02-09 15:59:06 +13:00
Jesse Hills
881cd535b9 Bump version to 2023.3.0-dev 2023-02-09 15:33:02 +13:00
Jesse Hills
43acc7dc2c Bump version to 2023.2.0b1 2023-02-09 15:33:02 +13:00
Jesse Hills
e2a16d758b Merge branch 'dev' into bump-2023.2.0b1 2023-02-09 15:33:01 +13:00
Paulus Schoutsen
17ea0efb08 Verify rel_path output is relative (#4247) 2023-02-08 20:20:30 -05:00
Paulus Schoutsen
2fbd33267e Convert secrets constant to a tuple (#4245) 2023-02-09 14:00:58 +13:00
Jesse Hills
cf3977f088 Use the github-script action to call the workflow (#4400) 2023-02-08 19:51:24 -05:00
Paulus Schoutsen
d20d4947ac Remove unused manifest handler (#4169)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-09 13:41:59 +13:00
Eric van Blokland
7810ad40d7 Added CanalSat and CanalSatLD protocol support (#3513)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-09 13:22:05 +13:00
jmichiel
7e1e799b3a add MQTT preset support for Climate components (#4379)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Michiel, Jeroen <jeroen.michiel@teledyneflir.com>
2023-02-09 12:46:01 +13:00
Michael Muré
dfafc41ce6 climate: add support for quiet fan mode (#3609) 2023-02-09 11:28:16 +13:00
Bob Perciaccante
e460792c43 Add support for Lippert LP sensors in mopeka_pro_check component (#4118)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
fixes https://github.com/esphome/feature-requests/issues/1988
2023-02-09 11:07:41 +13:00
Jesse Hills
a9dc491a54 Dont keep logging on improv start (#4401) 2023-02-09 10:25:57 +13:00
Jesse Hills
ac6693f177 mDNS updates (#4399) 2023-02-09 10:25:44 +13:00
Jesse Hills
c6742117d3 Update log for mics4514 to state 3 minute start time. (#4396) 2023-02-09 07:30:19 +13:00
Jesse Hills
b5c47b9669 Update ld2410 logging (#4395) 2023-02-09 07:30:00 +13:00
Quentin Smith
40df3aa55e Merge components in packages (#3555)
Co-authored-by: Paul Monigatti <pm@paul.pm>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-07 14:08:40 +13:00
tomaszduda23
393ca64d70 adds gpio INPUT_OUTPUT_OPEN_DRAIN (#4360)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-07 12:55:35 +13:00
Michał Obrembski
d3627f0972 Added Ethernet Component for ESP IDF with JL1101 PHY driver (#4009)
Co-authored-by: Michał Obrembski <michal@obrembski.com>
2023-02-07 12:54:59 +13:00
Trevor North
124ab31f22 Fix shelly dimmer current sensor device class (#4385)
fixes https://github.com/esphome/issues/issues/4086
2023-02-07 12:46:06 +13:00
Jesse Hills
1b66fa5004 Remove unneeded validation for esp32 gpio pins (#4394) 2023-02-07 12:43:30 +13:00
alexd321
9494c27ad8 modify SGP4X integration to report device_class as air quality index (#4327) 2023-02-07 12:35:09 +13:00
Jesse Hills
3facfa5c21 Allow dashboard import to specify if api encryption key should be generated (#4393) 2023-02-07 12:27:07 +13:00
Samuel Sieb
93ddce2e79 add Resol VBus support (#3976)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
fixes https://github.com/esphome/feature-requests/issues/1949
2023-02-07 12:17:17 +13:00
sebcaps
0bf6e21e1a Add Ld2410 Support (#3919)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-07 11:47:50 +13:00
Florian Trück
6b7b076875 SCD30 Added support for manual calibration (#4362)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-02-03 21:13:27 +13:00
Florian idB
8d6ffb9169 Update sim800l.cpp (#4223) 2023-02-03 07:53:46 +13:00
Jesse Hills
e95d6041d8 Allow final validate of uart stop bits and parity (#4376) 2023-02-02 19:34:25 +13:00
Joakim Plate
0554b06b7e Allow mdns services to be exposed by config (#4202) 2023-02-02 17:18:58 +13:00
Carlos Garcia Saura
e3d9c44bdc Fix pressure compensation in SCD4X (#4357) 2023-02-02 13:22:23 +13:00
Jesse Hills
e847766514 Dump full parsed config to json-config api call (#4373) 2023-02-01 16:59:51 +13:00
Jesse Hills
d4a8df04b8 Bump version to 2023.2.0-dev 2023-02-01 15:57:45 +13:00
Jesse Hills
4af4649e23 Merge pull request #4355 from esphome/bump-2022.12.8
2022.12.8
2023-01-27 10:04:29 +13:00
Jesse Hills
8bcddef39d Bump version to 2022.12.8 2023-01-27 09:44:41 +13:00
Franck Nijhof
4ac96ccea2 Add Home Assistant integration discovery (#4328) 2023-01-27 09:44:41 +13:00
Franck Nijhof
3c5de77ae9 Refactor NGINX configuration of Home Assistant Add-on (#4312) 2023-01-27 09:44:41 +13:00
Franck Nijhof
a2925b1d37 Migrate old-style S6 scripts to s6-rc.d (#4311) 2023-01-27 09:44:41 +13:00
Franck Nijhof
73748e9e20 Upgrades add-on base image to 6.2.0 (#4310) 2023-01-27 09:44:40 +13:00
Mat931
034b47c23a Fix "BLE server / advertising always on" (#4353) 2023-01-27 08:09:22 +13:00
Franck Nijhof
3e017efa30 Add Home Assistant integration discovery (#4328) 2023-01-26 17:48:04 +01:00
WitchKing
aca56fcdcc Added support for ADS1015 (#4281)
Co-authored-by: vilrexa-at-412611259294 <pdzBdl8EkgUikpOWsRCKzTVHMEX2wLnZJRdLhK38oNk=>
2023-01-26 17:20:45 +13:00
Jesse Hills
75c9823899 Merge pull request #4350 from esphome/bump-2022.12.7
2022.12.7
2023-01-26 15:50:03 +13:00
Jesse Hills
c8c0bd3351 Bump version to 2022.12.7 2023-01-26 15:00:18 +13:00
melyux
e1cdeb7c8f Add a soft reset in setup() for bmp280 (#4329)
fixes https://github.com/esphome/issues/issues/3383
2023-01-26 15:00:17 +13:00
Alex
7f97f42552 Fix BME280 initialization before wifi setup (#4190)
fixes https://github.com/esphome/issues/issues/3530
2023-01-26 15:00:17 +13:00
Stephan Martin
aa7f3569ec rename esp32 CAN to TWAI, so it compiles again (#4334)
fixes https://github.com/esphome/issues/issues/4023
2023-01-26 15:00:17 +13:00
Denis Bodor (aka Lefinnois)
2d0a08442e fix stepper jump back with small steps (#4339) 2023-01-26 15:00:17 +13:00
Joakim Sørensen
d2380756b2 Add "content" to deploy-ha-addon-repo dispatch (#4349) 2023-01-26 15:00:17 +13:00
melyux
e778a445d9 Add a soft reset in setup() for bmp280 (#4329)
fixes https://github.com/esphome/issues/issues/3383
2023-01-26 12:11:10 +13:00
Alex
ded86493c2 Fix BME280 initialization before wifi setup (#4190)
fixes https://github.com/esphome/issues/issues/3530
2023-01-26 12:09:38 +13:00
Stephan Martin
4d72eb42a5 rename esp32 CAN to TWAI, so it compiles again (#4334)
fixes https://github.com/esphome/issues/issues/4023
2023-01-26 12:08:55 +13:00
Denis Bodor (aka Lefinnois)
267f0587c6 fix stepper jump back with small steps (#4339) 2023-01-26 12:06:46 +13:00
Jesse Hills
4a374a466a Fix in ble client base address parsing (#4347) 2023-01-26 12:02:53 +13:00
Joakim Sørensen
b27a328d1e Add "content" to deploy-ha-addon-repo dispatch (#4349) 2023-01-26 11:55:06 +13:00
Jesse Hills
d94e9d92ca Fix esp32_ble_tracker setup priority (#4346) 2023-01-26 07:56:36 +13:00
Jesse Hills
36c2e770bf Remove state class from uptime sensor (#4345) 2023-01-25 15:58:47 +13:00
Jesse Hills
79040c116d Add next_url to improv serial component config (#4343) 2023-01-25 14:37:01 +13:00
Jesse Hills
4aac76c549 Refactor esp32_ble_tracker to use esp32_ble core ble setup code (#4173) 2023-01-25 14:36:30 +13:00
Jesse Hills
0ea97df1af Add MICS-4514 gas sensor (#4316) 2023-01-25 09:58:44 +13:00
Jesse Hills
92e66a2764 Dont fail workflows if lint building fails (#4336) 2023-01-24 12:51:14 +13:00
Jesse Hills
925e3cb6c9 Fix missing s 2023-01-23 20:34:31 +00:00
Jesse Hills
6757acba56 Merge pull request #4342 from esphome/bump-2022.12.6
2022.12.6
2023-01-24 08:58:45 +13:00
Jesse Hills
5cc91cdd95 Bump version to 2022.12.6 2023-01-24 08:30:42 +13:00
Jesse Hills
2b41886819 Move from docker manifest command to buildx with platforms (#4320) 2023-01-24 08:30:42 +13:00
Jesse Hills
72c6efd6a0 Merge pull request #4335 from esphome/bump-2022.12.5
2022.12.5
2023-01-23 09:27:18 +13:00
Jesse Hills
a1f1804112 Bump version to 2022.12.5 2023-01-23 09:06:20 +13:00
Jesse Hills
a8b1ceb4e9 Bump nano version in lint docker image (#4218) 2023-01-23 09:06:20 +13:00
Jesse Hills
4fb0f7f8c6 Merge pull request #4323 from esphome/bump-2022.12.4
2022.12.4
2023-01-21 16:17:57 +13:00
Jesse Hills
958cadeca8 Bump version to 2022.12.4 2023-01-20 18:33:09 +13:00
J. Nick Koston
00f2655f1a Always send the MTU request for BLE v3 cached connections (#4322)
closes https://github.com/esphome/esphome/pull/4321
fixes https://github.com/esphome/issues/issues/4041
fixes https://github.com/esphome/issues/issues/3951
2023-01-20 18:33:09 +13:00
Jesse Hills
074f5029eb Fix gpio pin mode for ISR pins (#4216) 2023-01-20 18:33:09 +13:00
J. Nick Koston
615d591367 Always send the MTU request for BLE v3 cached connections (#4322)
closes https://github.com/esphome/esphome/pull/4321
fixes https://github.com/esphome/issues/issues/4041
fixes https://github.com/esphome/issues/issues/3951
2023-01-20 18:31:00 +13:00
Jesse Hills
e236c53f05 Fix missing s 2023-01-20 14:06:47 +13:00
Jesse Hills
10c7055b41 Move from docker manifest command to buildx with platforms (#4320) 2023-01-20 14:01:29 +13:00
functionpointer
a127e60e1b Hydreon: Use new device classes water and precipitation_intensity (#3993)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-01-20 13:56:26 +13:00
Jesse Hills
66a3361e9d Bump esphome-dashboard to 20230120.0 (#4319) 2023-01-20 11:29:37 +13:00
Paulus Schoutsen
13cfe11a19 Add upload dashboard api (#4318) 2023-01-20 09:28:28 +13:00
Stroe Andrei Catalin
6d65671f92 Add friendly name in MDNS records if it is not empty (#4317) 2023-01-20 09:13:18 +13:00
Jesse Hills
f2eafa8fbe Add macro for sub sensor defining (#4315) 2023-01-19 17:36:43 +13:00
Jesse Hills
e4ca3b18cc Format docker/build.py (#4313) 2023-01-19 12:04:51 +13:00
Franck Nijhof
84698ae888 Refactor NGINX configuration of Home Assistant Add-on (#4312) 2023-01-18 19:54:27 +01:00
Franck Nijhof
fd6d6cfb6c Migrate old-style S6 scripts to s6-rc.d (#4311) 2023-01-18 18:22:35 +01:00
Franck Nijhof
8cad9dfc83 Upgrades add-on base image to 6.2.0 (#4310) 2023-01-18 17:23:35 +01:00
Samuel Sieb
5e2f33fde5 add Wiegand reader component (#4288)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-01-18 14:37:54 +13:00
Dan Jackson
029ac75a04 set_retry: add retries remaining parameter to the provided function (#4251) 2023-01-18 14:26:32 +13:00
Valentin Ochs
3aa5953cd9 Implement a slow sigma-delta modulation based output (#4132) 2023-01-18 13:42:32 +13:00
Stanislav Habich
582d90ad72 PCA9685, fix reset device and add option EXTCLK (#3845)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-01-18 13:00:35 +13:00
Mathias Stock
bbb0105c2f Add support for TEE501 (#3773) 2023-01-18 10:43:16 +13:00
Mathias Stock
37d17feecf Add support for HTE501 (#3772) 2023-01-18 10:42:47 +13:00
Mathias Stock
4bf5faf808 Add support for EE895 (#3771) 2023-01-18 10:42:43 +13:00
Z3LIFF
ddedc1cd76 Tsl2591 gain publish (#4291)
fixes https://github.com/esphome/issues/issues/4031
2023-01-18 10:17:31 +13:00
Samuel Sieb
1bb90f304c add key collector component (#4242)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-01-17 17:18:34 +13:00
Jesse Hills
efc6a8df35 Dont default CORE.friendly_name (#4305) 2023-01-17 13:15:47 +13:00
Reuben
e35f90d6e4 Allow 0xA8 ID for APDS9960 (#4287)
fixes https://github.com/esphome/issues/issues/736
2023-01-17 13:14:45 +13:00
Gil Peeters
11518364a1 Display the configured esphome:comment on the WebServer (#4246) 2023-01-17 13:02:54 +13:00
dependabot[bot]
05420291ce Bump aioesphomeapi from 13.0.2 to 13.1.0 (#4301)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-17 12:08:11 +13:00
dependabot[bot]
442faf92c6 Bump pytest from 7.2.0 to 7.2.1 (#4300)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-17 10:37:03 +13:00
Samuel Sieb
62c68f4d60 allow multiple dsmr (#4299)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
fixes https://github.com/esphome/feature-requests/issues/2062
2023-01-17 10:36:44 +13:00
Jesse Hills
c301ae3645 Add friendly_name to device (#4296) 2023-01-17 10:28:09 +13:00
Jesse Hills
3d2d681a7b Remove baud check in tuya dump_config (#4298) 2023-01-16 17:32:15 +13:00
tradeJmark
a45646af1b Calculate PWM wrap dynamically whenever the frequency is changed (#4294)
fixes https://github.com/esphome/issues/issues/3841
2023-01-16 14:17:57 +13:00
Paulus Schoutsen
27185265f6 Clean up dashboard ping result post-rename/delete (#4170) 2023-01-16 13:31:03 +13:00
Joe
a9b7d98194 Fix off-by-one bedjet fan speed (#3873) (#4292)
fixes https://github.com/esphome/issues/issues/3873
2023-01-16 13:27:34 +13:00
J. Nick Koston
ed4a7210d3 Ensure we never write zero bytes (#4284) 2023-01-16 13:24:32 +13:00
Adam Liddell
351ea04517 Fix use of dangling pointers in esp-idf MQTT backend (#4239)
fixes https://github.com/esphome/issues/issues/3406
2023-01-11 16:31:04 +13:00
NP v/d Spek
86a8e1f4a6 small DisplayBuffer images and font update (#4044)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-01-11 14:55:02 +13:00
EtienneMD
1cf3424ebe Add X9C Potentiometer component (#4183)
fixes https://github.com/esphome/feature-requests/issues/1270
2023-01-11 14:51:50 +13:00
Garret Buell
a19f0c0db0 Fix HttpRequestResponseTrigger again (#4285)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
fixes https://github.com/esphome/issues/issues/4010
2023-01-11 14:50:01 +13:00
Garret Buell
530df91044 Fix HttpRequestResponseTrigger (#4270)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
fixes https://github.com/esphome/issues/issues/4010
2023-01-11 12:27:30 +13:00
Stas
c16c0b11cb http_request: add request duration logging (#4272) 2023-01-10 17:40:42 +13:00
Tom Keller
74556b28a8 fix: json compilation error on rp2040 (#4273)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-01-10 17:40:04 +13:00
Joscha Wagner
48340d41d6 Fix frequency limit for MCP9600 (#4276) 2023-01-10 17:39:04 +13:00
dependabot[bot]
6306348379 Bump pylint from 2.15.8 to 2.15.10 (#4278)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 16:46:13 +13:00
Robin Pronk
b1f1329cee Correct decimals in Growatt energy reporting (#4277)
fixes https://github.com/esphome/issues/issues/3888
2023-01-10 16:21:55 +13:00
Fabio Todaro
75dff1e102 Fix Template Switch restore_mode support (#4280)
fixes https://github.com/esphome/issues/issues/4020
2023-01-10 16:20:16 +13:00
Samuel Sieb
fe55f3a43d Add support for matrix keypads (#4241)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-01-10 16:06:54 +13:00
Samuel Sieb
657fd9d0d5 Don't match words containing "id" (#4265)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
fixes https://github.com/esphome/issues/issues/3507
2023-01-10 13:54:15 +13:00
J. Nick Koston
1511a6ebcd Bump zeroconf to 0.47.1 (#4268) 2023-01-09 14:14:06 +13:00
Paulus Schoutsen
ecac26aeba Bump dashboard to 20221231.0 (#4248) 2022-12-31 14:40:50 -05:00
Kuba Szczodrzyński
19bf9b1e36 Add API for dashboard to get boards list by platform (#4168)
* Add API for dashboard to get boards list by platform

* Dashboard API: add board list for ESP32 S2/S3/C3

* Dashboard API: remove endpoint for all boards

* Dashboard API: hide group titles for all platforms

* Dashboard API: fix Python lint

* Dashboard API: refactor /boards to use list output

* Dashboard API: filter boards for selected platform

* Dashboard API: do not duplicate esp32 boards

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-12-31 14:02:56 -05:00
brogon
119a6920f2 PCF85063 RTC chip (#3873)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-12-23 12:33:31 +13:00
cstaahl
8237e13c44 Fix broken PULSE_METER (#4199)
fixes https://github.com/esphome/issues/issues/3730
2022-12-23 11:07:45 +13:00
Cossid
53b60ac817 Add support for SM2235 and SM2335 LED drivers (#3924) 2022-12-23 11:04:21 +13:00
Cossid
a18ab748fd Add support for BP1658CJ LED driver (#4020) 2022-12-23 10:39:44 +13:00
Cossid
917488bbc3 Add support for BP5758D LED driver (#4021) 2022-12-23 10:24:46 +13:00
Jesse Hills
7e376ae952 Add precipitation device class (#4219) 2022-12-22 21:18:58 +13:00
myhomeiot
57a1c207c2 Fix saving light state for restore modes LIGHT_RESTORE_AND_OFF/ON (#4131) 2022-12-22 20:57:53 +13:00
tomaszduda23
50e8e92f0b Fix race condition in web_server scheduler on ESP32 (#3951) 2022-12-22 20:51:24 +13:00
Dan Jackson
ff4fd497c4 Component::set_retry updates (#3305) 2022-12-22 20:48:15 +13:00
Martin Flasskamp
33b1a853b9 calc LEDC PWM Resolution with LEDC_TIMER_BIT_MAX (#3820)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
fixes https://github.com/esphome/issues/issues/3128
2022-12-22 20:21:44 +13:00
Jan Grewe
f2df542cb1 Allow ignoring of failed Modbus response CRC (#3930)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-12-22 20:14:11 +13:00
Dave T
ecbbf2d3f4 Ili9341 8bit indexed mode pt2 (#2502) 2022-12-22 19:53:53 +13:00
Matthew Donoughe
b76c7a0131 Use NAN values for TSL2591 saturation (#3931)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-12-22 19:50:37 +13:00
dependabot[bot]
0b0984f9a0 Bump black from 22.10.0 to 22.12.0 (#4167)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-12-22 19:42:49 +13:00
Francisco J. Solis
9767856784 feat: set a wider range for jpeg quality (#3872)
fixes https://github.com/esphome/issues/issues/3570
2022-12-22 19:34:00 +13:00
Maurice Makaay
c1f09684e6 Handle deprecated sdkconfig option (#4204)
Co-authored-by: Maurice Makaay <maurice@h2b.nl>
fixes https://github.com/mmakaay/esphome-xiaomi_bslamp2/issues/104
2022-12-22 19:27:47 +13:00
Jesse Hills
22b384363b Bump nano version in lint docker image (#4218) 2022-12-22 19:07:39 +13:00
dependabot[bot]
5b23331751 Bump pytest-asyncio from 0.20.2 to 0.20.3 (#4164)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-22 18:44:41 +13:00
dependabot[bot]
7a2bb32843 Bump aioesphomeapi from 13.0.1 to 13.0.2 (#4188)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-22 18:40:00 +13:00
Steve Rodgers
c0a4e07e5a Add Pca9554 component (#4192) 2022-12-22 18:39:25 +13:00
dependabot[bot]
322158cccb Bump actions/stale from 6 to 7 (#4217)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-22 16:55:47 +13:00
Jesse Hills
8db3b59e0f Fix gpio pin mode for ISR pins (#4216) 2022-12-21 14:03:00 +13:00
Jesse Hills
1691976587 Merge pull request #4214 from esphome/bump-2022.12.3
2022.12.3
2022-12-20 23:34:01 +13:00
Jesse Hills
60e6b4d21e Bump version to 2022.12.3 2022-12-20 23:15:39 +13:00
Jesse Hills
5750591df2 Fix ESP32 GPIO when using INPUT PULLUP mode (#4213) 2022-12-20 23:15:39 +13:00
Jesse Hills
0d50caa179 Fix ESP32 GPIO when using INPUT PULLUP mode (#4213) 2022-12-20 23:09:33 +13:00
Deun Lee
8b06135b41 Fix UUID displaying incorrectly in BLE Tracker logs (#4187) 2022-12-19 20:36:16 -08:00
Jesse Hills
a75da54455 Merge pull request #4212 from esphome/bump-2022.12.2
2022.12.2
2022-12-20 11:06:34 +13:00
Jesse Hills
de7f6c3f5f Bump version to 2022.12.2 2022-12-20 10:49:36 +13:00
J. Nick Koston
4245480656 Handle zero padding anywhere in the combined adv data (#4208)
fixes https://github.com/esphome/issues/issues/3913
2022-12-20 10:49:35 +13:00
Jesse Hills
1824c8131e Fix import_full_config for adoption configs (#4197)
* Fix git raw url

* Fix setting full config query param

* Force dashboard import urls to have a branch or tag reference for full import
2022-12-20 10:49:35 +13:00
J. Nick Koston
573ea55187 Handle zero padding anywhere in the combined adv data (#4208)
fixes https://github.com/esphome/issues/issues/3913
2022-12-20 10:40:01 +13:00
Jesse Hills
b48b5d6cc7 Fix import_full_config for adoption configs (#4197)
* Fix git raw url

* Fix setting full config query param

* Force dashboard import urls to have a branch or tag reference for full import
2022-12-16 19:46:56 +13:00
Jesse Hills
4e9606d2e0 Merge pull request #4196 from esphome/bump-2022.12.1
2022.12.1
2022-12-16 14:05:24 +13:00
Jesse Hills
78500fa933 Bump version to 2022.12.1 2022-12-16 13:36:11 +13:00
Jesse Hills
9c69b98a49 Fix i2s_audio media_player compiling for esp32-s2 (#4195) 2022-12-16 13:36:10 +13:00
Jesse Hills
e6d8ef98d3 Mark ESP32-S2 as not having Bluetooth (#4194) 2022-12-16 13:36:10 +13:00
Stefan Agner
3f1af1690b Support non-multiarch toolchains on 32-bit ARM (#4191)
fixes https://github.com/esphome/issues/issues/3904
2022-12-16 13:36:10 +13:00
Jesse Hills
39af967433 Fix i2s_audio media_player compiling for esp32-s2 (#4195) 2022-12-16 10:38:52 +13:00
Jesse Hills
83b5e01a28 Mark ESP32-S2 as not having Bluetooth (#4194) 2022-12-16 10:09:07 +13:00
Stefan Agner
1eacbd50fa Support non-multiarch toolchains on 32-bit ARM (#4191)
fixes https://github.com/esphome/issues/issues/3904
2022-12-16 09:27:59 +13:00
Jesse Hills
84374b6b1e Merge pull request #4186 from esphome/bump-2022.12.0
2022.12.0
2022-12-14 17:06:24 +13:00
Jesse Hills
391316c9b5 Bump version to 2022.12.0 2022-12-14 16:37:39 +13:00
Jesse Hills
705c62ebd7 Merge branch 'beta' into bump-2022.12.0 2022-12-14 16:37:39 +13:00
Jesse Hills
cb520c00a5 Merge pull request #4185 from esphome/bump-2022.12.0b6
2022.12.0b6
2022-12-14 12:24:25 +13:00
Jesse Hills
2f24138345 Bump version to 2022.12.0b6 2022-12-14 12:03:03 +13:00
Jesse Hills
96512b80cc Revert camera config change for esp-idf (#4182) 2022-12-14 12:03:03 +13:00
Jesse Hills
fcb9b51978 Remove warnings when falling through switch cases on purpose (#4181) 2022-12-14 12:03:03 +13:00
Jesse Hills
9bf7c97775 Revert camera config change for esp-idf (#4182) 2022-12-14 11:45:51 +13:00
Jesse Hills
24bf3674f3 Remove warnings when falling through switch cases on purpose (#4181) 2022-12-14 11:45:43 +13:00
Jesse Hills
f408f1a368 Merge pull request #4180 from esphome/bump-2022.12.0b5
2022.12.0b5
2022-12-13 19:42:18 +13:00
Jesse Hills
7d8d563c62 Bump version to 2022.12.0b5 2022-12-13 13:58:44 +13:00
J. Nick Koston
0a1f705fda Speed up bluetooth proxy connections when using esp-idf (#4171) 2022-12-13 13:58:44 +13:00
Jesse Hills
1952c1880b Remove internal pin restriction from cd74hc4067 (#4179) 2022-12-13 13:58:44 +13:00
J. Nick Koston
c47dc09d34 Speed up bluetooth proxy connections when using esp-idf (#4171) 2022-12-13 13:57:12 +13:00
Jesse Hills
db3096c6e1 Remove internal pin restriction from cd74hc4067 (#4179) 2022-12-13 13:44:52 +13:00
Jesse Hills
b03967dac1 Merge pull request #4178 from esphome/bump-2022.12.0b4
2022.12.0b4
2022-12-13 10:14:08 +13:00
Jesse Hills
bcae2596a6 Bump version to 2022.12.0b4 2022-12-13 09:13:28 +13:00
Jesse Hills
fc0347c86c Bump esphome-dashboard to 20221213.0 (#4176) 2022-12-13 09:13:28 +13:00
Jesse Hills
eef578f4b8 Bump esphome-dashboard to 20221213.0 (#4176) 2022-12-13 08:14:18 +13:00
Jesse Hills
d9563d4de1 Merge pull request #4174 from esphome/bump-2022.12.0b3
2022.12.0b3
2022-12-12 17:31:44 +13:00
Jesse Hills
cc7e2bf8db Bump version to 2022.12.0b3 2022-12-12 17:19:12 +13:00
Jesse Hills
5d98e2923b Increase watchdog timeout when starting OTA (#4172) 2022-12-12 17:19:12 +13:00
Jesse Hills
d4e232f267 Increase watchdog timeout when starting OTA (#4172) 2022-12-12 16:16:24 +13:00
Björn Stenberg
cc45945fcf climate: Add features to generic Toshiba model (#3912)
Add fan speed modes, dry and fan-only operation modes.
This reduce differences between generic and PT14111 models.
2022-12-08 14:13:10 -06:00
Jesse Hills
07197d12f6 Merge pull request #4163 from esphome/bump-2022.12.0b2
2022.12.0b2
2022-12-08 14:04:20 +13:00
Jesse Hills
7b0a298497 Bump version to 2022.12.0b2 2022-12-08 13:42:25 +13:00
Jesse Hills
21679cf2ba Fix ble parsing with zero padded advertisements (#4162) 2022-12-08 13:42:24 +13:00
Jesse Hills
0c24d951ff Fix ble parsing with zero padded advertisements (#4162) 2022-12-08 13:39:33 +13:00
John Britton
92e44b8238 Expose lambda action to reset a cycle in slow_pwm (#4158) 2022-12-07 19:27:14 +13:00
Jesse Hills
4be7cd12a1 Merge pull request #4157 from esphome/bump-2022.12.0b1
2022.12.0b1
2022-12-07 17:25:12 +13:00
Jesse Hills
34387adbcd Bump version to 2023.1.0-dev 2022-12-07 17:00:11 +13:00
Jesse Hills
dee4d0ccb7 Bump version to 2022.12.0b1 2022-12-07 17:00:10 +13:00
Jesse Hills
c6885c1bf4 Bump esphome-dashboard to 20221207.0 (#4156) 2022-12-07 16:47:45 +13:00
dependabot[bot]
8b8efb57af Bump aioesphomeapi from 12.2.1 to 13.0.1 (#4149)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-07 16:16:32 +13:00
dependabot[bot]
499e120aa4 Bump dessant/lock-threads from 3 to 4 (#4150)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-07 16:10:43 +13:00
dependabot[bot]
6f198a4736 Bump pyupgrade from 3.2.2 to 3.3.0 (#4137)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-12-07 16:09:21 +13:00
dependabot[bot]
f500f448b1 Bump pytest-asyncio from 0.20.1 to 0.20.2 (#4019)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-07 16:08:26 +13:00
Jesse Hills
6ad9baa870 Add API for dashboard to get boards list (#4154) 2022-12-07 16:07:51 +13:00
Jesse Hills
f843925301 ESP32 IDF: Override toolchain-esp32ulp with espressifs own published version (#4155) 2022-12-07 16:01:26 +13:00
pistifonok
4a3b628946 Fixed deep sleep for ESP32C3 (#4143)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-12-07 15:59:25 +13:00
Jesse Hills
4ffdc38cf5 Add sn74hc165 input shift register (#4151) 2022-12-07 12:10:25 +13:00
Dennis
f83f1bff19 Invalid config for waveshare models with no full_update_every (#4066)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-12-07 11:53:20 +13:00
Jesse Hills
9370ff3dfa Allow dashboard import to pull complete file from github (#3982) 2022-12-07 07:29:56 +13:00
Jesse Hills
2053b02c61 Add reports fahrenheit to tuya climate (#4032) 2022-12-07 07:29:18 +13:00
Jesse Hills
f34e797a0d Change 4 chip limit on sn74hc595 to 256 (#4108) 2022-12-07 07:23:07 +13:00
Samuel Sieb
30a2fc1273 fix switch initialization (#4153)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
fixes https://github.com/esphome/issues/issues/3878
2022-12-06 23:25:19 +13:00
Matthew Schinckel
48da5ef1c4 Use ENTITY_CATEGORY_CONFIG for sprinkler config switches. (#4141)
Update esphome/components/sprinkler/__init__.py

Co-Authored-By: Keith Burzinski <kbx81x@gmail.com>

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
2022-12-05 21:00:48 -06:00
Jesse Hills
7209dd8bae Merge pull request #4152 from esphome/bump-2022.11.5
2022.11.5
2022-12-06 13:12:57 +13:00
Jesse Hills
ab736c89bb Bump version to 2022.11.5 2022-12-06 12:52:48 +13:00
Jesse Hills
6911639617 Fix board pin alias lookup (#4147) 2022-12-06 12:52:48 +13:00
J. Nick Koston
dbbbba3cf8 Fix crash with bluetooth tracker and esp-idf (#4140) 2022-12-06 08:49:39 +13:00
dependabot[bot]
16e523ca68 Bump pylint from 2.15.7 to 2.15.8 (#4148)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-06 08:46:29 +13:00
J. Nick Koston
3b2bbd306f Detect BLE stack unrecoverable state (#4128) 2022-12-06 07:42:51 +13:00
Jesse Hills
54caed36f7 Fix mismatched flake8 version in pre-commit (#4145) 2022-12-05 19:50:11 +13:00
Jesse Hills
dfcccda69e Fix board pin alias lookup (#4147) 2022-12-05 19:46:00 +13:00
dependabot[bot]
de352c1609 Bump esptool from 3.3.1 to 4.4 (#4071)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-12-05 10:08:22 +13:00
dependabot[bot]
c30068fc97 Bump aioesphomeapi from 12.2.0 to 12.2.1 (#4133)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-05 10:00:25 +13:00
Jesse Hills
f28f712827 Bump arduino pico and update wifi methods (#4144) 2022-12-05 08:55:38 +13:00
Jesse Hills
b9720d0715 Merge pull request #4130 from esphome/bump-2022.11.4
2022.11.4
2022-12-01 15:38:52 +13:00
Jesse Hills
47b3267ed4 Bump version to 2022.11.4 2022-12-01 13:47:50 +13:00
Jesse Hills
e16ba2adb5 Fix queuing scripts not compiling (#4077) 2022-12-01 13:47:50 +13:00
Nicolas Graziano
0a19b1e32c Dashboard, after login use relative url. (#4103) 2022-12-01 13:47:49 +13:00
Jesse Hills
bae9a950c0 current-based cover fix copy paste mistake (#4124) 2022-12-01 13:47:49 +13:00
Jesse Hills
b63ade298f Fix queuing scripts not compiling (#4077) 2022-12-01 13:17:44 +13:00
Nicolas Graziano
f117d4f50a Dashboard, after login use relative url. (#4103) 2022-12-01 13:15:32 +13:00
dependabot[bot]
6e4267b797 Bump flake8 from 5.0.4 to 6.0.0 (#4084)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-01 13:11:31 +13:00
Jesse Hills
2dd032475b Allow global setting of compile process limit (#4081) 2022-12-01 12:51:01 +13:00
dependabot[bot]
db0ed055dd Bump pylint from 2.15.6 to 2.15.7 (#4127)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-01 12:49:37 +13:00
Javier Peletier
106c1bfac2 fix RESTORE_INVERTED switch:restore_mode (#4129)
fixes https://github.com/esphome/esphome/pull/3648
2022-12-01 12:49:15 +13:00
Jesse Hills
eb2a0f45db current-based cover fix copy paste mistake (#4124) 2022-11-30 10:59:20 +13:00
Jesse Hills
2b4fdd6c39 Allow auto setting of ble client id if there is only 1 in config (#4125) 2022-11-30 10:59:02 +13:00
Patrick Collins
3669320398 PID Climate - deadband and output sampling (#3254) 2022-11-30 10:58:43 +13:00
Javier Peletier
d706f40ce1 modbus_switch: honor switch:restore_mode (#4122) 2022-11-30 10:44:31 +13:00
J. Nick Koston
027284c29c Speed up uuid parsing when fetching the service list (#4121) 2022-11-30 10:11:48 +13:00
Javier Peletier
c55e01ff3f FIX: Unnecessary flash writes by ModbusSwitch component (#3648) 2022-11-30 10:05:40 +13:00
J. Nick Koston
a59ce7bfa2 Avoid parsing services with v3 connections without cache (#4117)
Co-authored-by: Daniel Cousens <413395+dcousens@users.noreply.github.com>
Co-authored-by: Maurice Makaay <account+github@makaay.nl>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-11-30 09:40:31 +13:00
dependabot[bot]
a6196267c9 Bump aioesphomeapi from 12.0.0 to 12.2.0 (#4120)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-30 08:30:18 +13:00
Jesse Hills
eb664b99ba preprocess out proto_enum_to_string if not needed (#4119) 2022-11-30 08:30:00 +13:00
J. Nick Koston
8414bb9a7a Active BLE connection v3 (#4113)
Co-authored-by: Daniel Cousens <413395+dcousens@users.noreply.github.com>
Co-authored-by: Maurice Makaay <account+github@makaay.nl>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-11-30 07:53:32 +13:00
J. Nick Koston
ccef7c322f Remove uuid lookups from BLE read/write/notify characteristics (#4102)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-11-29 17:30:19 +13:00
Jesse Hills
120327866f Send device address type alongside ble advertisements (#4115) 2022-11-29 17:24:21 +13:00
J. Nick Koston
bc5c2d4eb4 Avoid parsing characteristics and descriptors to reduce memory pressure (#4109) 2022-11-29 17:16:25 +13:00
J. Nick Koston
d5ff8f6117 Reduce memory needed to send the services list (#4110) 2022-11-29 17:14:29 +13:00
J. Nick Koston
ad0d6f6337 Combine the scanner failure check so we only stop the scanner once (#4111) 2022-11-29 17:11:54 +13:00
J. Nick Koston
873de13b3d Fix bluetooth_gatt_write_descriptor never getting a response (#4112) 2022-11-29 17:10:02 +13:00
Jesse Hills
56de8e5cc4 Always use generated api options from aioesphomeapi (#4116) 2022-11-29 16:14:45 +13:00
J. Nick Koston
73c82862cf Improve reliability of bluetooth active connections (#4049)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-11-29 08:15:40 +13:00
J. Nick Koston
75573a3ed1 Fix descriptors not being deleted (#4104) 2022-11-29 07:49:41 +13:00
J. Nick Koston
1166d93805 Fix registering for gatt notify when characteristic only support indicate (#4092) 2022-11-28 14:03:33 +13:00
J. Nick Koston
ac112a32c9 Add logging for BLE connection slots (#4098) 2022-11-28 13:39:35 +13:00
J. Nick Koston
cee45c1221 Make sure all BLE address strings are uppercase (#4097) 2022-11-28 13:33:17 +13:00
J. Nick Koston
fb56b5388e Suppress logging unhandled ESP_BLE_AD_TYPE_INT_RANGE (#4096) 2022-11-28 13:31:13 +13:00
J. Nick Koston
ed42cefeee Align BLE service logging (#4095) 2022-11-28 13:30:41 +13:00
J. Nick Koston
9052947a71 Speed up BLE connections (#4093) 2022-11-28 13:30:05 +13:00
J. Nick Koston
53e0af18fb Make parse_characteristics and parse_descriptors lazy to reduce memory pressure (#4063) 2022-11-28 13:28:02 +13:00
Maurice Makaay
c5f59fad62 Fix regressed 'esphome run' (#4094) 2022-11-27 08:17:07 +13:00
Jesse Hills
b089a4ea80 Allow manually specifying binary file to OTA (#4054) 2022-11-25 13:47:02 +13:00
Jesse Hills
72b2943332 Merge pull request #4083 from esphome/bump-2022.11.3
2022.11.3
2022-11-25 07:23:08 +13:00
Jesse Hills
4ec0ef7548 Bump version to 2022.11.3 2022-11-24 17:01:52 +13:00
Jesse Hills
25bc6761f6 Don't convert climate temperature step (#4082) 2022-11-24 17:01:52 +13:00
Brian Kaufman
81b6562c25 Fix units for refresh: never (#4048) 2022-11-24 17:01:52 +13:00
Samuel Sieb
ae74189fc2 fix missing library (#4051) 2022-11-24 17:01:51 +13:00
Jesse Hills
555bba7698 Don't convert climate temperature step (#4082) 2022-11-24 16:00:09 +13:00
Brian Kaufman
294901fbe9 Fix units for refresh: never (#4048) 2022-11-24 13:31:37 +13:00
Samuel Sieb
ec576bf9f9 fix missing library (#4051) 2022-11-24 13:22:04 +13:00
Jesse Hills
9273e3775b Add vector includes (#4080) 2022-11-24 13:12:55 +13:00
Jesse Hills
ce5cedb466 Update ESP32-audioI2S library (#4073) 2022-11-24 11:16:05 +13:00
Jesse Hills
b184b01600 Remove a bunch of unnecessary pylint disabling (#4079) 2022-11-24 11:09:19 +13:00
Jesse Hills
81b4078871 Don't allow debug component if you don't have at least debug logging level (#4076) 2022-11-23 22:42:20 +13:00
Jesse Hills
d067c8f80b Dont set esp32 pin drive strength unless pin is set for output (#4075) 2022-11-23 20:39:19 +13:00
Jesse Hills
9e516efe10 Merge pull request #4074 from esphome/bump-2022.11.2
2022.11.2
2022-11-23 16:06:34 +13:00
Jesse Hills
366e29439e Bump version to 2022.11.2 2022-11-23 13:04:21 +13:00
J. Nick Koston
1c9c700d7f Avoid creating a new espbt::ESPBTUUID each loop when registering for notify (#4069) 2022-11-23 13:04:21 +13:00
J. Nick Koston
b2e6b9d31f Avoid 128bit uuid loop for 16/32 bit uuids (#4068) 2022-11-23 13:04:21 +13:00
Jesse Hills
7623f63846 rp2040_pwm frequency is per pair of pins (#4061) 2022-11-23 13:04:21 +13:00
Jesse Hills
2bfaf9dce3 Update web_server index (#4060) 2022-11-23 13:04:20 +13:00
Jesse Hills
5c2c1560bb Fix rp2040 pwm to use pico-sdk, not mbed (#4059) 2022-11-23 13:04:20 +13:00
Jens-Christian Skibakk
8975b4b3f6 Boards: Adafruit QT Py ESP32 Pico/C3/S2 (#4064) 2022-11-23 12:54:40 +13:00
Alex Reid
20da03f8c6 Midea ir templatable code (#4053) 2022-11-23 12:53:48 +13:00
Jesse Hills
ef26677b67 Always use brackets around single log macros (#4072) 2022-11-23 10:32:51 +13:00
Jesse Hills
91925b1826 Update ESP-IDF and platform version (#3565)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2022-11-23 09:54:55 +13:00
J. Nick Koston
1f33ad037d Avoid creating a new espbt::ESPBTUUID each loop when registering for notify (#4069) 2022-11-23 09:46:59 +13:00
J. Nick Koston
fef60e335e Avoid 128bit uuid loop for 16/32 bit uuids (#4068) 2022-11-23 09:46:23 +13:00
dependabot[bot]
195c78846f Bump aioesphomeapi from 11.4.3 to 12.0.0 (#4070)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-23 09:45:07 +13:00
Jesse Hills
0f9c956c04 Remove manual handling of ethernet power pin (#4062) 2022-11-23 09:43:43 +13:00
Jesse Hills
7258a82875 rp2040_pwm frequency is per pair of pins (#4061) 2022-11-22 21:12:33 +13:00
Guillermo Ruffino
c1f696c32a fix display_menu recursive schema gen (#4045) 2022-11-21 21:43:01 -03:00
dependabot[bot]
f2b63d9c67 Bump pylint from 2.15.5 to 2.15.6 (#4058)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-22 12:51:11 +13:00
Jesse Hills
7896a7783b Update web_server index (#4060) 2022-11-22 12:41:51 +13:00
Jesse Hills
621771e1ee Fix rp2040 pwm to use pico-sdk, not mbed (#4059) 2022-11-22 12:19:52 +13:00
uPesy Electronics
2b032e8606 Add pin aliases for upesy boards (#3794)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-11-21 19:03:59 +13:00
Yuval Brik
5e1b724697 Add Lolin S2 Mini board (#3264)
fixes https://github.com/esphome/feature-requests/issues/1626
2022-11-21 19:03:21 +13:00
Jesse Hills
e6db61c2f0 Update esp32 boards list (#4056) 2022-11-21 14:15:32 +13:00
Jesse Hills
c2e198311c Update esp32 arduino and platform versions (#3564) 2022-11-21 11:49:30 +13:00
Franck Nijhof
d874626662 Add number device class support (#4042) 2022-11-18 08:01:28 +13:00
Jesse Hills
eead72333e Bump base image versions to latest (#4016) 2022-11-17 16:14:10 +13:00
Jesse Hills
f7096ab78e Merge pull request #4041 from esphome/bump-2022.11.1
2022.11.1
2022-11-17 15:40:51 +13:00
Jesse Hills
98f8feb625 Bump version to 2022.11.1 2022-11-17 13:52:15 +13:00
Jesse Hills
9944ca414e Support ADC on RP2040 (#4040) 2022-11-17 13:52:15 +13:00
Jesse Hills
719c212009 Support ADC on RP2040 (#4040) 2022-11-17 13:51:08 +13:00
Brian Kaufman
65030e1c37 remove unused variable last_save_ in total_daily_energy (#4039) 2022-11-17 13:45:58 +13:00
Jesse Hills
3f88b63920 Merge branch 'release' into dev 2022-11-17 08:12:21 +13:00
Jesse Hills
70f1c71a9f Merge pull request #4038 from esphome/bump-2022.11.0
2022.11.0
2022-11-17 08:05:52 +13:00
John Moxley
816df5ad47 bump nginx-light 1.18.0-6.1+deb11u2 to 1.18.0-6.1+deb11u3 (#4034)
fixes https://github.com/esphome/issues/issues/3793
2022-11-17 07:45:26 +13:00
John Moxley
f7b1602adf bump nginx-light 1.18.0-6.1+deb11u2 to 1.18.0-6.1+deb11u3 (#4034)
fixes https://github.com/esphome/issues/issues/3793
2022-11-17 07:44:17 +13:00
Jesse Hills
7e88eea532 Bump version to 2022.11.0 2022-11-17 07:17:42 +13:00
Jesse Hills
d1cdfd3b72 Merge branch 'beta' into bump-2022.11.0 2022-11-17 07:17:41 +13:00
Jesse Hills
d6a03d48f5 Merge pull request #4037 from esphome/bump-2022.11.0b6
2022.11.0b6
2022-11-16 17:26:45 +13:00
Jesse Hills
d453b42b1a Bump version to 2022.11.0b6 2022-11-16 15:48:50 +13:00
Jesse Hills
7c19b961e2 Always save user wifi credentials if non in config (#4036) 2022-11-16 15:48:50 +13:00
Jesse Hills
147b113b62 Always save user wifi credentials if non in config (#4036) 2022-11-16 15:46:33 +13:00
Jesse Hills
d924702825 Merge pull request #4035 from esphome/bump-2022.11.0b5
2022.11.0b5
2022-11-16 15:45:53 +13:00
Jesse Hills
e8784ba383 Bump version to 2022.11.0b5 2022-11-16 12:30:41 +13:00
2mikrobi
e3a454d1a6 Update_interval less that 1 second in QMC5883L integration (#4031)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-11-16 12:30:41 +13:00
Kuba Szczodrzyński
392dc8b0db Add reset_reason text sensor to debug component (#3814) 2022-11-16 08:14:20 +13:00
2mikrobi
2f62426f09 Update_interval less that 1 second in QMC5883L integration (#4031)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-11-16 08:12:09 +13:00
Jesse Hills
58fda40389 Merge pull request #4026 from esphome/bump-2022.11.0b4
2022.11.0b4
2022-11-14 14:20:09 +13:00
Jesse Hills
6a73699a38 Bump version to 2022.11.0b4 2022-11-14 13:31:48 +13:00
Jesse Hills
3bd6456fbe Mark mqtt as unavailable on rp2040 (#4025) 2022-11-14 13:31:47 +13:00
Jesse Hills
608be4e050 Fix time components on rp2040 (#4024) 2022-11-14 13:31:47 +13:00
Jesse Hills
10f590324b Mark webserver and captive portal as not available on rp2040 (#4023) 2022-11-14 13:31:47 +13:00
Jesse Hills
cb2d9e4bec Mark mqtt as unavailable on rp2040 (#4025) 2022-11-14 13:29:53 +13:00
Jesse Hills
9e3ee28744 Fix time components on rp2040 (#4024) 2022-11-14 13:29:41 +13:00
Jesse Hills
472dcebf2c Mark webserver and captive portal as not available on rp2040 (#4023) 2022-11-14 13:19:32 +13:00
Jesse Hills
39f0f748bf Merge pull request #4018 from esphome/bump-2022.11.0b3
2022.11.0b3
2022-11-11 12:26:49 +13:00
Jesse Hills
9efe59a984 Bump version to 2022.11.0b3 2022-11-11 11:49:37 +13:00
Samuel Sieb
fcb02af782 fix to_lower filter (#4015) 2022-11-11 11:49:37 +13:00
dependabot[bot]
9f30f53c6b Bump pyupgrade from 3.2.0 to 3.2.2 (#4017)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-11-11 10:50:01 +13:00
Samuel Sieb
2f18ae00c5 fix to_lower filter (#4015) 2022-11-11 07:40:53 +13:00
Jesse Hills
27a339fa12 Move CONF_INTERRUPT_PIN to const.py (#4014) 2022-11-10 22:49:04 +13:00
Jesse Hills
3aeef1afd4 Merge pull request #4012 from esphome/bump-2022.11.0b2
2022.11.0b2
2022-11-10 13:33:16 +13:00
Jesse Hills
a45ee8f4ac Bump version to 2022.11.0b2 2022-11-10 11:08:22 +13:00
RoboMagus
31b62d7dca Fix local webserver based on esphome/esphome-webserver#17 (#3958)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
fixes https://github.com/esphome/issues/issues/3720
2022-11-10 11:08:22 +13:00
Jesse Hills
22f81475db Add option for dashboard command to only generate the project and supporting files (#3981) 2022-11-10 11:08:22 +13:00
maringeph
cc7cf73d59 Add cover toggle support to current based cover (#3950) 2022-11-10 11:08:22 +13:00
Jesse Hills
9682e60a25 Update set-output to use new GITHUB_OUTPUT (#4008) 2022-11-10 11:08:22 +13:00
RoboMagus
2c2e68123a Fix local webserver based on esphome/esphome-webserver#17 (#3958)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
fixes https://github.com/esphome/issues/issues/3720
2022-11-10 10:59:42 +13:00
H. Árkosi Róbert
fcec7d45cb add two new icons (#3963) 2022-11-10 09:46:51 +13:00
Jesse Hills
7c8f502e7e Add option for dashboard command to only generate the project and supporting files (#3981) 2022-11-10 09:42:03 +13:00
maringeph
dc17c47634 Add cover toggle support to current based cover (#3950) 2022-11-10 09:40:13 +13:00
dependabot[bot]
3d927c2f44 Bump frenck/action-yamllint from 1.3.0 to 1.3.1 (#4011)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-10 09:38:21 +13:00
dependabot[bot]
0ae61410d2 Bump colorama from 0.4.5 to 0.4.6 (#4010)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-10 09:36:53 +13:00
Jesse Hills
2455589f61 Update set-output to use new GITHUB_OUTPUT (#4008) 2022-11-10 07:42:14 +13:00
Jesse Hills
c6afae0da5 Merge pull request #4007 from esphome/bump-2022.11.0b1
2022.11.0b1
2022-11-09 19:14:07 +13:00
Jesse Hills
3155f02be6 Bump version to 2022.12.0-dev 2022-11-09 17:27:19 +13:00
Jesse Hills
4fa0e860ad Bump version to 2022.11.0b1 2022-11-09 17:27:18 +13:00
jimtng
8c122aa372 Add support for parameters in scripts (#3538)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
fixes https://github.com/esphome/feature-requests/issues/241
2022-11-09 16:51:59 +13:00
Jesse Hills
5a0bf9fee9 Bump esphome-dashboard to 20221109.0 (#4006) 2022-11-09 16:46:44 +13:00
Gilles van den Hoven
dc794918ed Enable calibration, callbacks and custom commands for EZO sensors (#3910)
Co-authored-by: PoppyPop <skytep@gmail.com>
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2022-11-09 16:46:31 +13:00
dependabot[bot]
02b15dbc4a Bump platformio from 6.1.4 to 6.1.5 (#4004)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-11-09 12:03:39 +13:00
dependabot[bot]
ed316b1ce3 Bump aioesphomeapi from 11.4.2 to 11.4.3 (#4002)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-09 11:49:09 +13:00
dependabot[bot]
d7858f16c1 Bump pytest-asyncio from 0.19.0 to 0.20.1 (#4003)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-09 11:48:56 +13:00
Jens-Christian Skibakk
291deb12ad Skip validation of defined pins (#3999) 2022-11-08 19:06:45 +13:00
dependabot[bot]
3e110681c9 Bump black from 22.8.0 to 22.10.0 (#3986)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-11-07 19:24:50 +13:00
dependabot[bot]
65fbfa2097 Bump zeroconf from 0.39.1 to 0.39.4 (#3979)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-07 19:14:13 +13:00
Jesse Hills
16ebf9da4c Lint updates (#3992) 2022-11-07 19:03:59 +13:00
Stanislav Meduna
2c76381fcd Implement a simple LCD menu (#3406)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-11-07 19:00:55 +13:00
tomaszduda23
90683223dd add uart number to LOGCONFIG (#3996) 2022-11-06 15:58:56 -08:00
Jesse Hills
de79171815 RP2040 uart support (#3990) 2022-11-07 10:01:40 +13:00
Jesse Hills
1554c5700e rp2040: Set watchdog to reboot properly (#3991) 2022-11-03 20:47:19 +13:00
dependabot[bot]
5cf257b251 Bump aioesphomeapi from 10.13.0 to 11.4.2 (#3987)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-03 20:30:23 +13:00
mbardeen
04883e14f6 Allow the use of multiple RDM6300 devices (#3989) 2022-11-02 22:25:09 -07:00
Jesse Hills
0a649c184f Always use gh releases in base platformio file (#3988) 2022-11-03 11:41:12 +13:00
Jesse Hills
0e66c899ce Allow multiple bluetooth proxy connections (#3971) 2022-11-02 23:02:33 +13:00
dependabot[bot]
e7d236f939 Bump pytest-mock from 3.8.2 to 3.10.0 (#3877)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-02 19:17:21 +13:00
dependabot[bot]
fae4d03473 Bump pylint from 2.15.3 to 2.15.5 (#3978)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-02 19:16:58 +13:00
Jesse Hills
fd8b9fb028 Merge pull request #3975 from esphome/bump-2022.10.2
2022.10.2
2022-11-02 19:01:54 +13:00
dependabot[bot]
97bd3e7320 Bump actions/stale from 5 to 6 (#3841)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-01 17:19:28 +13:00
dependabot[bot]
dfca2f88d3 Bump pytest from 7.1.3 to 7.2.0 (#3966)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-01 17:18:22 +13:00
dependabot[bot]
8cad93de37 Bump pyupgrade from 3.0.0 to 3.2.0 (#3973)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-01 15:32:30 +13:00
Jesse Hills
bdf1813b3a Bump version to 2022.10.2 2022-11-01 12:38:54 +13:00
Jesse Hills
45b6c93f5f Fix bluetooth_proxy not connecting (#3967) 2022-11-01 12:38:54 +13:00
Jesse Hills
e5b8dd7f2d Fix bluetooth_proxy not connecting (#3967) 2022-10-29 12:42:48 +13:00
Paulus Schoutsen
a1c8b8092b Remove gitpod (#3964) 2022-10-28 10:25:02 -04:00
dependabot[bot]
109ca2406d Bump pytest-cov from 3.0.0 to 4.0.0 (#3922)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-28 15:40:42 +13:00
dependabot[bot]
3a689112fd Bump tornado from 6.1 to 6.2 (#3620)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-28 13:29:10 +13:00
Jesse Hills
40e0cd0f03 Make some minor changes to I²C so rp2040 works (#3959) 2022-10-28 12:33:49 +13:00
Jesse Hills
bf4d3df906 Fix RP2040 SPISettings (#3960) 2022-10-28 12:33:15 +13:00
Jesse Hills
0e30c49e3f Allow using LED pin on rpi pico-w (#3957) 2022-10-28 10:06:22 +13:00
Jesse Hills
e61a01f7bb Fix imports for rp2040 with no wifi (#3956) 2022-10-28 08:12:12 +13:00
Paul Nicholls
f8640cf2cd [SM300D2] Reduce log severity for successful reads (#3955) 2022-10-27 19:27:17 +13:00
Jesse Hills
4bcfeb6e33 Update rp2040 to latest framework release from GitHub (#3954) 2022-10-27 19:26:22 +13:00
Jesse Hills
a5d4ca0f6d Some RP2040 wifi changes for AP mode (#3953) 2022-10-27 19:14:41 +13:00
Jesse Hills
85faecb2fd Add core config option to limit compile process count (#3952) 2022-10-27 12:17:21 +13:00
Jesse Hills
991fc54994 Bump esphome/Improv to 1.2.3 (#3948) 2022-10-27 07:44:15 +13:00
Jesse Hills
2de891dc32 Fix filesystem size for RP2040 OTA (#3947) 2022-10-26 22:57:08 +13:00
Jesse Hills
9865cb7f55 Implement RP2040 preferences (#3946) 2022-10-26 22:56:56 +13:00
Jesse Hills
f97252b93a Implement InterruptLock for RP2040 (#3945) 2022-10-26 16:41:51 +13:00
Jesse Hills
6124531479 Merge pull request #3944 from esphome/bump-2022.10.1
2022.10.1
2022-10-26 12:49:08 +13:00
Jesse Hills
b8549d323c Bump version to 2022.10.1 2022-10-26 12:08:19 +13:00
Franck Nijhof
01adece673 Add wind_speed sensor device class (#3941) 2022-10-26 12:08:19 +13:00
NP v/d Spek
0220934e4c Fixed touch release issue using the interrupt pin (#3925)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-10-26 12:08:19 +13:00
Franck Nijhof
ca09693efa Add water & precipitation_intensity sensor device classes (#3940) 2022-10-26 12:08:19 +13:00
Jesse Hills
e96d7483b3 Update bluetooth proxy limit as soon as connection requested (#3935) 2022-10-26 12:08:18 +13:00
Jesse Hills
f2c4f018de Prefix devcontainer image with ghcr.io (#3942) 2022-10-26 12:04:29 +13:00
Franck Nijhof
237c7dd169 Add wind_speed sensor device class (#3941) 2022-10-26 07:35:12 +13:00
NP v/d Spek
b781b8d77d Fixed touch release issue using the interrupt pin (#3925)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-10-26 07:33:18 +13:00
Franck Nijhof
60b7d1c8a1 Add water & precipitation_intensity sensor device classes (#3940) 2022-10-25 20:37:19 +13:00
cvwillegen
8161222b33 Show local mac when scanning wifi (#3635)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-10-25 19:50:46 +13:00
H. Árkosi Róbert
1000c4466f add proper device class to uptime (#3928)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-10-25 19:10:03 +13:00
Jesse Hills
60717b074e Implement different random for rp2040 (#3939) 2022-10-25 17:59:10 +13:00
Jesse Hills
c3fba97b4c Update base platformio board for rp2040 (#3937) 2022-10-25 17:46:55 +13:00
Jesse Hills
d93f35701f Send manufacturer name via API (#3938) 2022-10-25 17:24:38 +13:00
Jesse Hills
702b60ce66 Make mDNS on rp2040 work (#3936) 2022-10-25 16:23:20 +13:00
Jesse Hills
f8ce597918 Fix error with require_framework_version and rp2040 (#3923) 2022-10-25 13:47:48 +13:00
Jesse Hills
22e0a944c8 Update bluetooth proxy limit as soon as connection requested (#3935) 2022-10-25 12:54:10 +13:00
Jesse Hills
3a134ef009 Update the PR template (#3934) 2022-10-25 12:53:01 +13:00
Jesse Hills
96e8cb66b6 Fix missing dependencies for heatpumpir (#3933) 2022-10-25 12:12:55 +13:00
Jesse Hills
615288c151 Bump esphome-dashboard to 20221020.0 (#3920) 2022-10-20 08:59:41 -04:00
Jesse Hills
6153bcc6ad Initial Support for RP2040 platform (#3284)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-10-20 16:50:39 +13:00
RoboMagus
e87edcc77a Add API interface to request a complete device config as JSON. (#3911)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-10-19 23:39:34 -04:00
dependabot[bot]
a21c3e8e2d Bump platformio from 6.0.2 to 6.1.4 (#3711)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-10-20 12:49:11 +13:00
2525 changed files with 136310 additions and 18743 deletions

View File

@@ -5,9 +5,12 @@ Checks: >-
-altera-*,
-android-*,
-boost-*,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-narrowing-conversions,
-bugprone-signed-char-misuse,
-cert-dcl50-cpp,
-cert-err33-c,
-cert-err58-cpp,
-cert-oop57-cpp,
-cert-str34-c,
@@ -15,6 +18,7 @@ Checks: >-
-clang-analyzer-osx.*,
-clang-diagnostic-delete-abstract-non-virtual-dtor,
-clang-diagnostic-delete-non-abstract-non-virtual-dtor,
-clang-diagnostic-ignored-optimization-argument,
-clang-diagnostic-shadow-field,
-clang-diagnostic-unused-const-variable,
-clang-diagnostic-unused-parameter,
@@ -25,6 +29,7 @@ Checks: >-
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-narrowing-conversions,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-prefer-member-initializer,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
@@ -36,6 +41,7 @@ Checks: >-
-cppcoreguidelines-pro-type-union-access,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-special-member-functions,
-cppcoreguidelines-virtual-class-destructor,
-fuchsia-multiple-inheritance,
-fuchsia-overloaded-operator,
-fuchsia-statically-constructed-objects,
@@ -68,6 +74,7 @@ Checks: >-
-modernize-use-nodiscard,
-mpi-*,
-objc-*,
-readability-container-data-pointer,
-readability-convert-member-functions-to-static,
-readability-else-after-return,
-readability-function-cognitive-complexity,
@@ -82,8 +89,6 @@ WarningsAsErrors: '*'
AnalyzeTemporaryDtors: false
FormatStyle: google
CheckOptions:
- key: google-readability-braces-around-statements.ShortStatementLines
value: '1'
- key: google-readability-function-size.StatementThreshold
value: '800'
- key: google-runtime-int.TypeSuffix
@@ -158,3 +163,9 @@ CheckOptions:
value: ''
- key: readability-qualified-auto.AddConstToQualified
value: 0
- key: readability-identifier-length.MinimumVariableNameLength
value: 0
- key: readability-identifier-length.MinimumParameterNameLength
value: 0
- key: readability-identifier-length.MinimumLoopCounterNameLength
value: 0

View File

@@ -1,56 +1,74 @@
{
"name": "ESPHome Dev",
"image": "esphome/esphome-lint:dev",
"postCreateCommand": [
"script/devcontainer-post-create"
],
"image": "ghcr.io/esphome/esphome-lint:dev",
"postCreateCommand": ["script/devcontainer-post-create"],
"containerEnv": {
"DEVCONTAINER": "1",
"PIP_BREAK_SYSTEM_PACKAGES": "1",
"PIP_ROOT_USER_ACTION": "ignore"
},
"runArgs": [
"--privileged",
"-e",
"ESPHOME_DASHBOARD_USE_PING=1"
// uncomment and edit the path in order to pass though local USB serial to the conatiner
// , "--device=/dev/ttyACM0"
],
"appPort": 6052,
"extensions": [
// python
"ms-python.python",
"visualstudioexptteam.vscodeintellicode",
// yaml
"redhat.vscode-yaml",
// cpp
"ms-vscode.cpptools",
// editorconfig
"editorconfig.editorconfig",
],
"settings": {
"python.languageServer": "Pylance",
"python.pythonPath": "/usr/bin/python3",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true,
"terminal.integrated.defaultProfile.linux": "bash",
"yaml.customTags": [
"!secret scalar",
"!lambda scalar",
"!include_dir_named scalar",
"!include_dir_list scalar",
"!include_dir_merge_list scalar",
"!include_dir_merge_named scalar"
],
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/*.pyc": {
"when": "$(basename).py"
},
"**/__pycache__": true
},
"files.associations": {
"**/.vscode/*.json": "jsonc"
},
"C_Cpp.clang_format_path": "/usr/bin/clang-format-11",
// if you are using avahi in the host device, uncomment these to allow the
// devcontainer to find devices via mdns
//"mounts": [
// "type=bind,source=/dev/bus/usb,target=/dev/bus/usb",
// "type=bind,source=/var/run/dbus,target=/var/run/dbus",
// "type=bind,source=/var/run/avahi-daemon/socket,target=/var/run/avahi-daemon/socket"
//],
"customizations": {
"vscode": {
"extensions": [
// python
"ms-python.python",
"visualstudioexptteam.vscodeintellicode",
// yaml
"redhat.vscode-yaml",
// cpp
"ms-vscode.cpptools",
// editorconfig
"editorconfig.editorconfig"
],
"settings": {
"python.languageServer": "Pylance",
"python.pythonPath": "/usr/bin/python3",
"python.linting.pylintEnabled": true,
"python.linting.enabled": true,
"python.formatting.provider": "black",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true,
"terminal.integrated.defaultProfile.linux": "bash",
"yaml.customTags": [
"!secret scalar",
"!lambda scalar",
"!extend scalar",
"!remove scalar",
"!include_dir_named scalar",
"!include_dir_list scalar",
"!include_dir_merge_list scalar",
"!include_dir_merge_named scalar"
],
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/*.pyc": {
"when": "$(basename).py"
},
"**/__pycache__": true
},
"files.associations": {
"**/.vscode/*.json": "jsonc"
},
"C_Cpp.clang_format_path": "/usr/bin/clang-format-13"
}
}
}
}

1
.gitattributes vendored
View File

@@ -1,2 +1,3 @@
# Normalize line endings to LF in the repository
* text eol=lf
*.png binary

View File

@@ -1,6 +1,6 @@
# What does this implement/fix?
Quick description and explanation of changes
<!-- Quick description and explanation of changes -->
## Types of changes
@@ -18,6 +18,9 @@ Quick description and explanation of changes
- [ ] ESP32
- [ ] ESP32 IDF
- [ ] ESP8266
- [ ] RP2040
- [ ] BK72xx
- [ ] RTL87xx
## Example entry for `config.yaml`:
<!--

97
.github/actions/build-image/action.yaml vendored Normal file
View File

@@ -0,0 +1,97 @@
name: Build Image
inputs:
platform:
description: "Platform to build for"
required: true
example: "linux/amd64"
target:
description: "Target to build"
required: true
example: "docker"
baseimg:
description: "Base image type"
required: true
example: "docker"
suffix:
description: "Suffix to add to tags"
required: true
version:
description: "Version to build"
required: true
example: "2023.12.0"
runs:
using: "composite"
steps:
- name: Generate short tags
id: tags
shell: bash
run: |
output=$(docker/generate_tags.py \
--tag "${{ inputs.version }}" \
--suffix "${{ inputs.suffix }}")
echo $output
for l in $output; do
echo $l >> $GITHUB_OUTPUT
done
- name: Build and push to ghcr by digest
id: build-ghcr
uses: docker/build-push-action@v5.2.0
with:
context: .
file: ./docker/Dockerfile
platforms: ${{ inputs.platform }}
target: ${{ inputs.target }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BASEIMGTYPE=${{ inputs.baseimg }}
BUILD_VERSION=${{ inputs.version }}
outputs: |
type=image,name=ghcr.io/${{ steps.tags.outputs.image_name }},push-by-digest=true,name-canonical=true,push=true
- name: Export ghcr digests
shell: bash
run: |
mkdir -p /tmp/digests/${{ inputs.target }}/ghcr
digest="${{ steps.build-ghcr.outputs.digest }}"
touch "/tmp/digests/${{ inputs.target }}/ghcr/${digest#sha256:}"
- name: Upload ghcr digest
uses: actions/upload-artifact@v3.1.3
with:
name: digests-${{ inputs.target }}-ghcr
path: /tmp/digests/${{ inputs.target }}/ghcr/*
if-no-files-found: error
retention-days: 1
- name: Build and push to dockerhub by digest
id: build-dockerhub
uses: docker/build-push-action@v5.2.0
with:
context: .
file: ./docker/Dockerfile
platforms: ${{ inputs.platform }}
target: ${{ inputs.target }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BASEIMGTYPE=${{ inputs.baseimg }}
BUILD_VERSION=${{ inputs.version }}
outputs: |
type=image,name=docker.io/${{ steps.tags.outputs.image_name }},push-by-digest=true,name-canonical=true,push=true
- name: Export dockerhub digests
shell: bash
run: |
mkdir -p /tmp/digests/${{ inputs.target }}/dockerhub
digest="${{ steps.build-dockerhub.outputs.digest }}"
touch "/tmp/digests/${{ inputs.target }}/dockerhub/${digest#sha256:}"
- name: Upload dockerhub digest
uses: actions/upload-artifact@v3.1.3
with:
name: digests-${{ inputs.target }}-dockerhub
path: /tmp/digests/${{ inputs.target }}/dockerhub/*
if-no-files-found: error
retention-days: 1

View File

@@ -0,0 +1,47 @@
name: Restore Python
inputs:
python-version:
description: Python version to restore
required: true
type: string
cache-key:
description: Cache key to use
required: true
type: string
outputs:
python-version:
description: Python version restored
value: ${{ steps.python.outputs.python-version }}
runs:
using: "composite"
steps:
- name: Set up Python ${{ inputs.python-version }}
id: python
uses: actions/setup-python@v5.0.0
with:
python-version: ${{ inputs.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache/restore@v4.0.1
with:
path: venv
# yamllint disable-line rule:line-length
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ inputs.cache-key }}
- name: Create Python virtual environment
if: steps.cache-venv.outputs.cache-hit != 'true' && runner.os != 'Windows'
shell: bash
run: |
python -m venv venv
source venv/bin/activate
python --version
pip install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt
pip install -e .
- name: Create Python virtual environment
if: steps.cache-venv.outputs.cache-hit != 'true' && runner.os == 'Windows'
shell: bash
run: |
python -m venv venv
./venv/Scripts/activate
python --version
pip install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt
pip install -e .

View File

@@ -13,3 +13,13 @@ updates:
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: "/.github/actions/build-image"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: "/.github/actions/restore-python"
schedule:
interval: daily
open-pull-requests-limit: 10

View File

@@ -8,21 +8,28 @@ on:
branches: [dev, beta, release]
paths:
- "docker/**"
- ".github/workflows/**"
- ".github/workflows/ci-docker.yml"
- "requirements*.txt"
- "platformio.ini"
- "script/platformio_install_deps.py"
pull_request:
paths:
- "docker/**"
- ".github/workflows/**"
- ".github/workflows/ci-docker.yml"
- "requirements*.txt"
- "platformio.ini"
- "script/platformio_install_deps.py"
permissions:
contents: read
packages: read
concurrency:
# yamllint disable-line rule:line-length
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check-docker:
name: Build docker containers
@@ -33,15 +40,15 @@ jobs:
arch: [amd64, armv7, aarch64]
build_type: ["ha-addon", "docker", "lint"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5.0.0
with:
python-version: "3.9"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3.1.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3.0.0
- name: Set TAG
run: |

View File

@@ -7,51 +7,332 @@ on:
branches: [dev, beta, release]
pull_request:
paths:
- "**"
- "!.github/workflows/*.yml"
- ".github/workflows/ci.yml"
- "!.yamllint"
- "!.github/dependabot.yml"
merge_group:
permissions:
contents: read
env:
DEFAULT_PYTHON: "3.9"
PYUPGRADE_TARGET: "--py39-plus"
CLANG_FORMAT_VERSION: "13.0.1"
concurrency:
# yamllint disable-line rule:line-length
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ci:
name: ${{ matrix.name }}
common:
name: Create common environment
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-key.outputs.key }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
- name: Generate cache-key
id: cache-key
run: echo key="${{ hashFiles('requirements.txt', 'requirements_optional.txt', 'requirements_test.txt') }}" >> $GITHUB_OUTPUT
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5.0.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v4.0.1
with:
path: venv
# yamllint disable-line rule:line-length
key: ${{ runner.os }}-${{ steps.python.outputs.python-version }}-venv-${{ steps.cache-key.outputs.key }}
- name: Create Python virtual environment
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
python -m venv venv
. venv/bin/activate
python --version
pip install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt
pip install -e .
black:
name: Check black
runs-on: ubuntu-latest
needs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Run black
run: |
. venv/bin/activate
black --verbose esphome tests
- name: Suggested changes
run: script/ci-suggest-changes
if: always()
flake8:
name: Check flake8
runs-on: ubuntu-latest
needs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Run flake8
run: |
. venv/bin/activate
flake8 esphome
- name: Suggested changes
run: script/ci-suggest-changes
if: always()
pylint:
name: Check pylint
runs-on: ubuntu-latest
needs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Run pylint
run: |
. venv/bin/activate
pylint -f parseable --persistent=n esphome
- name: Suggested changes
run: script/ci-suggest-changes
if: always()
pyupgrade:
name: Check pyupgrade
runs-on: ubuntu-latest
needs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Run pyupgrade
run: |
. venv/bin/activate
pyupgrade ${{ env.PYUPGRADE_TARGET }} `find esphome -name "*.py" -type f`
- name: Suggested changes
run: script/ci-suggest-changes
if: always()
ci-custom:
name: Run script/ci-custom
runs-on: ubuntu-latest
needs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Register matcher
run: echo "::add-matcher::.github/workflows/matchers/ci-custom.json"
- name: Run script/ci-custom
run: |
. venv/bin/activate
script/ci-custom.py
script/build_codeowners.py --check
pytest:
name: Run pytest
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
os:
- ubuntu-latest
- macOS-latest
- windows-latest
exclude:
# Minimize CI resource usage
# by only running the Python version
# version used for docker images on Windows and macOS
- python-version: "3.12"
os: windows-latest
- python-version: "3.10"
os: windows-latest
- python-version: "3.9"
os: windows-latest
- python-version: "3.12"
os: macOS-latest
- python-version: "3.10"
os: macOS-latest
- python-version: "3.9"
os: macOS-latest
runs-on: ${{ matrix.os }}
needs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ matrix.python-version }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Register matcher
run: echo "::add-matcher::.github/workflows/matchers/pytest.json"
- name: Run pytest
if: matrix.os == 'windows-latest'
run: |
./venv/Scripts/activate
pytest -vv --cov-report=xml --tb=native tests
- name: Run pytest
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest'
run: |
. venv/bin/activate
pytest -vv --cov-report=xml --tb=native tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
clang-format:
name: Check clang-format
runs-on: ubuntu-latest
needs:
- common
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Install clang-format
run: |
. venv/bin/activate
pip install clang-format==${{ env.CLANG_FORMAT_VERSION }}
- name: Run clang-format
run: |
. venv/bin/activate
script/clang-format -i
git diff-index --quiet HEAD --
- name: Suggested changes
run: script/ci-suggest-changes
if: always()
compile-tests-list:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
- name: Find all YAML test files
id: set-matrix
run: echo "matrix=$(ls tests/test*.yaml | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
validate-tests:
name: Validate YAML test ${{ matrix.file }}
runs-on: ubuntu-latest
needs:
- common
- compile-tests-list
strategy:
fail-fast: false
matrix:
file: ${{ fromJson(needs.compile-tests-list.outputs.matrix) }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Run esphome config ${{ matrix.file }}
run: |
. venv/bin/activate
esphome config ${{ matrix.file }}
compile-tests:
name: Run YAML test ${{ matrix.file }}
runs-on: ubuntu-latest
needs:
- common
- black
- ci-custom
- clang-format
- flake8
- pylint
- pytest
- pyupgrade
- compile-tests-list
- validate-tests
strategy:
fail-fast: false
max-parallel: 2
matrix:
file: ${{ fromJson(needs.compile-tests-list.outputs.matrix) }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Run esphome compile ${{ matrix.file }}
run: |
. venv/bin/activate
esphome compile ${{ matrix.file }}
clang-tidy:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
needs:
- common
- black
- ci-custom
- clang-format
- flake8
- pylint
- pytest
- pyupgrade
strategy:
fail-fast: false
max-parallel: 2
matrix:
include:
- id: ci-custom
name: Run script/ci-custom
- id: lint-python
name: Run script/lint-python
- id: test
file: tests/test1.yaml
name: Test tests/test1.yaml
pio_cache_key: test1
- id: test
file: tests/test2.yaml
name: Test tests/test2.yaml
pio_cache_key: test2
- id: test
file: tests/test3.yaml
name: Test tests/test3.yaml
pio_cache_key: test3
- id: test
file: tests/test4.yaml
name: Test tests/test4.yaml
pio_cache_key: test4
- id: test
file: tests/test5.yaml
name: Test tests/test5.yaml
pio_cache_key: test5
- id: pytest
name: Run pytest
- id: clang-format
name: Run script/clang-format
- id: clang-tidy
name: Run script/clang-tidy for ESP8266
options: --environment esp8266-arduino-tidy --grep USE_ESP8266
@@ -76,106 +357,122 @@ jobs:
name: Run script/clang-tidy for ESP32 IDF
options: --environment esp32-idf-tidy --grep USE_ESP_IDF
pio_cache_key: tidyesp32-idf
- id: yamllint
name: Run yamllint
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
id: python
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: "3.9"
- name: Cache virtualenv
uses: actions/cache@v3
with:
path: .venv
# yamllint disable-line rule:line-length
key: venv-${{ steps.python.outputs.python-version }}-${{ hashFiles('requirements*.txt') }}
restore-keys: |
venv-${{ steps.python.outputs.python-version }}-
- name: Set up virtualenv
# yamllint disable rule:line-length
run: |
python -m venv .venv
source .venv/bin/activate
pip install -U pip
pip install -r requirements.txt -r requirements_optional.txt -r requirements_test.txt
pip install -e .
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
echo "VIRTUAL_ENV=$GITHUB_WORKSPACE/.venv" >> $GITHUB_ENV
# yamllint enable rule:line-length
# Use per check platformio cache because checks use different parts
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Cache platformio
uses: actions/cache@v3
uses: actions/cache@v4.0.1
with:
path: ~/.platformio
# yamllint disable-line rule:line-length
key: platformio-${{ matrix.pio_cache_key }}-${{ hashFiles('platformio.ini') }}
if: matrix.id == 'test' || matrix.id == 'clang-tidy'
- name: Install clang tools
run: |
sudo apt-get install \
clang-format-11 \
clang-tidy-11
if: matrix.id == 'clang-tidy' || matrix.id == 'clang-format'
- name: Install clang-tidy
run: sudo apt-get install clang-tidy-14
- name: Register problem matchers
run: |
echo "::add-matcher::.github/workflows/matchers/ci-custom.json"
echo "::add-matcher::.github/workflows/matchers/lint-python.json"
echo "::add-matcher::.github/workflows/matchers/python.json"
echo "::add-matcher::.github/workflows/matchers/pytest.json"
echo "::add-matcher::.github/workflows/matchers/gcc.json"
echo "::add-matcher::.github/workflows/matchers/clang-tidy.json"
- name: Lint Custom
run: |
script/ci-custom.py
script/build_codeowners.py --check
if: matrix.id == 'ci-custom'
- name: Lint Python
run: script/lint-python -a
if: matrix.id == 'lint-python'
- run: esphome compile ${{ matrix.file }}
if: matrix.id == 'test'
env:
# Also cache libdeps, store them in a ~/.platformio subfolder
PLATFORMIO_LIBDEPS_DIR: ~/.platformio/libdeps
- name: Run pytest
run: |
pytest -vv --tb=native tests
if: matrix.id == 'pytest'
# Also run git-diff-index so that the step is marked as failed on
# formatting errors, since clang-format doesn't do anything but
# change files if -i is passed.
- name: Run clang-format
run: |
script/clang-format -i
git diff-index --quiet HEAD --
if: matrix.id == 'clang-format'
- name: Run clang-tidy
run: |
. venv/bin/activate
script/clang-tidy --all-headers --fix ${{ matrix.options }}
if: matrix.id == 'clang-tidy'
env:
# Also cache libdeps, store them in a ~/.platformio subfolder
PLATFORMIO_LIBDEPS_DIR: ~/.platformio/libdeps
- name: Run yamllint
if: matrix.id == 'yamllint'
uses: frenck/action-yamllint@v1.3.0
- name: Suggested changes
run: script/ci-suggest-changes
# yamllint disable-line rule:line-length
if: always() && (matrix.id == 'clang-tidy' || matrix.id == 'clang-format' || matrix.id == 'lint-python')
if: always()
list-components:
runs-on: ubuntu-latest
needs:
- common
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
with:
# Fetch enough history so `git merge-base refs/remotes/origin/dev HEAD` works.
fetch-depth: 500
- name: Fetch dev branch
run: |
git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +refs/heads/dev*:refs/remotes/origin/dev* +refs/tags/dev*:refs/tags/dev*
git merge-base refs/remotes/origin/dev HEAD
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: Find changed components
id: set-matrix
run: |
. venv/bin/activate
echo "matrix=$(script/list-components.py --changed | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
test-build-components:
name: Component test ${{ matrix.file }}
runs-on: ubuntu-latest
needs:
- common
- list-components
if: ${{ needs.list-components.outputs.matrix != '[]' && needs.list-components.outputs.matrix != '' }}
strategy:
fail-fast: false
max-parallel: 2
matrix:
file: ${{ fromJson(needs.list-components.outputs.matrix) }}
steps:
- name: Install libsodium
run: sudo apt-get install libsodium-dev
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
- name: Restore Python
uses: ./.github/actions/restore-python
with:
python-version: ${{ env.DEFAULT_PYTHON }}
cache-key: ${{ needs.common.outputs.cache-key }}
- name: test_build_components -e config -c ${{ matrix.file }}
run: |
. venv/bin/activate
./script/test_build_components -e config -c ${{ matrix.file }}
- name: test_build_components -e compile -c ${{ matrix.file }}
run: |
. venv/bin/activate
./script/test_build_components -e compile -c ${{ matrix.file }}
ci-status:
name: CI Status
runs-on: ubuntu-latest
needs:
- common
- black
- ci-custom
- clang-format
- flake8
- pylint
- pytest
- pyupgrade
- compile-tests
- clang-tidy
- test-build-components
if: always()
steps:
- name: Success
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Failure
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1

View File

@@ -18,7 +18,7 @@ jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v3
- uses: dessant/lock-threads@v5.0.1
with:
pr-inactive-days: "1"
pr-lock-reason: ""

25
.github/workflows/needs-docs.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Needs Docs
# yamllint disable-line rule:truthy
on:
pull_request:
types: [labeled, unlabeled]
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Check for needs-docs label
uses: actions/github-script@v7.0.1
with:
script: |
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number
});
const needsDocs = labels.find(label => label.name === 'needs-docs');
if (needsDocs) {
core.setFailed('Pull request needs docs');
}

View File

@@ -19,7 +19,7 @@ jobs:
outputs:
tag: ${{ steps.tag.outputs.tag }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1
- name: Get tag
id: tag
# yamllint disable rule:line-length
@@ -30,8 +30,12 @@ jobs:
TAG=$(cat esphome/const.py | sed -n -E "s/^__version__\s+=\s+\"(.+)\"$/\1/p")
today="$(date --utc '+%Y%m%d')"
TAG="${TAG}${today}"
BRANCH=${GITHUB_REF#refs/heads/}
if [[ "$BRANCH" != "dev" ]]; then
TAG="${TAG}-${BRANCH}"
fi
fi
echo "::set-output name=tag::${TAG}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
# yamllint enable rule:line-length
deploy-pypi:
@@ -39,15 +43,17 @@ jobs:
if: github.repository == 'esphome/esphome' && github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5.0.0
with:
python-version: "3.x"
- name: Set up python environment
env:
ESPHOME_NO_VENV: 1
run: |
script/setup
pip install setuptools wheel twine
pip install twine
- name: Build
run: python setup.py sdist bdist_wheel
- name: Upload
@@ -57,7 +63,7 @@ jobs:
run: twine upload dist/*
deploy-docker:
name: Build and publish docker containers
name: Build ESPHome ${{ matrix.platform }}
if: github.repository == 'esphome/esphome'
permissions:
contents: read
@@ -65,96 +71,149 @@ jobs:
runs-on: ubuntu-latest
needs: [init]
strategy:
fail-fast: false
matrix:
arch: [amd64, armv7, aarch64]
build_type: ["ha-addon", "docker", "lint"]
platform:
- linux/amd64
- linux/arm/v7
- linux/arm64
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5.0.0
with:
python-version: "3.9"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3.1.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
if: matrix.platform != 'linux/amd64'
uses: docker/setup-qemu-action@v3.0.0
- name: Log in to docker hub
uses: docker/login-action@v2
uses: docker/login-action@v3.0.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the GitHub container registry
uses: docker/login-action@v2
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
run: |
docker/build.py \
--tag "${{ needs.init.outputs.tag }}" \
--arch "${{ matrix.arch }}" \
--build-type "${{ matrix.build_type }}" \
build \
--push
- name: Build docker
uses: ./.github/actions/build-image
with:
platform: ${{ matrix.platform }}
target: docker
baseimg: docker
suffix: ""
version: ${{ needs.init.outputs.tag }}
deploy-docker-manifest:
- name: Build ha-addon
uses: ./.github/actions/build-image
with:
platform: ${{ matrix.platform }}
target: hassio
baseimg: hassio
suffix: "hassio"
version: ${{ needs.init.outputs.tag }}
- name: Build lint
uses: ./.github/actions/build-image
with:
platform: ${{ matrix.platform }}
target: lint
baseimg: docker
suffix: lint
version: ${{ needs.init.outputs.tag }}
deploy-manifest:
name: Publish ESPHome ${{ matrix.image.title }} to ${{ matrix.registry }}
runs-on: ubuntu-latest
needs:
- init
- deploy-docker
if: github.repository == 'esphome/esphome'
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
needs: [init, deploy-docker]
strategy:
fail-fast: false
matrix:
build_type: ["ha-addon", "docker", "lint"]
image:
- title: "ha-addon"
target: "hassio"
suffix: "hassio"
- title: "docker"
target: "docker"
suffix: ""
- title: "lint"
target: "lint"
suffix: "lint"
registry:
- ghcr
- dockerhub
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
- uses: actions/checkout@v4.1.1
- name: Download digests
uses: actions/download-artifact@v3.0.2
with:
python-version: "3.9"
- name: Enable experimental manifest support
run: |
mkdir -p ~/.docker
echo "{\"experimental\": \"enabled\"}" > ~/.docker/config.json
name: digests-${{ matrix.image.target }}-${{ matrix.registry }}
path: /tmp/digests
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.1.0
- name: Log in to docker hub
uses: docker/login-action@v2
if: matrix.registry == 'dockerhub'
uses: docker/login-action@v3.0.0
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the GitHub container registry
uses: docker/login-action@v2
if: matrix.registry == 'ghcr'
uses: docker/login-action@v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Run manifest
- name: Generate short tags
id: tags
run: |
docker/build.py \
output=$(docker/generate_tags.py \
--tag "${{ needs.init.outputs.tag }}" \
--build-type "${{ matrix.build_type }}" \
manifest
--suffix "${{ matrix.image.suffix }}" \
--registry "${{ matrix.registry }}")
echo $output
for l in $output; do
echo $l >> $GITHUB_OUTPUT
done
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
docker buildx imagetools create $(jq -Rcnr 'inputs | . / "," | map("-t " + .) | join(" ")' <<< "${{ steps.tags.outputs.tags}}") \
$(printf '${{ steps.tags.outputs.image }}@sha256:%s ' *)
deploy-ha-addon-repo:
if: github.repository == 'esphome/esphome' && github.event_name == 'release'
runs-on: ubuntu-latest
needs: [deploy-docker]
needs: [deploy-manifest]
steps:
- env:
TOKEN: ${{ secrets.DEPLOY_HA_ADDON_REPO_TOKEN }}
# yamllint disable rule:line-length
run: |
TAG="${GITHUB_REF#refs/tags/}"
curl \
-u ":$TOKEN" \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/esphome/home-assistant-addon/actions/workflows/bump-version.yml/dispatches \
-d "{\"ref\":\"main\",\"inputs\":{\"version\":\"$TAG\"}}"
# yamllint enable rule:line-length
- name: Trigger Workflow
uses: actions/github-script@v7.0.1
with:
github-token: ${{ secrets.DEPLOY_HA_ADDON_REPO_TOKEN }}
script: |
github.rest.actions.createWorkflowDispatch({
owner: "esphome",
repo: "home-assistant-addon",
workflow_id: "bump-version.yml",
ref: "main",
inputs: {
version: "${{ github.event.release.tag_name }}",
content: ${{ toJSON(github.event.release.body) }}
}
})

View File

@@ -18,7 +18,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
- uses: actions/stale@v9.0.0
with:
days-before-pr-stale: 90
days-before-pr-close: 7
@@ -26,7 +26,7 @@ jobs:
days-before-issue-close: -1
remove-stale-when-updated: true
stale-pr-label: "stale"
exempt-pr-labels: "no-stale"
exempt-pr-labels: "not-stale"
stale-pr-message: >
There hasn't been any activity on this pull request recently. This
pull request has been automatically marked as stale because of that
@@ -38,7 +38,7 @@ jobs:
close-issues:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
- uses: actions/stale@v9.0.0
with:
days-before-pr-stale: -1
days-before-pr-close: -1

View File

@@ -0,0 +1,49 @@
---
name: Synchronise Device Classes from Home Assistant
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
schedule:
- cron: "45 6 * * *"
jobs:
sync:
name: Sync Device Classes
runs-on: ubuntu-latest
if: github.repository == 'esphome/esphome'
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Checkout Home Assistant
uses: actions/checkout@v4.1.1
with:
repository: home-assistant/core
path: lib/home-assistant
- name: Setup Python
uses: actions/setup-python@v5.0.0
with:
python-version: 3.11
- name: Install Home Assistant
run: |
python -m pip install --upgrade pip
pip install -e lib/home-assistant
- name: Sync
run: |
python ./script/sync-device_class.py
- name: Commit changes
uses: peter-evans/create-pull-request@v6.0.1
with:
commit-message: "Synchronise Device Classes from Home Assistant"
committer: esphomebot <esphome@nabucasa.com>
author: esphomebot <esphome@nabucasa.com>
branch: sync/device-classes
delete-branch: true
title: "Synchronise Device Classes from Home Assistant"
body-path: .github/PULL_REQUEST_TEMPLATE.md
token: ${{ secrets.DEVICE_CLASS_SYNC_TOKEN }}

26
.github/workflows/yaml-lint.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
---
name: YAML lint
# yamllint disable-line rule:truthy
on:
push:
branches: [dev, beta, release]
paths:
- "**.yaml"
- "**.yml"
pull_request:
paths:
- "**.yaml"
- "**.yml"
jobs:
yamllint:
name: yamllint
runs-on: ubuntu-latest
steps:
- name: Check out code from GitHub
uses: actions/checkout@v4.1.1
- name: Run yamllint
uses: frenck/action-yamllint@v1.5.0
with:
strict: true

10
.gitignore vendored
View File

@@ -13,6 +13,12 @@ __pycache__/
# Intellij Idea
.idea
# Eclipse
.project
.cproject
.pydevproject
.settings/
# Vim
*.swp
@@ -128,3 +134,7 @@ tests/.esphome/
sdkconfig.*
!sdkconfig.defaults
.tests/
/components

View File

@@ -1,8 +0,0 @@
---
ports:
- port: 6052
onOpen: open-preview
tasks:
# yamllint disable-line rule:line-length
- before: pyenv local $(pyenv version | grep '^3\.' | cut -d ' ' -f 1) && script/setup
command: python -m esphome dashboard config

View File

@@ -2,16 +2,16 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/ambv/black
rev: 22.6.0
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.2.0
hooks:
- id: black
args:
- --safe
- --quiet
files: ^((esphome|script|tests)/.+)?[^/]+\.py$
- repo: https://gitlab.com/pycqa/flake8
rev: 4.0.1
- repo: https://github.com/PyCQA/flake8
rev: 6.1.0
hooks:
- id: flake8
additional_dependencies:
@@ -27,7 +27,7 @@ repos:
- --branch=release
- --branch=beta
- repo: https://github.com/asottile/pyupgrade
rev: v3.0.0
rev: v3.15.1
hooks:
- id: pyupgrade
args: [--py39-plus]

33
.vscode/tasks.json vendored
View File

@@ -2,15 +2,24 @@
"version": "2.0.0",
"tasks": [
{
"label": "run",
"label": "Run Dashboard",
"type": "shell",
"command": "python3 -m esphome dashboard config/",
"command": "${command:python.interpreterPath}",
"args": [
"-m",
"esphome",
"dashboard",
"config/"
],
"problemMatcher": []
},
{
"label": "clang-tidy",
"type": "shell",
"command": "./script/clang-tidy",
"command": "${command:python.interpreterPath}",
"args": [
"./script/clang-tidy"
],
"problemMatcher": [
{
"owner": "clang-tidy",
@@ -27,6 +36,24 @@
]
}
]
},
{
"label": "Generate proto files",
"type": "shell",
"command": "${command:python.interpreterPath}",
"args": [
"./script/api_protobuf/api_protobuf.py"
],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "never",
"close": true,
"panel": "new"
},
"problemMatcher": []
}
]
}

View File

@@ -1,3 +1,18 @@
---
ignore: |
venv/
extends: default
ignore-from-file: .gitignore
rules:
document-start: disable
empty-lines:
level: error
max: 1
max-start: 0
max-end: 1
indentation:
level: error
spaces: 2
indent-sequences: true
check-multi-line-strings: false
line-length: disable

View File

@@ -11,21 +11,39 @@ esphome/*.py @esphome/core
esphome/core/* @esphome/core
# Integrations
esphome/components/a01nyub/* @MrSuicideParrot
esphome/components/a02yyuw/* @TH-Braemer
esphome/components/absolute_humidity/* @DAVe3283
esphome/components/ac_dimmer/* @glmnet
esphome/components/adc/* @esphome/core
esphome/components/adc128s102/* @DeerMaximum
esphome/components/addressable_light/* @justfalter
esphome/components/ade7880/* @kpfleming
esphome/components/ade7953/* @angelnu
esphome/components/ade7953_i2c/* @angelnu
esphome/components/ade7953_spi/* @angelnu
esphome/components/ads1118/* @solomondg1
esphome/components/ags10/* @mak-42
esphome/components/airthings_ble/* @jeromelaban
esphome/components/airthings_wave_base/* @jeromelaban @kpfleming @ncareau
esphome/components/airthings_wave_mini/* @ncareau
esphome/components/airthings_wave_plus/* @jeromelaban
esphome/components/alarm_control_panel/* @grahambrown11 @hwstar
esphome/components/alpha3/* @jan-hofmeier
esphome/components/am2315c/* @swoboda1337
esphome/components/am43/* @buxtronix
esphome/components/am43/cover/* @buxtronix
esphome/components/am43/sensor/* @buxtronix
esphome/components/analog_threshold/* @ianchi
esphome/components/animation/* @syndlex
esphome/components/anova/* @buxtronix
esphome/components/api/* @OttoWinter
esphome/components/as5600/* @ammmze
esphome/components/as5600/sensor/* @ammmze
esphome/components/as7341/* @mrgnr
esphome/components/async_tcp/* @OttoWinter
esphome/components/atc_mithermometer/* @ahpohl
esphome/components/atm90e26/* @danieltwagner
esphome/components/b_parasite/* @rbaron
esphome/components/ballu/* @bazuchan
esphome/components/bang_bang/* @OttoWinter
@@ -34,49 +52,68 @@ esphome/components/bedjet/climate/* @jhansche
esphome/components/bedjet/fan/* @jhansche
esphome/components/bh1750/* @OttoWinter
esphome/components/binary_sensor/* @esphome/core
esphome/components/bk72xx/* @kuba2k2
esphome/components/bl0939/* @ziceva
esphome/components/bl0940/* @tobias-
esphome/components/bl0942/* @dbuezas
esphome/components/ble_client/* @buxtronix
esphome/components/ble_client/* @buxtronix @clydebarrow
esphome/components/bluetooth_proxy/* @jesserockz
esphome/components/bme280_base/* @esphome/core
esphome/components/bme280_spi/* @apbodrov
esphome/components/bme680_bsec/* @trvrnrth
esphome/components/bmi160/* @flaviut
esphome/components/bmp3xx/* @martgras
esphome/components/bmp581/* @kahrendt
esphome/components/bp1658cj/* @Cossid
esphome/components/bp5758d/* @Cossid
esphome/components/button/* @esphome/core
esphome/components/canbus/* @danielschramm @mvturnho
esphome/components/cap1188/* @MrEditor97
esphome/components/cap1188/* @mreditor97
esphome/components/captive_portal/* @OttoWinter
esphome/components/ccs811/* @habbie
esphome/components/cd74hc4067/* @asoehlke
esphome/components/climate/* @esphome/core
esphome/components/climate_ir/* @glmnet
esphome/components/color_temperature/* @jesserockz
esphome/components/combination/* @Cat-Ion @kahrendt
esphome/components/coolix/* @glmnet
esphome/components/copy/* @OttoWinter
esphome/components/cover/* @esphome/core
esphome/components/cs5460a/* @balrog-kun
esphome/components/cse7761/* @berfenger
esphome/components/cst226/* @clydebarrow
esphome/components/cst816/* @clydebarrow
esphome/components/ct_clamp/* @jesserockz
esphome/components/current_based/* @djwmarcx
esphome/components/dac7678/* @NickB1
esphome/components/daikin_brc/* @hagak
esphome/components/daly_bms/* @s1lvi0
esphome/components/dashboard_import/* @esphome/core
esphome/components/datetime/* @rfdarter
esphome/components/debug/* @OttoWinter
esphome/components/delonghi/* @grob6000
esphome/components/dfplayer/* @glmnet
esphome/components/dfrobot_sen0395/* @niklasweber
esphome/components/dht/* @OttoWinter
esphome/components/display_menu_base/* @numo68
esphome/components/dps310/* @kbx81
esphome/components/ds1307/* @badbadc0ffee
esphome/components/dsmr/* @glmnet @zuidwijk
esphome/components/ektf2232/* @jesserockz
esphome/components/duty_time/* @dudanov
esphome/components/ee895/* @Stock-M
esphome/components/ektf2232/touchscreen/* @jesserockz
esphome/components/emc2101/* @ellull
esphome/components/emmeti/* @E440QF
esphome/components/ens160/* @vincentscode
esphome/components/ens210/* @itn3rd77
esphome/components/esp32/* @esphome/core
esphome/components/esp32_ble/* @jesserockz
esphome/components/esp32_ble/* @Rapsssito @jesserockz
esphome/components/esp32_ble_client/* @jesserockz
esphome/components/esp32_ble_server/* @jesserockz
esphome/components/esp32_ble_server/* @Rapsssito @clydebarrow @jesserockz
esphome/components/esp32_camera_web_server/* @ayufan
esphome/components/esp32_can/* @Sympatron
esphome/components/esp32_improv/* @jesserockz
esphome/components/esp32_rmt_led_strip/* @jesserockz
esphome/components/esp8266/* @esphome/core
esphome/components/ethernet_info/* @gtjadsonsantos
esphome/components/exposure_notifications/* @OttoWinter
@@ -85,39 +122,77 @@ esphome/components/ezo_pmp/* @carlos-sarmiento
esphome/components/factory_reset/* @anatoly-savchenkov
esphome/components/fastled_base/* @OttoWinter
esphome/components/feedback/* @ianchi
esphome/components/fingerprint_grow/* @OnFreund @loongyh
esphome/components/fingerprint_grow/* @OnFreund @alexborro @loongyh
esphome/components/font/* @clydebarrow @esphome/core
esphome/components/fs3000/* @kahrendt
esphome/components/ft5x06/* @clydebarrow
esphome/components/ft63x6/* @gpambrozio
esphome/components/gcja5/* @gcormier
esphome/components/globals/* @esphome/core
esphome/components/gp8403/* @jesserockz
esphome/components/gpio/* @esphome/core
esphome/components/gps/* @coogle
esphome/components/graph/* @synco
esphome/components/graphical_display_menu/* @MrMDavidson
esphome/components/gree/* @orestismers
esphome/components/grove_tb6612fng/* @max246
esphome/components/growatt_solar/* @leeuwte
esphome/components/gt911/* @clydebarrow @jesserockz
esphome/components/haier/* @paveldn
esphome/components/havells_solar/* @sourabhjaiswal
esphome/components/hbridge/fan/* @WeekendWarrior
esphome/components/hbridge/light/* @DotNetDann
esphome/components/he60r/* @clydebarrow
esphome/components/heatpumpir/* @rob-deutsch
esphome/components/hitachi_ac424/* @sourabhjaiswal
esphome/components/hm3301/* @freekode
esphome/components/homeassistant/* @OttoWinter
esphome/components/honeywell_hih_i2c/* @Benichou34
esphome/components/honeywellabp/* @RubyBailey
esphome/components/honeywellabp2_i2c/* @jpfaff
esphome/components/host/* @esphome/core
esphome/components/hrxl_maxsonar_wr/* @netmikey
esphome/components/hte501/* @Stock-M
esphome/components/htu31d/* @betterengineering
esphome/components/hydreon_rgxx/* @functionpointer
esphome/components/hyt271/* @Philippe12
esphome/components/i2c/* @esphome/core
esphome/components/i2s_audio/* @jesserockz
esphome/components/i2s_audio/media_player/* @jesserockz
esphome/components/i2s_audio/microphone/* @jesserockz
esphome/components/i2s_audio/speaker/* @jesserockz
esphome/components/iaqcore/* @yozik04
esphome/components/ili9xxx/* @clydebarrow @nielsnl68
esphome/components/improv_base/* @esphome/core
esphome/components/improv_serial/* @esphome/core
esphome/components/ina260/* @MrEditor97
esphome/components/ina226/* @Sergio303 @latonita
esphome/components/ina260/* @mreditor97
esphome/components/inkbird_ibsth1_mini/* @fkirill
esphome/components/inkplate6/* @jesserockz
esphome/components/integration/* @OttoWinter
esphome/components/internal_temperature/* @Mat931
esphome/components/interval/* @esphome/core
esphome/components/json/* @OttoWinter
esphome/components/kalman_combinator/* @Cat-Ion
esphome/components/kamstrup_kmp/* @cfeenstra1024
esphome/components/key_collector/* @ssieb
esphome/components/key_provider/* @ssieb
esphome/components/kuntze/* @ssieb
esphome/components/lcd_menu/* @numo68
esphome/components/ld2410/* @regevbr @sebcaps
esphome/components/ld2420/* @descipher
esphome/components/ledc/* @OttoWinter
esphome/components/libretiny/* @kuba2k2
esphome/components/libretiny_pwm/* @kuba2k2
esphome/components/light/* @esphome/core
esphome/components/lightwaverf/* @max246
esphome/components/lilygo_t5_47/touchscreen/* @jesserockz
esphome/components/lock/* @esphome/core
esphome/components/logger/* @esphome/core
esphome/components/ltr390/* @sjtrny
esphome/components/matrix_keypad/* @ssieb
esphome/components/max31865/* @DAVe3283
esphome/components/max44009/* @berfenger
esphome/components/max6956/* @looping40
esphome/components/max7219digit/* @rspaargaren
esphome/components/max9611/* @mckaymatthew
esphome/components/mcp23008/* @jesserockz
@@ -131,15 +206,22 @@ esphome/components/mcp2515/* @danielschramm @mvturnho
esphome/components/mcp3204/* @rsumner
esphome/components/mcp4728/* @berfenger
esphome/components/mcp47a1/* @jesserockz
esphome/components/mcp9600/* @MrEditor97
esphome/components/mcp9600/* @mreditor97
esphome/components/mcp9808/* @k7hpn
esphome/components/md5/* @esphome/core
esphome/components/mdns/* @esphome/core
esphome/components/media_player/* @jesserockz
esphome/components/micro_wake_word/* @jesserockz @kahrendt
esphome/components/micronova/* @jorre05
esphome/components/microphone/* @jesserockz
esphome/components/mics_4514/* @jesserockz
esphome/components/midea/* @dudanov
esphome/components/midea_ir/* @dudanov
esphome/components/mitsubishi/* @RubyBailey
esphome/components/mlx90393/* @functionpointer
esphome/components/mlx90614/* @jesserockz
esphome/components/mmc5603/* @benhoff
esphome/components/mmc5983/* @agoode
esphome/components/modbus_controller/* @martgras
esphome/components/modbus_controller/binary_sensor/* @martgras
esphome/components/modbus_controller/number/* @martgras
@@ -148,65 +230,99 @@ esphome/components/modbus_controller/select/* @martgras @stegm
esphome/components/modbus_controller/sensor/* @martgras
esphome/components/modbus_controller/switch/* @martgras
esphome/components/modbus_controller/text_sensor/* @martgras
esphome/components/mopeka_ble/* @spbrogan
esphome/components/mopeka_ble/* @Fabian-Schmidt @spbrogan
esphome/components/mopeka_pro_check/* @spbrogan
esphome/components/mopeka_std_check/* @Fabian-Schmidt
esphome/components/mpl3115a2/* @kbickar
esphome/components/mpu6886/* @fabaff
esphome/components/ms8607/* @e28eta
esphome/components/network/* @esphome/core
esphome/components/nextion/* @senexcrenshaw
esphome/components/nextion/binary_sensor/* @senexcrenshaw
esphome/components/nextion/sensor/* @senexcrenshaw
esphome/components/nextion/switch/* @senexcrenshaw
esphome/components/nextion/text_sensor/* @senexcrenshaw
esphome/components/nfc/* @jesserockz
esphome/components/nfc/* @jesserockz @kbx81
esphome/components/noblex/* @AGalfra
esphome/components/number/* @esphome/core
esphome/components/ota/* @esphome/core
esphome/components/output/* @esphome/core
esphome/components/pca6416a/* @Mat931
esphome/components/pca9554/* @clydebarrow @hwstar
esphome/components/pcf85063/* @brogon
esphome/components/pcf8563/* @KoenBreeman
esphome/components/pid/* @OttoWinter
esphome/components/pipsolar/* @andreashergert1984
esphome/components/pm1006/* @habbie
esphome/components/pmsa003i/* @sjtrny
esphome/components/pmwcs3/* @SeByDocKy
esphome/components/pn532/* @OttoWinter @jesserockz
esphome/components/pn532_i2c/* @OttoWinter @jesserockz
esphome/components/pn532_spi/* @OttoWinter @jesserockz
esphome/components/pn7150/* @jesserockz @kbx81
esphome/components/pn7150_i2c/* @jesserockz @kbx81
esphome/components/pn7160/* @jesserockz @kbx81
esphome/components/pn7160_i2c/* @jesserockz @kbx81
esphome/components/pn7160_spi/* @jesserockz @kbx81
esphome/components/power_supply/* @esphome/core
esphome/components/preferences/* @esphome/core
esphome/components/psram/* @esphome/core
esphome/components/pulse_meter/* @cstaahl @stevebaxter
esphome/components/pulse_meter/* @TrentHouliston @cstaahl @stevebaxter
esphome/components/pvvx_mithermometer/* @pasiz
esphome/components/pylontech/* @functionpointer
esphome/components/qmp6988/* @andrewpc
esphome/components/qr_code/* @wjtje
esphome/components/qspi_amoled/* @clydebarrow
esphome/components/qwiic_pir/* @kahrendt
esphome/components/radon_eye_ble/* @jeffeb3
esphome/components/radon_eye_rd200/* @jeffeb3
esphome/components/rc522/* @glmnet
esphome/components/rc522_i2c/* @glmnet
esphome/components/rc522_spi/* @glmnet
esphome/components/resistance_sampler/* @jesserockz
esphome/components/restart/* @esphome/core
esphome/components/rf_bridge/* @jesserockz
esphome/components/rgbct/* @jesserockz
esphome/components/rp2040/* @jesserockz
esphome/components/rp2040_pio_led_strip/* @Papa-DMan
esphome/components/rp2040_pwm/* @jesserockz
esphome/components/rpi_dpi_rgb/* @clydebarrow
esphome/components/rtl87xx/* @kuba2k2
esphome/components/rtttl/* @glmnet
esphome/components/safe_mode/* @jsuanet @paulmonigatti
esphome/components/scd4x/* @martgras @sjtrny
esphome/components/script/* @esphome/core
esphome/components/sdm_meter/* @jesserockz @polyfaces
esphome/components/sdp3x/* @Azimath
esphome/components/seeed_mr24hpc1/* @limengdu
esphome/components/selec_meter/* @sourabhjaiswal
esphome/components/select/* @esphome/core
esphome/components/sen0321/* @notjj
esphome/components/sen21231/* @shreyaskarnik
esphome/components/sen5x/* @martgras
esphome/components/sensirion_common/* @martgras
esphome/components/sensor/* @esphome/core
esphome/components/sfa30/* @ghsensdev
esphome/components/sgp40/* @SenexCrenshaw
esphome/components/sgp4x/* @SenexCrenshaw @martgras
esphome/components/shelly_dimmer/* @edge90 @rnauber
esphome/components/sht4x/* @sjtrny
esphome/components/shutdown/* @esphome/core @jsuanet
esphome/components/sigma_delta_output/* @Cat-Ion
esphome/components/sim800l/* @glmnet
esphome/components/sm2135/* @BoukeHaarsma23
esphome/components/sm10bit_base/* @Cossid
esphome/components/sm2135/* @BoukeHaarsma23 @dd32 @matika77
esphome/components/sm2235/* @Cossid
esphome/components/sm2335/* @Cossid
esphome/components/sml/* @alengwenus
esphome/components/smt100/* @piechade
esphome/components/sn74hc165/* @jesserockz
esphome/components/socket/* @esphome/core
esphome/components/sonoff_d1/* @anatoly-savchenkov
esphome/components/spi/* @esphome/core
esphome/components/speaker/* @jesserockz
esphome/components/spi/* @clydebarrow @esphome/core
esphome/components/spi_device/* @clydebarrow
esphome/components/spi_led_strip/* @clydebarrow
esphome/components/sprinkler/* @kbx81
esphome/components/sps30/* @martgras
esphome/components/ssd1322_base/* @kbx81
@@ -220,6 +336,10 @@ esphome/components/ssd1331_base/* @kbx81
esphome/components/ssd1331_spi/* @kbx81
esphome/components/ssd1351_base/* @kbx81
esphome/components/ssd1351_spi/* @kbx81
esphome/components/st7567_base/* @latonita
esphome/components/st7567_i2c/* @latonita
esphome/components/st7567_spi/* @latonita
esphome/components/st7701s/* @clydebarrow
esphome/components/st7735/* @SenexCrenshaw
esphome/components/st7789v/* @kbx81
esphome/components/st7920/* @marsjan155
@@ -229,19 +349,27 @@ esphome/components/switch/* @esphome/core
esphome/components/t6615/* @tylermenezes
esphome/components/tca9548a/* @andreashergert1984
esphome/components/tcl112/* @glmnet
esphome/components/tee501/* @Stock-M
esphome/components/teleinfo/* @0hax
esphome/components/template/alarm_control_panel/* @grahambrown11 @hwstar
esphome/components/template/datetime/* @rfdarter
esphome/components/template/fan/* @ssieb
esphome/components/text/* @mauritskorse
esphome/components/thermostat/* @kbx81
esphome/components/time/* @OttoWinter
esphome/components/tlc5947/* @rnauber
esphome/components/tm1621/* @Philippe12
esphome/components/tm1637/* @glmnet
esphome/components/tm1638/* @skykingjwc
esphome/components/tm1651/* @freekode
esphome/components/tmp102/* @timsavage
esphome/components/tmp1075/* @sybrenstuvel
esphome/components/tmp117/* @Azimath
esphome/components/tof10120/* @wstrzalka
esphome/components/toshiba/* @kbx81
esphome/components/touchscreen/* @jesserockz
esphome/components/touchscreen/* @jesserockz @nielsnl68
esphome/components/tsl2591/* @wjcarpenter
esphome/components/tt21100/* @kroimon
esphome/components/tuya/binary_sensor/* @jesserockz
esphome/components/tuya/climate/* @jesserockz
esphome/components/tuya/number/* @frankiboy1
@@ -250,17 +378,32 @@ esphome/components/tuya/sensor/* @jesserockz
esphome/components/tuya/switch/* @jesserockz
esphome/components/tuya/text_sensor/* @dentra
esphome/components/uart/* @esphome/core
esphome/components/uart/button/* @ssieb
esphome/components/ufire_ec/* @pvizeli
esphome/components/ufire_ise/* @pvizeli
esphome/components/ultrasonic/* @OttoWinter
esphome/components/uponor_smatrix/* @kroimon
esphome/components/vbus/* @ssieb
esphome/components/veml3235/* @kbx81
esphome/components/veml7700/* @latonita
esphome/components/version/* @esphome/core
esphome/components/voice_assistant/* @jesserockz
esphome/components/wake_on_lan/* @willwill2will54
esphome/components/waveshare_epaper/* @clydebarrow
esphome/components/web_server_base/* @OttoWinter
esphome/components/web_server_idf/* @dentra
esphome/components/whirlpool/* @glmnet
esphome/components/whynter/* @aeonsablaze
esphome/components/wiegand/* @ssieb
esphome/components/wireguard/* @droscy @lhoracek @thomas0bernard
esphome/components/wl_134/* @hobbypunk90
esphome/components/x9c/* @EtienneMD
esphome/components/xgzp68xx/* @gcormier
esphome/components/xiaomi_lywsd03mmc/* @ahpohl
esphome/components/xiaomi_mhoc303/* @drug123
esphome/components/xiaomi_mhoc401/* @vevsvevs
esphome/components/xiaomi_rtcgq02lm/* @jesserockz
esphome/components/xpt2046/* @nielsnl68 @numo68
esphome/components/xl9535/* @mreditor97
esphome/components/xpt2046/touchscreen/* @nielsnl68 @numo68
esphome/components/zhlt01/* @cfeenstra1024
esphome/components/zio_ultrasonic/* @kahrendt

View File

@@ -10,5 +10,3 @@ Things to note when contributing:
for more information.
- Please also update the tests in the `tests/` folder. You can do so by just adding a line in one of the YAML files
which checks if your new feature compiles correctly.
- Sometimes I will let pull requests linger because I'm not 100% sure about them. Please feel free to ping
me after some time.

View File

@@ -1,8 +1,6 @@
include LICENSE
include README.md
include requirements.txt
include esphome/dashboard/templates/*.html
recursive-include esphome/dashboard/static *.ico *.js *.css *.woff* LICENSE
recursive-include esphome *.cpp *.h *.tcc
recursive-include esphome *.cpp *.h *.tcc *.c
recursive-include esphome *.py.script
recursive-include esphome LICENSE.txt

View File

@@ -5,33 +5,57 @@
# One of "docker", "hassio"
ARG BASEIMGTYPE=docker
# https://github.com/hassio-addons/addon-debian-base/releases
FROM ghcr.io/hassio-addons/debian-base/amd64:5.3.0 AS base-hassio-amd64
FROM ghcr.io/hassio-addons/debian-base/aarch64:5.3.0 AS base-hassio-arm64
FROM ghcr.io/hassio-addons/debian-base/armv7:5.3.0 AS base-hassio-armv7
# https://hub.docker.com/_/debian?tab=tags&page=1&name=bullseye
FROM debian:bullseye-20220328-slim AS base-docker-amd64
FROM debian:bullseye-20220328-slim AS base-docker-arm64
FROM debian:bullseye-20220328-slim AS base-docker-armv7
# Use TARGETARCH/TARGETVARIANT defined by docker
# https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope
FROM base-${BASEIMGTYPE}-${TARGETARCH}${TARGETVARIANT} AS base
# https://github.com/hassio-addons/addon-debian-base/releases
FROM ghcr.io/hassio-addons/debian-base:7.2.0 AS base-hassio
# https://hub.docker.com/_/debian?tab=tags&page=1&name=bookworm
FROM debian:12.2-slim AS base-docker
FROM base-${BASEIMGTYPE} AS base
ARG TARGETARCH
ARG TARGETVARIANT
# Note that --break-system-packages is used below because
# https://peps.python.org/pep-0668/ added a safety check that prevents
# installing packages with the same name as a system package. This is
# not a problem for us because we are not concerned about overwriting
# system packages because we are running in an isolated container.
RUN \
apt-get update \
# Use pinned versions so that we get updates with build caching
&& apt-get install -y --no-install-recommends \
python3=3.9.2-3 \
python3-pip=20.3.4-4+deb11u1 \
python3-setuptools=52.0.0-4 \
python3-pil=8.1.2+dfsg-0.3+deb11u1 \
python3-cryptography=3.3.2-1 \
iputils-ping=3:20210202-1 \
git=1:2.30.2-1 \
curl=7.74.0-1.3+deb11u1 \
openssh-client=1:8.4p1-5 \
&& rm -rf \
python3-pip=23.0.1+dfsg-1 \
python3-setuptools=66.1.1-1 \
python3-venv=3.11.2-1+b1 \
python3-wheel=0.38.4-2 \
iputils-ping=3:20221126-1 \
git=1:2.39.2-1.1 \
curl=7.88.1-10+deb12u5 \
openssh-client=1:9.2p1-2+deb12u2 \
python3-cffi=1.15.1-5 \
libcairo2=1.16.0-7 \
libmagic1=1:5.44-3 \
patch=2.7.6-7; \
if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]; then \
apt-get install -y --no-install-recommends \
build-essential=12.9 \
python3-dev=3.11.2-1+b1 \
zlib1g-dev=1:1.2.13.dfsg-1 \
libjpeg-dev=1:2.1.5-2 \
libfreetype-dev=2.12.1+dfsg-5 \
libssl-dev=3.0.11-1~deb12u2 \
libffi-dev=3.4.4-1 \
libopenjp2-7=2.5.0-2 \
libtiff6=4.5.0-6+deb12u1 \
cargo=0.66.0+ds1-1 \
pkg-config=1.8.1-1 \
gcc-arm-linux-gnueabihf=4:12.2.0-3; \
fi; \
rm -rf \
/tmp/* \
/var/{cache,log}/* \
/var/lib/apt/lists/*
@@ -42,11 +66,22 @@ ENV \
# Store globally installed pio libs in /piolibs
PLATFORMIO_GLOBALLIB_DIR=/piolibs
# Support legacy binaries on Debian multiarch system. There is no "correct" way
# to do this, other than using properly built toolchains...
# See: https://unix.stackexchange.com/questions/553743/correct-way-to-add-lib-ld-linux-so-3-in-debian
RUN \
if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]; then \
ln -s /lib/arm-linux-gnueabihf/ld-linux-armhf.so.3 /lib/ld-linux.so.3; \
fi
RUN \
# Ubuntu python3-pip is missing wheel
pip3 install --no-cache-dir \
wheel==0.37.1 \
platformio==6.0.2 \
if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]; then \
export PIP_EXTRA_INDEX_URL="https://www.piwheels.org/simple"; \
fi; \
pip3 install \
--break-system-packages --no-cache-dir \
platformio==6.1.13 \
# Change some platformio settings
&& platformio settings set enable_telemetry No \
&& platformio settings set check_platformio_interval 1000000 \
@@ -54,10 +89,16 @@ RUN \
# First install requirements to leverage caching when requirements don't change
COPY requirements.txt requirements_optional.txt docker/platformio_install_deps.py platformio.ini /
RUN \
pip3 install --no-cache-dir -r /requirements.txt -r /requirements_optional.txt \
&& /platformio_install_deps.py /platformio.ini
# tmpfs is for https://github.com/rust-lang/cargo/issues/8719
COPY requirements.txt requirements_optional.txt script/platformio_install_deps.py platformio.ini /
RUN --mount=type=tmpfs,target=/root/.cargo if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]; then \
export PIP_EXTRA_INDEX_URL="https://www.piwheels.org/simple"; \
fi; \
CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse CARGO_HOME=/root/.cargo \
pip3 install \
--break-system-packages --no-cache-dir -r /requirements.txt -r /requirements_optional.txt \
&& /platformio_install_deps.py /platformio.ini --libraries
# ======================= docker-type image =======================
@@ -65,7 +106,11 @@ FROM base AS docker
# Copy esphome and install
COPY . /esphome
RUN pip3 install --no-cache-dir --no-use-pep517 -e /esphome
RUN if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]; then \
export PIP_EXTRA_INDEX_URL="https://www.piwheels.org/simple"; \
fi; \
pip3 install \
--break-system-packages --no-cache-dir --no-use-pep517 -e /esphome
# Settings for dashboard
ENV USERNAME="" PASSWORD=""
@@ -73,6 +118,10 @@ ENV USERNAME="" PASSWORD=""
# Expose the dashboard to Docker
EXPOSE 6052
# Run healthcheck (heartbeat)
HEALTHCHECK --interval=30s --timeout=30s \
CMD curl --fail http://localhost:6052/version -A "HealthCheck" || exit 1
COPY docker/docker_entrypoint.sh /entrypoint.sh
# The directory the user should mount their configuration files to
@@ -94,7 +143,7 @@ RUN \
apt-get update \
# Use pinned versions so that we get updates with build caching
&& apt-get install -y --no-install-recommends \
nginx-light=1.18.0-6.1+deb11u2 \
nginx-light=1.22.1-9 \
&& rm -rf \
/tmp/* \
/var/{cache,log}/* \
@@ -107,7 +156,11 @@ COPY docker/ha-addon-rootfs/ /
# Copy esphome and install
COPY . /esphome
RUN pip3 install --no-cache-dir --no-use-pep517 -e /esphome
RUN if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]; then \
export PIP_EXTRA_INDEX_URL="https://www.piwheels.org/simple"; \
fi; \
pip3 install \
--break-system-packages --no-cache-dir --no-use-pep517 -e /esphome
# Labels
LABEL \
@@ -130,20 +183,24 @@ RUN \
apt-get update \
# Use pinned versions so that we get updates with build caching
&& apt-get install -y --no-install-recommends \
clang-format-11=1:11.0.1-2 \
clang-tidy-11=1:11.0.1-2 \
clang-format-13=1:13.0.1-11+b2 \
clang-tidy-14=1:14.0.6-12 \
patch=2.7.6-7 \
software-properties-common=0.96.20.2-2.1 \
nano=5.4-2+deb11u1 \
software-properties-common=0.99.30-4 \
nano=7.2-1 \
build-essential=12.9 \
python3-dev=3.9.2-3 \
python3-dev=3.11.2-1+b1 \
&& rm -rf \
/tmp/* \
/var/{cache,log}/* \
/var/lib/apt/lists/*
COPY requirements_test.txt /
RUN pip3 install --no-cache-dir -r /requirements_test.txt
RUN if [ "$TARGETARCH$TARGETVARIANT" = "armv7" ]; then \
export PIP_EXTRA_INDEX_URL="https://www.piwheels.org/simple"; \
fi; \
pip3 install \
--break-system-packages --no-cache-dir -r /requirements_test.txt
VOLUME ["/esphome"]
WORKDIR /esphome

View File

@@ -8,32 +8,49 @@ import re
import sys
CHANNEL_DEV = 'dev'
CHANNEL_BETA = 'beta'
CHANNEL_RELEASE = 'release'
CHANNEL_DEV = "dev"
CHANNEL_BETA = "beta"
CHANNEL_RELEASE = "release"
CHANNELS = [CHANNEL_DEV, CHANNEL_BETA, CHANNEL_RELEASE]
ARCH_AMD64 = 'amd64'
ARCH_ARMV7 = 'armv7'
ARCH_AARCH64 = 'aarch64'
ARCH_AMD64 = "amd64"
ARCH_ARMV7 = "armv7"
ARCH_AARCH64 = "aarch64"
ARCHS = [ARCH_AMD64, ARCH_ARMV7, ARCH_AARCH64]
TYPE_DOCKER = 'docker'
TYPE_HA_ADDON = 'ha-addon'
TYPE_LINT = 'lint'
TYPE_DOCKER = "docker"
TYPE_HA_ADDON = "ha-addon"
TYPE_LINT = "lint"
TYPES = [TYPE_DOCKER, TYPE_HA_ADDON, TYPE_LINT]
parser = argparse.ArgumentParser()
parser.add_argument("--tag", type=str, required=True, help="The main docker tag to push to. If a version number also adds latest and/or beta tag")
parser.add_argument("--arch", choices=ARCHS, required=False, help="The architecture to build for")
parser.add_argument("--build-type", choices=TYPES, required=True, help="The type of build to run")
parser.add_argument("--dry-run", action="store_true", help="Don't run any commands, just print them")
subparsers = parser.add_subparsers(help="Action to perform", dest="command", required=True)
parser.add_argument(
"--tag",
type=str,
required=True,
help="The main docker tag to push to. If a version number also adds latest and/or beta tag",
)
parser.add_argument(
"--arch", choices=ARCHS, required=False, help="The architecture to build for"
)
parser.add_argument(
"--build-type", choices=TYPES, required=True, help="The type of build to run"
)
parser.add_argument(
"--dry-run", action="store_true", help="Don't run any commands, just print them"
)
subparsers = parser.add_subparsers(
help="Action to perform", dest="command", required=True
)
build_parser = subparsers.add_parser("build", help="Build the image")
build_parser.add_argument("--push", help="Also push the images", action="store_true")
build_parser.add_argument("--load", help="Load the docker image locally", action="store_true")
manifest_parser = subparsers.add_parser("manifest", help="Create a manifest from already pushed images")
build_parser.add_argument(
"--load", help="Load the docker image locally", action="store_true"
)
manifest_parser = subparsers.add_parser(
"manifest", help="Create a manifest from already pushed images"
)
@dataclass(frozen=True)
@@ -49,7 +66,7 @@ class DockerParams:
prefix = {
TYPE_DOCKER: "esphome/esphome",
TYPE_HA_ADDON: "esphome/esphome-hassio",
TYPE_LINT: "esphome/esphome-lint"
TYPE_LINT: "esphome/esphome-lint",
}[build_type]
build_to = f"{prefix}-{arch}"
baseimgtype = {
@@ -128,13 +145,21 @@ def main():
# 3. build
cmd = [
"docker", "buildx", "build",
"--build-arg", f"BASEIMGTYPE={params.baseimgtype}",
"--build-arg", f"BUILD_VERSION={args.tag}",
"--cache-from", f"type=registry,ref={cache_img}",
"--file", "docker/Dockerfile",
"--platform", params.platform,
"--target", params.target,
"docker",
"buildx",
"build",
"--build-arg",
f"BASEIMGTYPE={params.baseimgtype}",
"--build-arg",
f"BUILD_VERSION={args.tag}",
"--cache-from",
f"type=registry,ref={cache_img}",
"--file",
"docker/Dockerfile",
"--platform",
params.platform,
"--target",
params.target,
]
for img in imgs:
cmd += ["--tag", img]
@@ -160,9 +185,7 @@ def main():
run_command(*cmd)
# 2. Push manifests
for target in targets:
run_command(
"docker", "manifest", "push", target
)
run_command("docker", "manifest", "push", target)
if __name__ == "__main__":

View File

@@ -21,4 +21,10 @@ export PLATFORMIO_PLATFORMS_DIR="${pio_cache_base}/platforms"
export PLATFORMIO_PACKAGES_DIR="${pio_cache_base}/packages"
export PLATFORMIO_CACHE_DIR="${pio_cache_base}/cache"
# If /build is mounted, use that as the build path
# otherwise use path in /config (so that builds aren't lost on container restart)
if [[ -d /build ]]; then
export ESPHOME_BUILD_PATH=/build
fi
exec esphome "$@"

92
docker/generate_tags.py Executable file
View File

@@ -0,0 +1,92 @@
#!/usr/bin/env python3
import re
import argparse
CHANNEL_DEV = "dev"
CHANNEL_BETA = "beta"
CHANNEL_RELEASE = "release"
GHCR = "ghcr"
DOCKERHUB = "dockerhub"
parser = argparse.ArgumentParser()
parser.add_argument(
"--tag",
type=str,
required=True,
help="The main docker tag to push to. If a version number also adds latest and/or beta tag",
)
parser.add_argument(
"--suffix",
type=str,
required=True,
help="The suffix of the tag.",
)
parser.add_argument(
"--registry",
type=str,
choices=[GHCR, DOCKERHUB],
required=False,
action="append",
help="The registry to build tags for.",
)
def main():
args = parser.parse_args()
# detect channel from tag
match = re.match(r"^(\d+\.\d+)(?:\.\d+)(?:(b\d+)|(-dev\d+))?$", args.tag)
major_minor_version = None
if match is None: # eg 2023.12.0-dev20231109-testbranch
channel = None # Ran with custom tag for a branch etc
elif match.group(3) is not None: # eg 2023.12.0-dev20231109
channel = CHANNEL_DEV
elif match.group(2) is not None: # eg 2023.12.0b1
channel = CHANNEL_BETA
else: # eg 2023.12.0
major_minor_version = match.group(1)
channel = CHANNEL_RELEASE
tags_to_push = [args.tag]
if channel == CHANNEL_DEV:
tags_to_push.append("dev")
elif channel == CHANNEL_BETA:
tags_to_push.append("beta")
elif channel == CHANNEL_RELEASE:
# Additionally push to beta
tags_to_push.append("beta")
tags_to_push.append("latest")
if major_minor_version:
tags_to_push.append("stable")
tags_to_push.append(major_minor_version)
suffix = f"-{args.suffix}" if args.suffix else ""
image_name = f"esphome/esphome{suffix}"
print(f"channel={channel}")
if args.registry is None:
args.registry = [GHCR, DOCKERHUB]
elif len(args.registry) == 1:
if GHCR in args.registry:
print(f"image=ghcr.io/{image_name}")
if DOCKERHUB in args.registry:
print(f"image=docker.io/{image_name}")
print(f"image_name={image_name}")
full_tags = []
for tag in tags_to_push:
if GHCR in args.registry:
full_tags += [f"ghcr.io/{image_name}:{tag}"]
if DOCKERHUB in args.registry:
full_tags += [f"docker.io/{image_name}:{tag}"]
print(f"tags={','.join(full_tags)}")
if __name__ == "__main__":
main()

View File

@@ -1,41 +0,0 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Community Hass.io Add-ons: ESPHome
# This files check if all user configuration requirements are met
# ==============================================================================
# Check SSL requirements, if enabled
if bashio::config.true 'ssl'; then
if ! bashio::config.has_value 'certfile'; then
bashio::log.fatal 'SSL is enabled, but no certfile was specified.'
bashio::exit.nok
fi
if ! bashio::config.has_value 'keyfile'; then
bashio::log.fatal 'SSL is enabled, but no keyfile was specified'
bashio::exit.nok
fi
certfile="/ssl/$(bashio::config 'certfile')"
keyfile="/ssl/$(bashio::config 'keyfile')"
if ! bashio::fs.file_exists "${certfile}"; then
if ! bashio::fs.file_exists "${keyfile}"; then
# Both files are missing, let's print a friendlier error message
bashio::log.fatal 'You enabled encrypted connections using the "ssl": true option.'
bashio::log.fatal "However, the SSL files '${certfile}' and '${keyfile}'"
bashio::log.fatal "were not found. If you're using Hass.io on your local network and don't want"
bashio::log.fatal 'to encrypt connections to the ESPHome dashboard, you can manually disable'
bashio::log.fatal 'SSL by setting "ssl" to false."'
bashio::exit.nok
fi
bashio::log.fatal "The configured certfile '${certfile}' was not found."
bashio::exit.nok
fi
if ! bashio::fs.file_exists "/ssl/$(bashio::config 'keyfile')"; then
bashio::log.fatal "The configured keyfile '${keyfile}' was not found."
bashio::exit.nok
fi
fi

View File

@@ -1,34 +0,0 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Community Hass.io Add-ons: ESPHome
# Configures NGINX for use with ESPHome
# ==============================================================================
declare certfile
declare keyfile
declare direct_port
declare ingress_interface
declare ingress_port
mkdir -p /var/log/nginx
direct_port=$(bashio::addon.port 6052)
if bashio::var.has_value "${direct_port}"; then
if bashio::config.true 'ssl'; then
certfile=$(bashio::config 'certfile')
keyfile=$(bashio::config 'keyfile')
mv /etc/nginx/servers/direct-ssl.disabled /etc/nginx/servers/direct.conf
sed -i "s/%%certfile%%/${certfile}/g" /etc/nginx/servers/direct.conf
sed -i "s/%%keyfile%%/${keyfile}/g" /etc/nginx/servers/direct.conf
else
mv /etc/nginx/servers/direct.disabled /etc/nginx/servers/direct.conf
fi
sed -i "s/%%port%%/${direct_port}/g" /etc/nginx/servers/direct.conf
fi
ingress_port=$(bashio::addon.ingress_port)
ingress_interface=$(bashio::addon.ip_address)
sed -i "s/%%port%%/${ingress_port}/g" /etc/nginx/servers/ingress.conf
sed -i "s/%%interface%%/${ingress_interface}/g" /etc/nginx/servers/ingress.conf

View File

@@ -1,9 +0,0 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Community Hass.io Add-ons: ESPHome
# This files creates all directories used by esphome
# ==============================================================================
pio_cache_base=/data/cache/platformio
mkdir -p "${pio_cache_base}"

View File

@@ -1,9 +1,9 @@
proxy_http_version 1.1;
proxy_ignore_client_abort off;
proxy_read_timeout 86400s;
proxy_redirect off;
proxy_send_timeout 86400s;
proxy_max_temp_file_size 0;
proxy_http_version 1.1;
proxy_ignore_client_abort off;
proxy_read_timeout 86400s;
proxy_redirect off;
proxy_send_timeout 86400s;
proxy_max_temp_file_size 0;
proxy_set_header Accept-Encoding "";
proxy_set_header Connection $connection_upgrade;

View File

@@ -1,5 +1,7 @@
root /dev/null;
server_name $hostname;
root /dev/null;
server_name $hostname;
client_max_body_size 512m;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";

View File

@@ -1,7 +1,6 @@
ssl_protocols TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA;
ssl_ecdh_curve secp384r1;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_session_timeout 10m;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;

View File

@@ -0,0 +1,3 @@
upstream esphome {
server unix:/var/run/esphome.sock;
}

View File

@@ -2,7 +2,6 @@ daemon off;
user root;
pid /var/run/nginx.pid;
worker_processes 1;
# Hass.io addon log
error_log /proc/1/fd/1 error;
events {
worker_connections 1024;
@@ -10,24 +9,22 @@ events {
http {
include /etc/nginx/includes/mime.types;
access_log stdout;
default_type application/octet-stream;
gzip on;
keepalive_timeout 65;
sendfile on;
server_tokens off;
access_log off;
default_type application/octet-stream;
gzip on;
keepalive_timeout 65;
sendfile on;
server_tokens off;
tcp_nodelay on;
tcp_nopush on;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# Use Hass.io supervisor as resolver
resolver 172.30.32.2;
upstream esphome {
server unix:/var/run/esphome.sock;
}
include /etc/nginx/includes/upstream.conf;
include /etc/nginx/servers/*.conf;
}

View File

@@ -0,0 +1 @@
Without requirements or design, programming is the art of adding bugs to an empty text file. (Louis Srygley)

View File

@@ -1,12 +0,0 @@
server {
listen %%port%% default_server;
include /etc/nginx/includes/server_params.conf;
include /etc/nginx/includes/proxy_params.conf;
# Clear Hass.io Ingress header
proxy_set_header X-HA-Ingress "";
location / {
proxy_pass http://esphome;
}
}

View File

@@ -1,20 +1,26 @@
server {
listen %%port%% default_server ssl http2;
{{ if not .ssl }}
listen 6052 default_server;
{{ else }}
listen 6052 default_server ssl http2;
{{ end }}
include /etc/nginx/includes/server_params.conf;
include /etc/nginx/includes/proxy_params.conf;
{{ if .ssl }}
include /etc/nginx/includes/ssl_params.conf;
ssl on;
ssl_certificate /ssl/%%certfile%%;
ssl_certificate_key /ssl/%%keyfile%%;
# Clear Hass.io Ingress header
proxy_set_header X-HA-Ingress "";
ssl_certificate /ssl/{{ .certfile }};
ssl_certificate_key /ssl/{{ .keyfile }};
# Redirect http requests to https on the same port.
# https://rageagainstshell.com/2016/11/redirect-http-to-https-on-the-same-port-in-nginx/
error_page 497 https://$http_host$request_uri;
{{ end }}
# Clear Home Assistant Ingress header
proxy_set_header X-HA-Ingress "";
location / {
proxy_pass http://esphome;

View File

@@ -1,14 +1,16 @@
server {
listen %%interface%%:%%port%% default_server;
listen 127.0.0.1:{{ .port }} default_server;
listen {{ .interface }}:{{ .port }} default_server;
include /etc/nginx/includes/server_params.conf;
include /etc/nginx/includes/proxy_params.conf;
# Set Home Assistant Ingress header
proxy_set_header X-HA-Ingress "YES";
location / {
# Only allow from Hass.io supervisor
allow 172.30.32.2;
allow 127.0.0.1;
deny all;
proxy_pass http://esphome;

View File

@@ -0,0 +1,32 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Home Assistant Add-on: ESPHome
# Sends discovery information to Home Assistant.
# ==============================================================================
declare config
declare port
# We only disable it when disabled explicitly
if bashio::config.false 'home_assistant_dashboard_integration';
then
bashio::log.info "Home Assistant discovery is disabled for this add-on."
bashio::exit.ok
fi
port=$(bashio::addon.ingress_port)
# Wait for NGINX to become available
bashio::net.wait_for "${port}" "127.0.0.1" 300
config=$(\
bashio::var.json \
host "127.0.0.1" \
port "^${port}" \
)
if bashio::discovery "esphome" "${config}" > /dev/null; then
bashio::log.info "Successfully send discovery information to Home Assistant."
else
bashio::log.error "Discovery message to Home Assistant failed!"
fi

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/discovery/run

View File

@@ -0,0 +1,26 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Home Assistant Community Add-on: ESPHome
# Take down the S6 supervision tree when ESPHome dashboard fails
# ==============================================================================
declare exit_code
readonly exit_code_container=$(</run/s6-linux-init-container-results/exitcode)
readonly exit_code_service="${1}"
readonly exit_code_signal="${2}"
bashio::log.info \
"Service ESPHome dashboard exited with code ${exit_code_service}" \
"(by signal ${exit_code_signal})"
if [[ "${exit_code_service}" -eq 256 ]]; then
if [[ "${exit_code_container}" -eq 0 ]]; then
echo $((128 + $exit_code_signal)) > /run/s6-linux-init-container-results/exitcode
fi
[[ "${exit_code_signal}" -eq 15 ]] && exec /run/s6/basedir/bin/halt
elif [[ "${exit_code_service}" -ne 0 ]]; then
if [[ "${exit_code_container}" -eq 0 ]]; then
echo "${exit_code_service}" > /run/s6-linux-init-container-results/exitcode
fi
exec /run/s6/basedir/bin/halt
fi

View File

@@ -1,10 +1,19 @@
#!/usr/bin/with-contenv bashio
#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Community Hass.io Add-ons: ESPHome
# Runs the ESPHome dashboard
# ==============================================================================
readonly pio_cache_base=/data/cache/platformio
export ESPHOME_IS_HA_ADDON=true
export PLATFORMIO_GLOBALLIB_DIR=/piolibs
# we can't set core_dir, because the settings file is stored in `core_dir/appstate.json`
# setting `core_dir` would therefore prevent pio from accessing
export PLATFORMIO_PLATFORMS_DIR="${pio_cache_base}/platforms"
export PLATFORMIO_PACKAGES_DIR="${pio_cache_base}/packages"
export PLATFORMIO_CACHE_DIR="${pio_cache_base}/cache"
if bashio::config.true 'leave_front_door_open'; then
export DISABLE_HA_AUTHENTICATION=true
@@ -22,14 +31,27 @@ if bashio::config.has_value 'relative_url'; then
export ESPHOME_DASHBOARD_RELATIVE_URL=$(bashio::config 'relative_url')
fi
pio_cache_base=/data/cache/platformio
# we can't set core_dir, because the settings file is stored in `core_dir/appstate.json`
# setting `core_dir` would therefore prevent pio from accessing
export PLATFORMIO_PLATFORMS_DIR="${pio_cache_base}/platforms"
export PLATFORMIO_PACKAGES_DIR="${pio_cache_base}/packages"
export PLATFORMIO_CACHE_DIR="${pio_cache_base}/cache"
if bashio::config.has_value 'default_compile_process_limit'; then
export ESPHOME_DEFAULT_COMPILE_PROCESS_LIMIT=$(bashio::config 'default_compile_process_limit')
else
if grep -q 'Raspberry Pi 3' /proc/cpuinfo; then
export ESPHOME_DEFAULT_COMPILE_PROCESS_LIMIT=1
fi
fi
export PLATFORMIO_GLOBALLIB_DIR=/piolibs
mkdir -p "${pio_cache_base}"
mkdir -p /config/esphome
if bashio::fs.directory_exists '/config/esphome/.esphome'; then
bashio::log.info "Migrating old .esphome directory..."
if bashio::fs.file_exists '/config/esphome/.esphome/esphome.json'; then
mv /config/esphome/.esphome/esphome.json /data/esphome.json
fi
mkdir -p "/data/storage"
mv /config/esphome/.esphome/*.json /data/storage/ || true
rm -rf /config/esphome/.esphome
fi
bashio::log.info "Starting ESPHome dashboard..."
exec esphome dashboard /config/esphome --socket /var/run/esphome.sock --ha-addon

View File

@@ -0,0 +1 @@
longrun

View File

@@ -0,0 +1,27 @@
#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Community Hass.io Add-ons: ESPHome
# Configures NGINX for use with ESPHome
# ==============================================================================
mkdir -p /var/log/nginx
# Generate Ingress configuration
bashio::var.json \
interface "$(bashio::addon.ip_address)" \
port "^$(bashio::addon.ingress_port)" \
| tempio \
-template /etc/nginx/templates/ingress.gtpl \
-out /etc/nginx/servers/ingress.conf
# Generate direct access configuration, if enabled.
if bashio::var.has_value "$(bashio::addon.port 6052)"; then
bashio::config.require.ssl
bashio::var.json \
certfile "$(bashio::config 'certfile')" \
keyfile "$(bashio::config 'keyfile')" \
ssl "^$(bashio::config 'ssl')" \
| tempio \
-template /etc/nginx/templates/direct.gtpl \
-out /etc/nginx/servers/direct.conf
fi

View File

@@ -0,0 +1 @@
oneshot

View File

@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-nginx/run

View File

@@ -0,0 +1,25 @@
#!/command/with-contenv bashio
# ==============================================================================
# Community Hass.io Add-ons: ESPHome
# Take down the S6 supervision tree when NGINX fails
# ==============================================================================
declare exit_code
readonly exit_code_container=$(</run/s6-linux-init-container-results/exitcode)
readonly exit_code_service="${1}"
readonly exit_code_signal="${2}"
bashio::log.info \
"Service NGINX exited with code ${exit_code_service}" \
"(by signal ${exit_code_signal})"
if [[ "${exit_code_service}" -eq 256 ]]; then
if [[ "${exit_code_container}" -eq 0 ]]; then
echo $((128 + $exit_code_signal)) > /run/s6-linux-init-container-results/exitcode
fi
[[ "${exit_code_signal}" -eq 15 ]] && exec /run/s6/basedir/bin/halt
elif [[ "${exit_code_service}" -ne 0 ]]; then
if [[ "${exit_code_container}" -eq 0 ]]; then
echo "${exit_code_service}" > /run/s6-linux-init-container-results/exitcode
fi
exec /run/s6/basedir/bin/halt
fi

View File

@@ -1,10 +1,11 @@
#!/usr/bin/with-contenv bashio
#!/command/with-contenv bashio
# shellcheck shell=bash
# ==============================================================================
# Community Hass.io Add-ons: ESPHome
# Runs the NGINX proxy
# ==============================================================================
bashio::log.info "Waiting for dashboard to come up..."
bashio::log.info "Waiting for ESPHome dashboard to come up..."
while [[ ! -S /var/run/esphome.sock ]]; do
sleep 0.5

View File

@@ -0,0 +1 @@
longrun

View File

@@ -1,9 +0,0 @@
#!/usr/bin/execlineb -S0
# ==============================================================================
# Community Hass.io Add-ons: ESPHome
# Take down the S6 supervision tree when ESPHome fails
# ==============================================================================
if -n { s6-test $# -ne 0 }
if -n { s6-test ${1} -eq 256 }
s6-svscanctl -t /var/run/s6/services

View File

@@ -1,9 +0,0 @@
#!/usr/bin/execlineb -S0
# ==============================================================================
# Community Hass.io Add-ons: ESPHome
# Take down the S6 supervision tree when NGINX fails
# ==============================================================================
if -n { s6-test $# -ne 0 }
if -n { s6-test ${1} -eq 256 }
s6-svscanctl -t /var/run/s6/services

View File

@@ -1,30 +0,0 @@
#!/usr/bin/env python3
# This script is used in the docker containers to preinstall
# all platformio libraries in the global storage
import configparser
import subprocess
import sys
config = configparser.ConfigParser(inline_comment_prefixes=(';', ))
config.read(sys.argv[1])
libs = []
# Extract from every lib_deps key in all sections
for section in config.sections():
conf = config[section]
if "lib_deps" not in conf:
continue
for lib_dep in conf["lib_deps"].splitlines():
if not lib_dep:
# Empty line or comment
continue
if lib_dep.startswith("${"):
# Extending from another section
continue
if "@" not in lib_dep:
# No version pinned, this is an internal lib
continue
libs.append(lib_dep)
subprocess.check_call(['platformio', 'lib', '-g', 'install', *libs])

View File

@@ -1,14 +1,18 @@
# PYTHON_ARGCOMPLETE_OK
import argparse
import functools
import logging
import os
import re
import sys
import time
from datetime import datetime
import argcomplete
from esphome import const, writer, yaml_util
import esphome.codegen as cg
from esphome.config import iter_components, read_config, strip_default_ids
from esphome.config import iter_component_configs, read_config, strip_default_ids
from esphome.const import (
ALLOWED_NAME_CHARS,
CONF_BAUD_RATE,
@@ -17,15 +21,23 @@ from esphome.const import (
CONF_LOGGER,
CONF_NAME,
CONF_OTA,
CONF_MQTT,
CONF_MDNS,
CONF_DISABLED,
CONF_PASSWORD,
CONF_PORT,
CONF_ESPHOME,
CONF_PLATFORMIO_OPTIONS,
CONF_SUBSTITUTIONS,
PLATFORM_BK72XX,
PLATFORM_RTL87XX,
PLATFORM_ESP32,
PLATFORM_ESP8266,
PLATFORM_RP2040,
SECRETS_FILES,
)
from esphome.core import CORE, EsphomeError, coroutine
from esphome.helpers import indent
from esphome.helpers import indent, is_ip_address
from esphome.util import (
run_external_command,
run_external_process,
@@ -38,7 +50,7 @@ from esphome.log import color, setup_log, Fore
_LOGGER = logging.getLogger(__name__)
def choose_prompt(options):
def choose_prompt(options, purpose: str = None):
if not options:
raise EsphomeError(
"Found no valid options for upload/logging, please make sure relevant "
@@ -49,7 +61,9 @@ def choose_prompt(options):
if len(options) == 1:
return options[0][1]
safe_print("Found multiple options, please choose one:")
safe_print(
f'Found multiple options{f" for {purpose}" if purpose else ""}, please choose one:'
)
for i, (desc, _) in enumerate(options):
safe_print(f" [{i+1}] {desc}")
@@ -68,15 +82,19 @@ def choose_prompt(options):
return options[opt - 1][1]
def choose_upload_log_host(default, check_default, show_ota, show_mqtt, show_api):
def choose_upload_log_host(
default, check_default, show_ota, show_mqtt, show_api, purpose: str = None
):
options = []
for port in get_serial_ports():
options.append((f"{port.path} ({port.description})", port.path))
if default == "SERIAL":
return choose_prompt(options, purpose=purpose)
if (show_ota and "ota" in CORE.config) or (show_api and "api" in CORE.config):
options.append((f"Over The Air ({CORE.address})", CORE.address))
if default == "OTA":
return CORE.address
if show_mqtt and "mqtt" in CORE.config:
if show_mqtt and CONF_MQTT in CORE.config:
options.append((f"MQTT ({CORE.config['mqtt'][CONF_BROKER]})", "MQTT"))
if default == "OTA":
return "MQTT"
@@ -84,7 +102,7 @@ def choose_upload_log_host(default, check_default, show_ota, show_mqtt, show_api
return default
if check_default is not None and check_default in [opt[1] for opt in options]:
return check_default
return choose_prompt(options)
return choose_prompt(options, purpose=purpose)
def get_port_type(port):
@@ -101,11 +119,11 @@ def run_miniterm(config, port):
if CONF_LOGGER not in config:
_LOGGER.info("Logger is not enabled. Not starting UART logs.")
return
return 1
baud_rate = config["logger"][CONF_BAUD_RATE]
if baud_rate == 0:
_LOGGER.info("UART logging is disabled (baud_rate=0). Not starting UART logs.")
return
return 1
_LOGGER.info("Starting log output from %s with baud rate %s", port, baud_rate)
backtrace_state = False
@@ -119,25 +137,36 @@ def run_miniterm(config, port):
ser.dtr = False
ser.rts = False
with ser:
while True:
try:
raw = ser.readline()
except serial.SerialException:
_LOGGER.error("Serial port closed!")
return
line = (
raw.replace(b"\r", b"")
.replace(b"\n", b"")
.decode("utf8", "backslashreplace")
)
time = datetime.now().time().strftime("[%H:%M:%S]")
message = time + line
safe_print(message)
tries = 0
while tries < 5:
try:
with ser:
while True:
try:
raw = ser.readline()
except serial.SerialException:
_LOGGER.error("Serial port closed!")
return 0
line = (
raw.replace(b"\r", b"")
.replace(b"\n", b"")
.decode("utf8", "backslashreplace")
)
time_str = datetime.now().time().strftime("[%H:%M:%S]")
message = time_str + line
safe_print(message)
backtrace_state = platformio_api.process_stacktrace(
config, line, backtrace_state=backtrace_state
)
backtrace_state = platformio_api.process_stacktrace(
config, line, backtrace_state=backtrace_state
)
except serial.SerialException:
tries += 1
time.sleep(1)
if tries >= 5:
_LOGGER.error("Could not connect to serial port %s", port)
return 1
return 0
def wrap_to_code(name, comp):
@@ -167,7 +196,7 @@ def write_cpp(config):
def generate_cpp_contents(config):
_LOGGER.info("Generating C++ source...")
for name, component, conf in iter_components(CORE.config):
for name, component, conf in iter_component_configs(CORE.config):
if component.to_code is not None:
coro = wrap_to_code(name, component)
CORE.add_job(coro, conf)
@@ -194,14 +223,16 @@ def compile_program(args, config):
return 0 if idedata is not None else 1
def upload_using_esptool(config, port):
def upload_using_esptool(config, port, file):
from esphome import platformio_api
first_baudrate = config[CONF_ESPHOME][CONF_PLATFORMIO_OPTIONS].get(
"upload_speed", 460800
)
def run_esptool(baud_rate):
if file is not None:
flash_images = [platformio_api.FlashImage(path=file, offset="0x0")]
else:
idedata = platformio_api.get_idedata(config)
firmware_offset = "0x10000" if CORE.is_esp32 else "0x0"
@@ -212,12 +243,13 @@ def upload_using_esptool(config, port):
*idedata.extra_flash_images,
]
mcu = "esp8266"
if CORE.is_esp32:
from esphome.components.esp32 import get_esp32_variant
mcu = "esp8266"
if CORE.is_esp32:
from esphome.components.esp32 import get_esp32_variant
mcu = get_esp32_variant().lower()
mcu = get_esp32_variant().lower()
def run_esptool(baud_rate):
cmd = [
"esptool.py",
"--before",
@@ -241,8 +273,7 @@ def upload_using_esptool(config, port):
if os.environ.get("ESPHOME_USE_SUBPROCESS") is None:
import esptool
# pylint: disable=protected-access
return run_external_command(esptool._main, *cmd)
return run_external_command(esptool.main, *cmd) # pylint: disable=no-member
return run_external_process(*cmd)
@@ -257,12 +288,47 @@ def upload_using_esptool(config, port):
return run_esptool(115200)
def upload_program(config, args, host):
# if upload is to a serial port use platformio, otherwise assume ota
if get_port_type(host) == "SERIAL":
return upload_using_esptool(config, host)
def upload_using_platformio(config, port):
from esphome import platformio_api
from esphome import espota2
upload_args = ["-t", "upload", "-t", "nobuild"]
if port is not None:
upload_args += ["--upload-port", port]
return platformio_api.run_platformio_cli_run(config, CORE.verbose, *upload_args)
def check_permissions(port):
if os.name == "posix" and get_port_type(port) == "SERIAL":
# Check if we can open selected serial port
if not os.access(port, os.F_OK):
raise EsphomeError(
"The selected serial port does not exist. To resolve this issue, "
"check that the device is connected to this computer with a USB cable and that "
"the USB cable can be used for data and is not a power-only cable."
)
if not (os.access(port, os.R_OK | os.W_OK)):
raise EsphomeError(
"You do not have read or write permission on the selected serial port. "
"To resolve this issue, you can add your user to the dialout group "
f"by running the following command: sudo usermod -a -G dialout {os.getlogin()}. "
"You will need to log out & back in or reboot to activate the new group access."
)
def upload_program(config, args, host):
if get_port_type(host) == "SERIAL":
check_permissions(host)
if CORE.target_platform in (PLATFORM_ESP32, PLATFORM_ESP8266):
file = getattr(args, "file", None)
return upload_using_esptool(config, host, file)
if CORE.target_platform in (PLATFORM_RP2040):
return upload_using_platformio(config, args.device)
if CORE.target_platform in (PLATFORM_BK72XX, PLATFORM_RTL87XX):
return upload_using_platformio(config, host)
return 1 # Unknown target platform
if CONF_OTA not in config:
raise EsphomeError(
@@ -270,9 +336,26 @@ def upload_program(config, args, host):
"component"
)
from esphome import espota2
ota_conf = config[CONF_OTA]
remote_port = ota_conf[CONF_PORT]
password = ota_conf.get(CONF_PASSWORD, "")
if (
not is_ip_address(CORE.address)
and (get_port_type(host) == "MQTT" or config[CONF_MDNS][CONF_DISABLED])
and CONF_MQTT in config
):
from esphome import mqtt
host = mqtt.get_esphome_device_ip(
config, args.username, args.password, args.client_id
)
if getattr(args, "file", None) is not None:
return espota2.run_ota(host, remote_port, password, args.file)
return espota2.run_ota(host, remote_port, password, CORE.firmware_bin)
@@ -280,9 +363,16 @@ def show_logs(config, args, port):
if "logger" not in config:
raise EsphomeError("Logger is not configured!")
if get_port_type(port) == "SERIAL":
run_miniterm(config, port)
return 0
check_permissions(port)
return run_miniterm(config, port)
if get_port_type(port) == "NETWORK" and "api" in config:
if config[CONF_MDNS][CONF_DISABLED] and CONF_MQTT in config:
from esphome import mqtt
port = mqtt.get_esphome_device_ip(
config, args.username, args.password, args.client_id
)
from esphome.components.api.client import run_logs
return run_logs(config, port)
@@ -311,10 +401,17 @@ def command_wizard(args):
def command_config(args, config):
_LOGGER.info("Configuration is valid!")
if not CORE.verbose:
config = strip_default_ids(config)
safe_print(yaml_util.dump(config))
output = yaml_util.dump(config, args.show_secrets)
# add the console decoration so the front-end can hide the secrets
if not args.show_secrets:
output = re.sub(
r"(password|key|psk|ssid)\: (.+)", r"\1: \\033[5m\2\\033[6m", output
)
if not CORE.quiet:
safe_print(output)
_LOGGER.info("Configuration is valid!")
return 0
@@ -347,6 +444,7 @@ def command_upload(args, config):
show_ota=True,
show_mqtt=False,
show_api=False,
purpose="uploading",
)
exit_code = upload_program(config, args, port)
if exit_code != 0:
@@ -355,6 +453,15 @@ def command_upload(args, config):
return 0
def command_discover(args, config):
if "mqtt" in config:
from esphome import mqtt
return mqtt.show_discover(config, args.username, args.password, args.client_id)
raise EsphomeError("No discover method configured (mqtt)")
def command_logs(args, config):
port = choose_upload_log_host(
default=args.device,
@@ -362,6 +469,7 @@ def command_logs(args, config):
show_ota=False,
show_mqtt=True,
show_api=True,
purpose="logging",
)
return show_logs(config, args, port)
@@ -380,6 +488,7 @@ def command_run(args, config):
show_ota=True,
show_mqtt=False,
show_api=True,
purpose="uploading",
)
exit_code = upload_program(config, args, port)
if exit_code != 0:
@@ -393,6 +502,7 @@ def command_run(args, config):
show_ota=False,
show_mqtt=True,
show_api=True,
purpose="logging",
)
return show_logs(config, args, port)
@@ -425,7 +535,7 @@ def command_clean(args, config):
def command_dashboard(args):
from esphome.dashboard import dashboard
return dashboard.start_web_server(args)
return dashboard.start_dashboard(args)
def command_update_all(args):
@@ -596,6 +706,7 @@ POST_CONFIG_ACTIONS = {
"clean": command_clean,
"idedata": command_idedata,
"rename": command_rename,
"discover": command_discover,
}
@@ -640,6 +751,9 @@ def parse_args(argv):
parser_config.add_argument(
"configuration", help="Your YAML configuration file(s).", nargs="+"
)
parser_config.add_argument(
"--show-secrets", help="Show secrets in output.", action="store_true"
)
parser_compile = subparsers.add_parser(
"compile", help="Read the configuration and compile a program."
@@ -663,6 +777,10 @@ def parse_args(argv):
"--device",
help="Manually specify the serial port/address to use, for example /dev/ttyUSB0.",
)
parser_upload.add_argument(
"--file",
help="Manually specify the binary file to upload.",
)
parser_logs = subparsers.add_parser(
"logs",
@@ -677,6 +795,15 @@ def parse_args(argv):
help="Manually specify the serial port/address to use, for example /dev/ttyUSB0.",
)
parser_discover = subparsers.add_parser(
"discover",
help="Validate the configuration and show all discovered devices.",
parents=[mqtt_options],
)
parser_discover.add_argument(
"configuration", help="Your YAML configuration file.", nargs=1
)
parser_run = subparsers.add_parser(
"run",
help="Validate the configuration, create a binary, upload it, and start logs.",
@@ -863,6 +990,7 @@ def parse_args(argv):
# Finally, run the new-style parser again with the possibly swapped arguments,
# and let it error out if the command is unparsable.
parser.set_defaults(deprecated_argv_suggestion=deprecated_argv_suggestion)
argcomplete.autocomplete(parser)
return parser.parse_args(arguments)
@@ -898,6 +1026,8 @@ def run_esphome(argv):
_LOGGER.error(e, exc_info=args.verbose)
return 1
_LOGGER.info("ESPHome %s", const.__version__)
for conf_path in args.configuration:
if any(os.path.basename(conf_path) == x for x in SECRETS_FILES):
_LOGGER.warning("Skipping secrets file %s", conf_path)

View File

@@ -11,6 +11,7 @@ from esphome.const import (
CONF_TRIGGER_ID,
CONF_TYPE_ID,
CONF_TIME,
CONF_UPDATE_INTERVAL,
)
from esphome.schema_extractors import SCHEMA_EXTRACT, schema_extractor
from esphome.util import Registry
@@ -69,6 +70,8 @@ WhileAction = cg.esphome_ns.class_("WhileAction", Action)
RepeatAction = cg.esphome_ns.class_("RepeatAction", Action)
WaitUntilAction = cg.esphome_ns.class_("WaitUntilAction", Action, cg.Component)
UpdateComponentAction = cg.esphome_ns.class_("UpdateComponentAction", Action)
SuspendComponentAction = cg.esphome_ns.class_("SuspendComponentAction", Action)
ResumeComponentAction = cg.esphome_ns.class_("ResumeComponentAction", Action)
Automation = cg.esphome_ns.class_("Automation")
LambdaCondition = cg.esphome_ns.class_("LambdaCondition", Condition)
@@ -138,6 +141,7 @@ AUTOMATION_SCHEMA = cv.Schema(
AndCondition = cg.esphome_ns.class_("AndCondition", Condition)
OrCondition = cg.esphome_ns.class_("OrCondition", Condition)
NotCondition = cg.esphome_ns.class_("NotCondition", Condition)
XorCondition = cg.esphome_ns.class_("XorCondition", Condition)
@register_condition("and", AndCondition, validate_condition_list)
@@ -158,6 +162,12 @@ async def not_condition_to_code(config, condition_id, template_arg, args):
return cg.new_Pvariable(condition_id, template_arg, condition)
@register_condition("xor", XorCondition, validate_condition_list)
async def xor_condition_to_code(config, condition_id, template_arg, args):
conditions = await build_condition_list(config, template_arg, args)
return cg.new_Pvariable(condition_id, template_arg, conditions)
@register_condition("lambda", LambdaCondition, cv.returning_lambda)
async def lambda_condition_to_code(config, condition_id, template_arg, args):
lambda_ = await cg.process_lambda(config, args, return_type=bool)
@@ -254,7 +264,11 @@ async def repeat_action_to_code(config, action_id, template_arg, args):
var = cg.new_Pvariable(action_id, template_arg)
count_template = await cg.templatable(config[CONF_COUNT], args, cg.uint32)
cg.add(var.set_count(count_template))
actions = await build_action_list(config[CONF_THEN], template_arg, args)
actions = await build_action_list(
config[CONF_THEN],
cg.TemplateArguments(cg.uint32, *template_arg.args),
[(cg.uint32, "iteration"), *args],
)
cg.add(var.add_then(actions))
return var
@@ -299,6 +313,41 @@ async def component_update_action_to_code(config, action_id, template_arg, args)
return cg.new_Pvariable(action_id, template_arg, comp)
@register_action(
"component.suspend",
SuspendComponentAction,
maybe_simple_id(
{
cv.Required(CONF_ID): cv.use_id(cg.PollingComponent),
}
),
)
async def component_suspend_action_to_code(config, action_id, template_arg, args):
comp = await cg.get_variable(config[CONF_ID])
return cg.new_Pvariable(action_id, template_arg, comp)
@register_action(
"component.resume",
ResumeComponentAction,
maybe_simple_id(
{
cv.Required(CONF_ID): cv.use_id(cg.PollingComponent),
cv.Optional(CONF_UPDATE_INTERVAL): cv.templatable(
cv.positive_time_period_milliseconds
),
}
),
)
async def component_resume_action_to_code(config, action_id, template_arg, args):
comp = await cg.get_variable(config[CONF_ID])
var = cg.new_Pvariable(action_id, template_arg, comp)
if CONF_UPDATE_INTERVAL in config:
template_ = await cg.templatable(config[CONF_UPDATE_INTERVAL], args, int)
cg.add(var.set_update_interval(template_))
return var
async def build_action(full_config, template_arg, args):
registry_entry, config = cg.extract_registry_entry_config(
ACTION_REGISTRY, full_config

View File

@@ -47,6 +47,7 @@ from esphome.cpp_helpers import ( # noqa
build_registry_list,
extract_registry_entry_config,
register_parented,
past_safe_mode,
)
from esphome.cpp_types import ( # noqa
global_ns,
@@ -63,6 +64,7 @@ from esphome.cpp_types import ( # noqa
uint16,
uint32,
uint64,
int16,
int32,
int64,
size_t,
@@ -85,4 +87,5 @@ from esphome.cpp_types import ( # noqa
gpio_Flags,
EntityCategory,
Parented,
ESPTime,
)

View File

@@ -0,0 +1 @@
CODEOWNERS = ["@MrSuicideParrot"]

View File

@@ -0,0 +1,44 @@
// Datasheet https://wiki.dfrobot.com/A01NYUB%20Waterproof%20Ultrasonic%20Sensor%20SKU:%20SEN0313
#include "a01nyub.h"
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
namespace esphome {
namespace a01nyub {
static const char *const TAG = "a01nyub.sensor";
void A01nyubComponent::loop() {
uint8_t data;
while (this->available() > 0) {
this->read_byte(&data);
if (this->buffer_.empty() && (data != 0xff))
continue;
buffer_.push_back(data);
if (this->buffer_.size() == 4)
this->check_buffer_();
}
}
void A01nyubComponent::check_buffer_() {
uint8_t checksum = this->buffer_[0] + this->buffer_[1] + this->buffer_[2];
if (this->buffer_[3] == checksum) {
float distance = (this->buffer_[1] << 8) + this->buffer_[2];
if (distance > 280) {
float meters = distance / 1000.0;
ESP_LOGV(TAG, "Distance from sensor: %f mm, %f m", distance, meters);
this->publish_state(meters);
} else {
ESP_LOGW(TAG, "Invalid data read from sensor: %s", format_hex_pretty(this->buffer_).c_str());
}
} else {
ESP_LOGW(TAG, "checksum failed: %02x != %02x", checksum, this->buffer_[3]);
}
this->buffer_.clear();
}
void A01nyubComponent::dump_config() { LOG_SENSOR("", "A01nyub Sensor", this); }
} // namespace a01nyub
} // namespace esphome

View File

@@ -0,0 +1,27 @@
#pragma once
#include <vector>
#include "esphome/core/component.h"
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/uart/uart.h"
namespace esphome {
namespace a01nyub {
class A01nyubComponent : public sensor::Sensor, public Component, public uart::UARTDevice {
public:
// Nothing really public.
// ========== INTERNAL METHODS ==========
void loop() override;
void dump_config() override;
protected:
void check_buffer_();
std::vector<uint8_t> buffer_;
};
} // namespace a01nyub
} // namespace esphome

View File

@@ -0,0 +1,41 @@
import esphome.codegen as cg
from esphome.components import sensor, uart
from esphome.const import (
STATE_CLASS_MEASUREMENT,
UNIT_METER,
ICON_ARROW_EXPAND_VERTICAL,
DEVICE_CLASS_DISTANCE,
)
CODEOWNERS = ["@MrSuicideParrot"]
DEPENDENCIES = ["uart"]
a01nyub_ns = cg.esphome_ns.namespace("a01nyub")
A01nyubComponent = a01nyub_ns.class_(
"A01nyubComponent", sensor.Sensor, cg.Component, uart.UARTDevice
)
CONFIG_SCHEMA = sensor.sensor_schema(
A01nyubComponent,
unit_of_measurement=UNIT_METER,
icon=ICON_ARROW_EXPAND_VERTICAL,
accuracy_decimals=3,
state_class=STATE_CLASS_MEASUREMENT,
device_class=DEVICE_CLASS_DISTANCE,
).extend(uart.UART_DEVICE_SCHEMA)
FINAL_VALIDATE_SCHEMA = uart.final_validate_device_schema(
"a01nyub",
baud_rate=9600,
require_tx=False,
require_rx=True,
data_bits=8,
parity=None,
stop_bits=1,
)
async def to_code(config):
var = await sensor.new_sensor(config)
await cg.register_component(var, config)
await uart.register_uart_device(var, config)

View File

@@ -0,0 +1 @@
CODEOWNERS = ["@TH-Braemer"]

View File

@@ -0,0 +1,43 @@
// Datasheet https://wiki.dfrobot.com/_A02YYUW_Waterproof_Ultrasonic_Sensor_SKU_SEN0311
#include "a02yyuw.h"
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
namespace esphome {
namespace a02yyuw {
static const char *const TAG = "a02yyuw.sensor";
void A02yyuwComponent::loop() {
uint8_t data;
while (this->available() > 0) {
this->read_byte(&data);
if (this->buffer_.empty() && (data != 0xff))
continue;
buffer_.push_back(data);
if (this->buffer_.size() == 4)
this->check_buffer_();
}
}
void A02yyuwComponent::check_buffer_() {
uint8_t checksum = this->buffer_[0] + this->buffer_[1] + this->buffer_[2];
if (this->buffer_[3] == checksum) {
float distance = (this->buffer_[1] << 8) + this->buffer_[2];
if (distance > 30) {
ESP_LOGV(TAG, "Distance from sensor: %f mm", distance);
this->publish_state(distance);
} else {
ESP_LOGW(TAG, "Invalid data read from sensor: %s", format_hex_pretty(this->buffer_).c_str());
}
} else {
ESP_LOGW(TAG, "checksum failed: %02x != %02x", checksum, this->buffer_[3]);
}
this->buffer_.clear();
}
void A02yyuwComponent::dump_config() { LOG_SENSOR("", "A02yyuw Sensor", this); }
} // namespace a02yyuw
} // namespace esphome

View File

@@ -0,0 +1,27 @@
#pragma once
#include <vector>
#include "esphome/core/component.h"
#include "esphome/components/sensor/sensor.h"
#include "esphome/components/uart/uart.h"
namespace esphome {
namespace a02yyuw {
class A02yyuwComponent : public sensor::Sensor, public Component, public uart::UARTDevice {
public:
// Nothing really public.
// ========== INTERNAL METHODS ==========
void loop() override;
void dump_config() override;
protected:
void check_buffer_();
std::vector<uint8_t> buffer_;
};
} // namespace a02yyuw
} // namespace esphome

View File

@@ -0,0 +1,41 @@
import esphome.codegen as cg
from esphome.components import sensor, uart
from esphome.const import (
STATE_CLASS_MEASUREMENT,
ICON_ARROW_EXPAND_VERTICAL,
DEVICE_CLASS_DISTANCE,
)
CODEOWNERS = ["@TH-Braemer"]
DEPENDENCIES = ["uart"]
UNIT_MILLIMETERS = "mm"
a02yyuw_ns = cg.esphome_ns.namespace("a02yyuw")
A02yyuwComponent = a02yyuw_ns.class_(
"A02yyuwComponent", sensor.Sensor, cg.Component, uart.UARTDevice
)
CONFIG_SCHEMA = sensor.sensor_schema(
A02yyuwComponent,
unit_of_measurement=UNIT_MILLIMETERS,
icon=ICON_ARROW_EXPAND_VERTICAL,
accuracy_decimals=0,
state_class=STATE_CLASS_MEASUREMENT,
device_class=DEVICE_CLASS_DISTANCE,
).extend(uart.UART_DEVICE_SCHEMA)
FINAL_VALIDATE_SCHEMA = uart.final_validate_device_schema(
"a02yyuw",
baud_rate=9600,
require_tx=False,
require_rx=True,
data_bits=8,
parity=None,
stop_bits=1,
)
async def to_code(config):
var = await sensor.new_sensor(config)
await cg.register_component(var, config)
await uart.register_uart_device(var, config)

View File

@@ -46,6 +46,7 @@ void A4988::loop() {
return;
this->dir_pin_->digital_write(dir == 1);
delayMicroseconds(50);
this->step_pin_->digital_write(true);
delayMicroseconds(5);
this->step_pin_->digital_write(false);

View File

@@ -28,6 +28,6 @@ async def to_code(config):
dir_pin = await cg.gpio_pin_expression(config[CONF_DIR_PIN])
cg.add(var.set_dir_pin(dir_pin))
if CONF_SLEEP_PIN in config:
sleep_pin = await cg.gpio_pin_expression(config[CONF_SLEEP_PIN])
if sleep_pin_config := config.get(CONF_SLEEP_PIN):
sleep_pin = await cg.gpio_pin_expression(sleep_pin_config)
cg.add(var.set_sleep_pin(sleep_pin))

View File

@@ -0,0 +1 @@
CODEOWNERS = ["@DAVe3283"]

View File

@@ -0,0 +1,182 @@
#include "esphome/core/log.h"
#include "absolute_humidity.h"
namespace esphome {
namespace absolute_humidity {
static const char *const TAG = "absolute_humidity.sensor";
void AbsoluteHumidityComponent::setup() {
ESP_LOGCONFIG(TAG, "Setting up absolute humidity '%s'...", this->get_name().c_str());
ESP_LOGD(TAG, " Added callback for temperature '%s'", this->temperature_sensor_->get_name().c_str());
this->temperature_sensor_->add_on_state_callback([this](float state) { this->temperature_callback_(state); });
if (this->temperature_sensor_->has_state()) {
this->temperature_callback_(this->temperature_sensor_->get_state());
}
ESP_LOGD(TAG, " Added callback for relative humidity '%s'", this->humidity_sensor_->get_name().c_str());
this->humidity_sensor_->add_on_state_callback([this](float state) { this->humidity_callback_(state); });
if (this->humidity_sensor_->has_state()) {
this->humidity_callback_(this->humidity_sensor_->get_state());
}
}
void AbsoluteHumidityComponent::dump_config() {
LOG_SENSOR("", "Absolute Humidity", this);
switch (this->equation_) {
case BUCK:
ESP_LOGCONFIG(TAG, "Saturation Vapor Pressure Equation: Buck");
break;
case TETENS:
ESP_LOGCONFIG(TAG, "Saturation Vapor Pressure Equation: Tetens");
break;
case WOBUS:
ESP_LOGCONFIG(TAG, "Saturation Vapor Pressure Equation: Wobus");
break;
default:
ESP_LOGE(TAG, "Invalid saturation vapor pressure equation selection!");
break;
}
ESP_LOGCONFIG(TAG, "Sources");
ESP_LOGCONFIG(TAG, " Temperature: '%s'", this->temperature_sensor_->get_name().c_str());
ESP_LOGCONFIG(TAG, " Relative Humidity: '%s'", this->humidity_sensor_->get_name().c_str());
}
float AbsoluteHumidityComponent::get_setup_priority() const { return setup_priority::DATA; }
void AbsoluteHumidityComponent::loop() {
if (!this->next_update_) {
return;
}
this->next_update_ = false;
// Ensure we have source data
const bool no_temperature = std::isnan(this->temperature_);
const bool no_humidity = std::isnan(this->humidity_);
if (no_temperature || no_humidity) {
if (no_temperature) {
ESP_LOGW(TAG, "No valid state from temperature sensor!");
}
if (no_humidity) {
ESP_LOGW(TAG, "No valid state from temperature sensor!");
}
ESP_LOGW(TAG, "Unable to calculate absolute humidity.");
this->publish_state(NAN);
this->status_set_warning();
return;
}
// Convert to desired units
const float temperature_c = this->temperature_;
const float temperature_k = temperature_c + 273.15;
const float hr = this->humidity_ / 100;
// Calculate saturation vapor pressure
float es;
switch (this->equation_) {
case BUCK:
es = es_buck(temperature_c);
break;
case TETENS:
es = es_tetens(temperature_c);
break;
case WOBUS:
es = es_wobus(temperature_c);
break;
default:
ESP_LOGE(TAG, "Invalid saturation vapor pressure equation selection!");
this->publish_state(NAN);
this->status_set_error();
return;
}
ESP_LOGD(TAG, "Saturation vapor pressure %f kPa", es);
// Calculate absolute humidity
const float absolute_humidity = vapor_density(es, hr, temperature_k);
// Publish absolute humidity
ESP_LOGD(TAG, "Publishing absolute humidity %f g/m³", absolute_humidity);
this->status_clear_warning();
this->publish_state(absolute_humidity);
}
// Buck equation (https://en.wikipedia.org/wiki/Arden_Buck_equation)
// More accurate than Tetens in normal meteorologic conditions
float AbsoluteHumidityComponent::es_buck(float temperature_c) {
float a, b, c, d;
if (temperature_c >= 0) {
a = 0.61121;
b = 18.678;
c = 234.5;
d = 257.14;
} else {
a = 0.61115;
b = 18.678;
c = 233.7;
d = 279.82;
}
return a * expf((b - (temperature_c / c)) * (temperature_c / (d + temperature_c)));
}
// Tetens equation (https://en.wikipedia.org/wiki/Tetens_equation)
float AbsoluteHumidityComponent::es_tetens(float temperature_c) {
float a, b;
if (temperature_c >= 0) {
a = 17.27;
b = 237.3;
} else {
a = 21.875;
b = 265.5;
}
return 0.61078 * expf((a * temperature_c) / (temperature_c + b));
}
// Wobus equation
// https://wahiduddin.net/calc/density_altitude.htm
// https://wahiduddin.net/calc/density_algorithms.htm
// Calculate the saturation vapor pressure (kPa)
float AbsoluteHumidityComponent::es_wobus(float t) {
// THIS FUNCTION RETURNS THE SATURATION VAPOR PRESSURE ESW (MILLIBARS)
// OVER LIQUID WATER GIVEN THE TEMPERATURE T (CELSIUS). THE POLYNOMIAL
// APPROXIMATION BELOW IS DUE TO HERMAN WOBUS, A MATHEMATICIAN WHO
// WORKED AT THE NAVY WEATHER RESEARCH FACILITY, NORFOLK, VIRGINIA,
// BUT WHO IS NOW RETIRED. THE COEFFICIENTS OF THE POLYNOMIAL WERE
// CHOSEN TO FIT THE VALUES IN TABLE 94 ON PP. 351-353 OF THE SMITH-
// SONIAN METEOROLOGICAL TABLES BY ROLAND LIST (6TH EDITION). THE
// APPROXIMATION IS VALID FOR -50 < T < 100C.
//
// Baker, Schlatter 17-MAY-1982 Original version.
const float c0 = +0.99999683e00;
const float c1 = -0.90826951e-02;
const float c2 = +0.78736169e-04;
const float c3 = -0.61117958e-06;
const float c4 = +0.43884187e-08;
const float c5 = -0.29883885e-10;
const float c6 = +0.21874425e-12;
const float c7 = -0.17892321e-14;
const float c8 = +0.11112018e-16;
const float c9 = -0.30994571e-19;
const float p = c0 + t * (c1 + t * (c2 + t * (c3 + t * (c4 + t * (c5 + t * (c6 + t * (c7 + t * (c8 + t * (c9)))))))));
return 0.61078 / pow(p, 8);
}
// From https://www.environmentalbiophysics.org/chalk-talk-how-to-calculate-absolute-humidity/
// H/T to https://esphome.io/cookbook/bme280_environment.html
// H/T to https://carnotcycle.wordpress.com/2012/08/04/how-to-convert-relative-humidity-to-absolute-humidity/
float AbsoluteHumidityComponent::vapor_density(float es, float hr, float ta) {
// es = saturated vapor pressure (kPa)
// hr = relative humidity [0-1]
// ta = absolute temperature (K)
const float ea = hr * es * 1000; // vapor pressure of the air (Pa)
const float mw = 18.01528; // molar mass of water (g⋅mol⁻¹)
const float r = 8.31446261815324; // molar gas constant (J⋅K⁻¹)
return (ea * mw) / (r * ta);
}
} // namespace absolute_humidity
} // namespace esphome

View File

@@ -0,0 +1,76 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/components/sensor/sensor.h"
namespace esphome {
namespace absolute_humidity {
/// Enum listing all implemented saturation vapor pressure equations.
enum SaturationVaporPressureEquation {
BUCK,
TETENS,
WOBUS,
};
/// This class implements calculation of absolute humidity from temperature and relative humidity.
class AbsoluteHumidityComponent : public sensor::Sensor, public Component {
public:
AbsoluteHumidityComponent() = default;
void set_temperature_sensor(sensor::Sensor *temperature_sensor) { this->temperature_sensor_ = temperature_sensor; }
void set_humidity_sensor(sensor::Sensor *humidity_sensor) { this->humidity_sensor_ = humidity_sensor; }
void set_equation(SaturationVaporPressureEquation equation) { this->equation_ = equation; }
void setup() override;
void dump_config() override;
float get_setup_priority() const override;
void loop() override;
protected:
void temperature_callback_(float state) {
this->next_update_ = true;
this->temperature_ = state;
}
void humidity_callback_(float state) {
this->next_update_ = true;
this->humidity_ = state;
}
/** Buck equation for saturation vapor pressure in kPa.
*
* @param temperature_c Air temperature in °C.
*/
static float es_buck(float temperature_c);
/** Tetens equation for saturation vapor pressure in kPa.
*
* @param temperature_c Air temperature in °C.
*/
static float es_tetens(float temperature_c);
/** Wobus equation for saturation vapor pressure in kPa.
*
* @param temperature_c Air temperature in °C.
*/
static float es_wobus(float temperature_c);
/** Calculate vapor density (absolute humidity) in g/m³.
*
* @param es Saturation vapor pressure in kPa.
* @param hr Relative humidity 0 to 1.
* @param ta Absolute temperature in K.
* @param heater_duration The duration in ms that the heater should turn on for when measuring.
*/
static float vapor_density(float es, float hr, float ta);
sensor::Sensor *temperature_sensor_{nullptr};
sensor::Sensor *humidity_sensor_{nullptr};
bool next_update_{false};
float temperature_{NAN};
float humidity_{NAN};
SaturationVaporPressureEquation equation_;
};
} // namespace absolute_humidity
} // namespace esphome

View File

@@ -0,0 +1,56 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import sensor
from esphome.const import (
CONF_HUMIDITY,
CONF_TEMPERATURE,
STATE_CLASS_MEASUREMENT,
CONF_EQUATION,
ICON_WATER,
UNIT_GRAMS_PER_CUBIC_METER,
)
absolute_humidity_ns = cg.esphome_ns.namespace("absolute_humidity")
AbsoluteHumidityComponent = absolute_humidity_ns.class_(
"AbsoluteHumidityComponent", sensor.Sensor, cg.Component
)
SaturationVaporPressureEquation = absolute_humidity_ns.enum(
"SaturationVaporPressureEquation"
)
EQUATION = {
"BUCK": SaturationVaporPressureEquation.BUCK,
"TETENS": SaturationVaporPressureEquation.TETENS,
"WOBUS": SaturationVaporPressureEquation.WOBUS,
}
CONFIG_SCHEMA = (
sensor.sensor_schema(
unit_of_measurement=UNIT_GRAMS_PER_CUBIC_METER,
icon=ICON_WATER,
accuracy_decimals=2,
state_class=STATE_CLASS_MEASUREMENT,
)
.extend(
{
cv.GenerateID(): cv.declare_id(AbsoluteHumidityComponent),
cv.Required(CONF_TEMPERATURE): cv.use_id(sensor.Sensor),
cv.Required(CONF_HUMIDITY): cv.use_id(sensor.Sensor),
cv.Optional(CONF_EQUATION, default="WOBUS"): cv.enum(EQUATION, upper=True),
}
)
.extend(cv.COMPONENT_SCHEMA)
)
async def to_code(config):
var = await sensor.new_sensor(config)
await cg.register_component(var, config)
temperature_sensor = await cg.get_variable(config[CONF_TEMPERATURE])
cg.add(var.set_temperature_sensor(temperature_sensor))
humidity_sensor = await cg.get_variable(config[CONF_HUMIDITY])
cg.add(var.set_humidity_sensor(humidity_sensor))
cg.add(var.set_equation(config[CONF_EQUATION]))

View File

@@ -1 +1,196 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome import pins
from esphome.const import CONF_ANALOG, CONF_INPUT, CONF_NUMBER
from esphome.core import CORE
from esphome.components.esp32 import get_esp32_variant
from esphome.const import PLATFORM_ESP8266
from esphome.components.esp32.const import (
VARIANT_ESP32,
VARIANT_ESP32C2,
VARIANT_ESP32C3,
VARIANT_ESP32C6,
VARIANT_ESP32H2,
VARIANT_ESP32S2,
VARIANT_ESP32S3,
)
CODEOWNERS = ["@esphome/core"]
ATTENUATION_MODES = {
"0db": cg.global_ns.ADC_ATTEN_DB_0,
"2.5db": cg.global_ns.ADC_ATTEN_DB_2_5,
"6db": cg.global_ns.ADC_ATTEN_DB_6,
"11db": cg.global_ns.ADC_ATTEN_DB_11,
"auto": "auto",
}
adc1_channel_t = cg.global_ns.enum("adc1_channel_t")
adc2_channel_t = cg.global_ns.enum("adc2_channel_t")
# From https://github.com/espressif/esp-idf/blob/master/components/driver/include/driver/adc_common.h
# pin to adc1 channel mapping
ESP32_VARIANT_ADC1_PIN_TO_CHANNEL = {
VARIANT_ESP32: {
36: adc1_channel_t.ADC1_CHANNEL_0,
37: adc1_channel_t.ADC1_CHANNEL_1,
38: adc1_channel_t.ADC1_CHANNEL_2,
39: adc1_channel_t.ADC1_CHANNEL_3,
32: adc1_channel_t.ADC1_CHANNEL_4,
33: adc1_channel_t.ADC1_CHANNEL_5,
34: adc1_channel_t.ADC1_CHANNEL_6,
35: adc1_channel_t.ADC1_CHANNEL_7,
},
VARIANT_ESP32S2: {
1: adc1_channel_t.ADC1_CHANNEL_0,
2: adc1_channel_t.ADC1_CHANNEL_1,
3: adc1_channel_t.ADC1_CHANNEL_2,
4: adc1_channel_t.ADC1_CHANNEL_3,
5: adc1_channel_t.ADC1_CHANNEL_4,
6: adc1_channel_t.ADC1_CHANNEL_5,
7: adc1_channel_t.ADC1_CHANNEL_6,
8: adc1_channel_t.ADC1_CHANNEL_7,
9: adc1_channel_t.ADC1_CHANNEL_8,
10: adc1_channel_t.ADC1_CHANNEL_9,
},
VARIANT_ESP32S3: {
1: adc1_channel_t.ADC1_CHANNEL_0,
2: adc1_channel_t.ADC1_CHANNEL_1,
3: adc1_channel_t.ADC1_CHANNEL_2,
4: adc1_channel_t.ADC1_CHANNEL_3,
5: adc1_channel_t.ADC1_CHANNEL_4,
6: adc1_channel_t.ADC1_CHANNEL_5,
7: adc1_channel_t.ADC1_CHANNEL_6,
8: adc1_channel_t.ADC1_CHANNEL_7,
9: adc1_channel_t.ADC1_CHANNEL_8,
10: adc1_channel_t.ADC1_CHANNEL_9,
},
VARIANT_ESP32C3: {
0: adc1_channel_t.ADC1_CHANNEL_0,
1: adc1_channel_t.ADC1_CHANNEL_1,
2: adc1_channel_t.ADC1_CHANNEL_2,
3: adc1_channel_t.ADC1_CHANNEL_3,
4: adc1_channel_t.ADC1_CHANNEL_4,
},
VARIANT_ESP32C2: {
0: adc1_channel_t.ADC1_CHANNEL_0,
1: adc1_channel_t.ADC1_CHANNEL_1,
2: adc1_channel_t.ADC1_CHANNEL_2,
3: adc1_channel_t.ADC1_CHANNEL_3,
4: adc1_channel_t.ADC1_CHANNEL_4,
},
VARIANT_ESP32C6: {
0: adc1_channel_t.ADC1_CHANNEL_0,
1: adc1_channel_t.ADC1_CHANNEL_1,
2: adc1_channel_t.ADC1_CHANNEL_2,
3: adc1_channel_t.ADC1_CHANNEL_3,
4: adc1_channel_t.ADC1_CHANNEL_4,
5: adc1_channel_t.ADC1_CHANNEL_5,
6: adc1_channel_t.ADC1_CHANNEL_6,
},
VARIANT_ESP32H2: {
0: adc1_channel_t.ADC1_CHANNEL_0,
1: adc1_channel_t.ADC1_CHANNEL_1,
2: adc1_channel_t.ADC1_CHANNEL_2,
3: adc1_channel_t.ADC1_CHANNEL_3,
4: adc1_channel_t.ADC1_CHANNEL_4,
},
}
ESP32_VARIANT_ADC2_PIN_TO_CHANNEL = {
# TODO: add other variants
VARIANT_ESP32: {
4: adc2_channel_t.ADC2_CHANNEL_0,
0: adc2_channel_t.ADC2_CHANNEL_1,
2: adc2_channel_t.ADC2_CHANNEL_2,
15: adc2_channel_t.ADC2_CHANNEL_3,
13: adc2_channel_t.ADC2_CHANNEL_4,
12: adc2_channel_t.ADC2_CHANNEL_5,
14: adc2_channel_t.ADC2_CHANNEL_6,
27: adc2_channel_t.ADC2_CHANNEL_7,
25: adc2_channel_t.ADC2_CHANNEL_8,
26: adc2_channel_t.ADC2_CHANNEL_9,
},
VARIANT_ESP32S2: {
11: adc2_channel_t.ADC2_CHANNEL_0,
12: adc2_channel_t.ADC2_CHANNEL_1,
13: adc2_channel_t.ADC2_CHANNEL_2,
14: adc2_channel_t.ADC2_CHANNEL_3,
15: adc2_channel_t.ADC2_CHANNEL_4,
16: adc2_channel_t.ADC2_CHANNEL_5,
17: adc2_channel_t.ADC2_CHANNEL_6,
18: adc2_channel_t.ADC2_CHANNEL_7,
19: adc2_channel_t.ADC2_CHANNEL_8,
20: adc2_channel_t.ADC2_CHANNEL_9,
},
VARIANT_ESP32S3: {
11: adc2_channel_t.ADC2_CHANNEL_0,
12: adc2_channel_t.ADC2_CHANNEL_1,
13: adc2_channel_t.ADC2_CHANNEL_2,
14: adc2_channel_t.ADC2_CHANNEL_3,
15: adc2_channel_t.ADC2_CHANNEL_4,
16: adc2_channel_t.ADC2_CHANNEL_5,
17: adc2_channel_t.ADC2_CHANNEL_6,
18: adc2_channel_t.ADC2_CHANNEL_7,
19: adc2_channel_t.ADC2_CHANNEL_8,
20: adc2_channel_t.ADC2_CHANNEL_9,
},
VARIANT_ESP32C3: {
5: adc2_channel_t.ADC2_CHANNEL_0,
},
VARIANT_ESP32C2: {},
VARIANT_ESP32C6: {},
VARIANT_ESP32H2: {},
}
def validate_adc_pin(value):
if str(value).upper() == "VCC":
if CORE.is_rp2040:
return pins.internal_gpio_input_pin_schema(29)
return cv.only_on([PLATFORM_ESP8266])("VCC")
if str(value).upper() == "TEMPERATURE":
return cv.only_on_rp2040("TEMPERATURE")
if CORE.is_esp32:
conf = pins.internal_gpio_input_pin_schema(value)
value = conf[CONF_NUMBER]
variant = get_esp32_variant()
if (
variant not in ESP32_VARIANT_ADC1_PIN_TO_CHANNEL
and variant not in ESP32_VARIANT_ADC2_PIN_TO_CHANNEL
):
raise cv.Invalid(f"This ESP32 variant ({variant}) is not supported")
if (
value not in ESP32_VARIANT_ADC1_PIN_TO_CHANNEL[variant]
and value not in ESP32_VARIANT_ADC2_PIN_TO_CHANNEL[variant]
):
raise cv.Invalid(f"{variant} doesn't support ADC on this pin")
return conf
if CORE.is_esp8266:
conf = pins.gpio_pin_schema(
{CONF_ANALOG: True, CONF_INPUT: True}, internal=True
)(value)
if conf[CONF_NUMBER] != 17: # A0
raise cv.Invalid("ESP8266: Only pin A0 (GPIO17) supports ADC")
return conf
if CORE.is_rp2040:
conf = pins.internal_gpio_input_pin_schema(value)
number = conf[CONF_NUMBER]
if number not in (26, 27, 28, 29):
raise cv.Invalid("RP2040: Only pins 26, 27, 28 and 29 support ADC")
return conf
if CORE.is_libretiny:
return pins.gpio_pin_schema(
{CONF_ANALOG: True, CONF_INPUT: True}, internal=True
)(value)
raise NotImplementedError

View File

@@ -1,6 +1,6 @@
#include "adc_sensor.h"
#include "esphome/core/log.h"
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
#ifdef USE_ESP8266
#ifdef USE_ADC_SENSOR_VCC
@@ -11,20 +11,27 @@ ADC_MODE(ADC_VCC)
#endif
#endif
#ifdef USE_RP2040
#ifdef CYW43_USES_VSYS_PIN
#include "pico/cyw43_arch.h"
#endif
#include <hardware/adc.h>
#endif
namespace esphome {
namespace adc {
static const char *const TAG = "adc";
// 13bit for S2, and 12bit for all other esp32 variants
// 13-bit for S2, 12-bit for all other ESP32 variants
#ifdef USE_ESP32
static const adc_bits_width_t ADC_WIDTH_MAX_SOC_BITS = static_cast<adc_bits_width_t>(ADC_WIDTH_MAX - 1);
#ifndef SOC_ADC_RTC_MAX_BITWIDTH
#if USE_ESP32_VARIANT_ESP32S2
static const int SOC_ADC_RTC_MAX_BITWIDTH = 13;
static const int32_t SOC_ADC_RTC_MAX_BITWIDTH = 13;
#else
static const int SOC_ADC_RTC_MAX_BITWIDTH = 12;
static const int32_t SOC_ADC_RTC_MAX_BITWIDTH = 12;
#endif
#endif
@@ -32,21 +39,32 @@ static const int ADC_MAX = (1 << SOC_ADC_RTC_MAX_BITWIDTH) - 1; // 4095 (12 b
static const int ADC_HALF = (1 << SOC_ADC_RTC_MAX_BITWIDTH) >> 1; // 2048 (12 bit) or 4096 (13 bit)
#endif
void ADCSensor::setup() {
#ifdef USE_RP2040
extern "C"
#endif
void
ADCSensor::setup() {
ESP_LOGCONFIG(TAG, "Setting up ADC '%s'...", this->get_name().c_str());
#ifndef USE_ADC_SENSOR_VCC
#if !defined(USE_ADC_SENSOR_VCC) && !defined(USE_RP2040)
pin_->setup();
#endif
#ifdef USE_ESP32
adc1_config_width(ADC_WIDTH_MAX_SOC_BITS);
if (!autorange_) {
adc1_config_channel_atten(channel_, attenuation_);
if (channel1_ != ADC1_CHANNEL_MAX) {
adc1_config_width(ADC_WIDTH_MAX_SOC_BITS);
if (!autorange_) {
adc1_config_channel_atten(channel1_, attenuation_);
}
} else if (channel2_ != ADC2_CHANNEL_MAX) {
if (!autorange_) {
adc2_config_channel_atten(channel2_, attenuation_);
}
}
// load characteristics for each attenuation
for (int i = 0; i < (int) ADC_ATTEN_MAX; i++) {
auto cal_value = esp_adc_cal_characterize(ADC_UNIT_1, (adc_atten_t) i, ADC_WIDTH_MAX_SOC_BITS,
for (int32_t i = 0; i <= ADC_ATTEN_DB_11; i++) {
auto adc_unit = channel1_ != ADC1_CHANNEL_MAX ? ADC_UNIT_1 : ADC_UNIT_2;
auto cal_value = esp_adc_cal_characterize(adc_unit, (adc_atten_t) i, ADC_WIDTH_MAX_SOC_BITS,
1100, // default vref
&cal_characteristics_[i]);
switch (cal_value) {
@@ -63,17 +81,27 @@ void ADCSensor::setup() {
}
#endif // USE_ESP32
#ifdef USE_RP2040
static bool initialized = false;
if (!initialized) {
adc_init();
initialized = true;
}
#endif
ESP_LOGCONFIG(TAG, "ADC '%s' setup finished!", this->get_name().c_str());
}
void ADCSensor::dump_config() {
LOG_SENSOR("", "ADC Sensor", this);
#ifdef USE_ESP8266
#if defined(USE_ESP8266) || defined(USE_LIBRETINY)
#ifdef USE_ADC_SENSOR_VCC
ESP_LOGCONFIG(TAG, " Pin: VCC");
#else
LOG_PIN(" Pin: ", pin_);
#endif
#endif // USE_ESP8266
#endif // USE_ESP8266 || USE_LIBRETINY
#ifdef USE_ESP32
LOG_PIN(" Pin: ", pin_);
@@ -98,6 +126,19 @@ void ADCSensor::dump_config() {
}
}
#endif // USE_ESP32
#ifdef USE_RP2040
if (this->is_temperature_) {
ESP_LOGCONFIG(TAG, " Pin: Temperature");
} else {
#ifdef USE_ADC_SENSOR_VCC
ESP_LOGCONFIG(TAG, " Pin: VCC");
#else
LOG_PIN(" Pin: ", pin_);
#endif // USE_ADC_SENSOR_VCC
}
#endif // USE_RP2040
LOG_UPDATE_INTERVAL(this);
}
@@ -111,9 +152,9 @@ void ADCSensor::update() {
#ifdef USE_ESP8266
float ADCSensor::sample() {
#ifdef USE_ADC_SENSOR_VCC
int raw = ESP.getVcc(); // NOLINT(readability-static-accessed-through-instance)
int32_t raw = ESP.getVcc(); // NOLINT(readability-static-accessed-through-instance)
#else
int raw = analogRead(this->pin_->get_pin()); // NOLINT
int32_t raw = analogRead(this->pin_->get_pin()); // NOLINT
#endif
if (output_raw_) {
return raw;
@@ -125,29 +166,53 @@ float ADCSensor::sample() {
#ifdef USE_ESP32
float ADCSensor::sample() {
if (!autorange_) {
int raw = adc1_get_raw(channel_);
int raw = -1;
if (channel1_ != ADC1_CHANNEL_MAX) {
raw = adc1_get_raw(channel1_);
} else if (channel2_ != ADC2_CHANNEL_MAX) {
adc2_get_raw(channel2_, ADC_WIDTH_MAX_SOC_BITS, &raw);
}
if (raw == -1) {
return NAN;
}
if (output_raw_) {
return raw;
}
uint32_t mv = esp_adc_cal_raw_to_voltage(raw, &cal_characteristics_[(int) attenuation_]);
uint32_t mv = esp_adc_cal_raw_to_voltage(raw, &cal_characteristics_[(int32_t) attenuation_]);
return mv / 1000.0f;
}
int raw11, raw6 = ADC_MAX, raw2 = ADC_MAX, raw0 = ADC_MAX;
adc1_config_channel_atten(channel_, ADC_ATTEN_DB_11);
raw11 = adc1_get_raw(channel_);
if (raw11 < ADC_MAX) {
adc1_config_channel_atten(channel_, ADC_ATTEN_DB_6);
raw6 = adc1_get_raw(channel_);
if (raw6 < ADC_MAX) {
adc1_config_channel_atten(channel_, ADC_ATTEN_DB_2_5);
raw2 = adc1_get_raw(channel_);
if (raw2 < ADC_MAX) {
adc1_config_channel_atten(channel_, ADC_ATTEN_DB_0);
raw0 = adc1_get_raw(channel_);
int raw11 = ADC_MAX, raw6 = ADC_MAX, raw2 = ADC_MAX, raw0 = ADC_MAX;
if (channel1_ != ADC1_CHANNEL_MAX) {
adc1_config_channel_atten(channel1_, ADC_ATTEN_DB_11);
raw11 = adc1_get_raw(channel1_);
if (raw11 < ADC_MAX) {
adc1_config_channel_atten(channel1_, ADC_ATTEN_DB_6);
raw6 = adc1_get_raw(channel1_);
if (raw6 < ADC_MAX) {
adc1_config_channel_atten(channel1_, ADC_ATTEN_DB_2_5);
raw2 = adc1_get_raw(channel1_);
if (raw2 < ADC_MAX) {
adc1_config_channel_atten(channel1_, ADC_ATTEN_DB_0);
raw0 = adc1_get_raw(channel1_);
}
}
}
} else if (channel2_ != ADC2_CHANNEL_MAX) {
adc2_config_channel_atten(channel2_, ADC_ATTEN_DB_11);
adc2_get_raw(channel2_, ADC_WIDTH_MAX_SOC_BITS, &raw11);
if (raw11 < ADC_MAX) {
adc2_config_channel_atten(channel2_, ADC_ATTEN_DB_6);
adc2_get_raw(channel2_, ADC_WIDTH_MAX_SOC_BITS, &raw6);
if (raw6 < ADC_MAX) {
adc2_config_channel_atten(channel2_, ADC_ATTEN_DB_2_5);
adc2_get_raw(channel2_, ADC_WIDTH_MAX_SOC_BITS, &raw2);
if (raw2 < ADC_MAX) {
adc2_config_channel_atten(channel2_, ADC_ATTEN_DB_0);
adc2_get_raw(channel2_, ADC_WIDTH_MAX_SOC_BITS, &raw0);
}
}
}
}
@@ -156,10 +221,10 @@ float ADCSensor::sample() {
return NAN;
}
uint32_t mv11 = esp_adc_cal_raw_to_voltage(raw11, &cal_characteristics_[(int) ADC_ATTEN_DB_11]);
uint32_t mv6 = esp_adc_cal_raw_to_voltage(raw6, &cal_characteristics_[(int) ADC_ATTEN_DB_6]);
uint32_t mv2 = esp_adc_cal_raw_to_voltage(raw2, &cal_characteristics_[(int) ADC_ATTEN_DB_2_5]);
uint32_t mv0 = esp_adc_cal_raw_to_voltage(raw0, &cal_characteristics_[(int) ADC_ATTEN_DB_0]);
uint32_t mv11 = esp_adc_cal_raw_to_voltage(raw11, &cal_characteristics_[(int32_t) ADC_ATTEN_DB_11]);
uint32_t mv6 = esp_adc_cal_raw_to_voltage(raw6, &cal_characteristics_[(int32_t) ADC_ATTEN_DB_6]);
uint32_t mv2 = esp_adc_cal_raw_to_voltage(raw2, &cal_characteristics_[(int32_t) ADC_ATTEN_DB_2_5]);
uint32_t mv0 = esp_adc_cal_raw_to_voltage(raw0, &cal_characteristics_[(int32_t) ADC_ATTEN_DB_0]);
// Contribution of each value, in range 0-2048 (12 bit ADC) or 0-4096 (13 bit ADC)
uint32_t c11 = std::min(raw11, ADC_HALF);
@@ -175,6 +240,60 @@ float ADCSensor::sample() {
}
#endif // USE_ESP32
#ifdef USE_RP2040
float ADCSensor::sample() {
if (this->is_temperature_) {
adc_set_temp_sensor_enabled(true);
delay(1);
adc_select_input(4);
int32_t raw = adc_read();
adc_set_temp_sensor_enabled(false);
if (this->output_raw_) {
return raw;
}
return raw * 3.3f / 4096.0f;
} else {
uint8_t pin = this->pin_->get_pin();
#ifdef CYW43_USES_VSYS_PIN
if (pin == PICO_VSYS_PIN) {
// Measuring VSYS on Raspberry Pico W needs to be wrapped with
// `cyw43_thread_enter()`/`cyw43_thread_exit()` as discussed in
// https://github.com/raspberrypi/pico-sdk/issues/1222, since Wifi chip and
// VSYS ADC both share GPIO29
cyw43_thread_enter();
}
#endif // CYW43_USES_VSYS_PIN
adc_gpio_init(pin);
adc_select_input(pin - 26);
int32_t raw = adc_read();
#ifdef CYW43_USES_VSYS_PIN
if (pin == PICO_VSYS_PIN) {
cyw43_thread_exit();
}
#endif // CYW43_USES_VSYS_PIN
if (output_raw_) {
return raw;
}
float coeff = pin == PICO_VSYS_PIN ? 3.0 : 1.0;
return raw * 3.3f / 4096.0f * coeff;
}
}
#endif
#ifdef USE_LIBRETINY
float ADCSensor::sample() {
if (output_raw_) {
return analogRead(this->pin_->get_pin()); // NOLINT
}
return analogReadVoltage(this->pin_->get_pin()) / 1000.0f; // NOLINT
}
#endif // USE_LIBRETINY
#ifdef USE_ESP8266
std::string ADCSensor::unique_id() { return get_mac_address() + "-adc"; }
#endif

View File

@@ -19,16 +19,23 @@ class ADCSensor : public sensor::Sensor, public PollingComponent, public voltage
#ifdef USE_ESP32
/// Set the attenuation for this pin. Only available on the ESP32.
void set_attenuation(adc_atten_t attenuation) { attenuation_ = attenuation; }
void set_channel(adc1_channel_t channel) { channel_ = channel; }
void set_channel1(adc1_channel_t channel) {
channel1_ = channel;
channel2_ = ADC2_CHANNEL_MAX;
}
void set_channel2(adc2_channel_t channel) {
channel2_ = channel;
channel1_ = ADC1_CHANNEL_MAX;
}
void set_autorange(bool autorange) { autorange_ = autorange; }
#endif
/// Update adc values.
/// Update ADC values
void update() override;
/// Setup ADc
/// Setup ADC
void setup() override;
void dump_config() override;
/// `HARDWARE_LATE` setup priority.
/// `HARDWARE_LATE` setup priority
float get_setup_priority() const override;
void set_pin(InternalGPIOPin *pin) { this->pin_ = pin; }
void set_output_raw(bool output_raw) { output_raw_ = output_raw; }
@@ -38,15 +45,28 @@ class ADCSensor : public sensor::Sensor, public PollingComponent, public voltage
std::string unique_id() override;
#endif
#ifdef USE_RP2040
void set_is_temperature() { is_temperature_ = true; }
#endif
protected:
InternalGPIOPin *pin_;
bool output_raw_{false};
#ifdef USE_RP2040
bool is_temperature_{false};
#endif
#ifdef USE_ESP32
adc_atten_t attenuation_{ADC_ATTEN_DB_0};
adc1_channel_t channel_{};
adc1_channel_t channel1_{ADC1_CHANNEL_MAX};
adc2_channel_t channel2_{ADC2_CHANNEL_MAX};
bool autorange_{false};
esp_adc_cal_characteristics_t cal_characteristics_[(int) ADC_ATTEN_MAX] = {};
#if ESP_IDF_VERSION_MAJOR >= 5
esp_adc_cal_characteristics_t cal_characteristics_[SOC_ADC_ATTEN_NUM] = {};
#else
esp_adc_cal_characteristics_t cal_characteristics_[ADC_ATTEN_MAX] = {};
#endif
#endif
};

View File

@@ -1,128 +1,49 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome import pins
import esphome.final_validate as fv
from esphome.core import CORE
from esphome.components import sensor, voltage_sampler
from esphome.components.esp32 import get_esp32_variant
from esphome.const import (
CONF_ATTENUATION,
CONF_RAW,
CONF_ID,
CONF_INPUT,
CONF_NUMBER,
CONF_PIN,
CONF_RAW,
CONF_WIFI,
DEVICE_CLASS_VOLTAGE,
STATE_CLASS_MEASUREMENT,
UNIT_VOLT,
)
from esphome.core import CORE
from esphome.components.esp32 import get_esp32_variant
from esphome.components.esp32.const import (
VARIANT_ESP32,
VARIANT_ESP32C3,
VARIANT_ESP32H2,
VARIANT_ESP32S2,
VARIANT_ESP32S3,
from . import (
ATTENUATION_MODES,
ESP32_VARIANT_ADC1_PIN_TO_CHANNEL,
ESP32_VARIANT_ADC2_PIN_TO_CHANNEL,
validate_adc_pin,
)
AUTO_LOAD = ["voltage_sampler"]
ATTENUATION_MODES = {
"0db": cg.global_ns.ADC_ATTEN_DB_0,
"2.5db": cg.global_ns.ADC_ATTEN_DB_2_5,
"6db": cg.global_ns.ADC_ATTEN_DB_6,
"11db": cg.global_ns.ADC_ATTEN_DB_11,
"auto": "auto",
}
adc1_channel_t = cg.global_ns.enum("adc1_channel_t")
# From https://github.com/espressif/esp-idf/blob/master/components/driver/include/driver/adc_common.h
# pin to adc1 channel mapping
ESP32_VARIANT_ADC1_PIN_TO_CHANNEL = {
VARIANT_ESP32: {
36: adc1_channel_t.ADC1_CHANNEL_0,
37: adc1_channel_t.ADC1_CHANNEL_1,
38: adc1_channel_t.ADC1_CHANNEL_2,
39: adc1_channel_t.ADC1_CHANNEL_3,
32: adc1_channel_t.ADC1_CHANNEL_4,
33: adc1_channel_t.ADC1_CHANNEL_5,
34: adc1_channel_t.ADC1_CHANNEL_6,
35: adc1_channel_t.ADC1_CHANNEL_7,
},
VARIANT_ESP32S2: {
1: adc1_channel_t.ADC1_CHANNEL_0,
2: adc1_channel_t.ADC1_CHANNEL_1,
3: adc1_channel_t.ADC1_CHANNEL_2,
4: adc1_channel_t.ADC1_CHANNEL_3,
5: adc1_channel_t.ADC1_CHANNEL_4,
6: adc1_channel_t.ADC1_CHANNEL_5,
7: adc1_channel_t.ADC1_CHANNEL_6,
8: adc1_channel_t.ADC1_CHANNEL_7,
9: adc1_channel_t.ADC1_CHANNEL_8,
10: adc1_channel_t.ADC1_CHANNEL_9,
},
VARIANT_ESP32S3: {
1: adc1_channel_t.ADC1_CHANNEL_0,
2: adc1_channel_t.ADC1_CHANNEL_1,
3: adc1_channel_t.ADC1_CHANNEL_2,
4: adc1_channel_t.ADC1_CHANNEL_3,
5: adc1_channel_t.ADC1_CHANNEL_4,
6: adc1_channel_t.ADC1_CHANNEL_5,
7: adc1_channel_t.ADC1_CHANNEL_6,
8: adc1_channel_t.ADC1_CHANNEL_7,
9: adc1_channel_t.ADC1_CHANNEL_8,
10: adc1_channel_t.ADC1_CHANNEL_9,
},
VARIANT_ESP32C3: {
0: adc1_channel_t.ADC1_CHANNEL_0,
1: adc1_channel_t.ADC1_CHANNEL_1,
2: adc1_channel_t.ADC1_CHANNEL_2,
3: adc1_channel_t.ADC1_CHANNEL_3,
4: adc1_channel_t.ADC1_CHANNEL_4,
},
VARIANT_ESP32H2: {
0: adc1_channel_t.ADC1_CHANNEL_0,
1: adc1_channel_t.ADC1_CHANNEL_1,
2: adc1_channel_t.ADC1_CHANNEL_2,
3: adc1_channel_t.ADC1_CHANNEL_3,
4: adc1_channel_t.ADC1_CHANNEL_4,
},
}
def validate_adc_pin(value):
if str(value).upper() == "VCC":
return cv.only_on_esp8266("VCC")
if CORE.is_esp32:
value = pins.internal_gpio_input_pin_number(value)
variant = get_esp32_variant()
if variant not in ESP32_VARIANT_ADC1_PIN_TO_CHANNEL:
raise cv.Invalid(f"This ESP32 variant ({variant}) is not supported")
if value not in ESP32_VARIANT_ADC1_PIN_TO_CHANNEL[variant]:
raise cv.Invalid(f"{variant} doesn't support ADC on this pin")
return pins.internal_gpio_input_pin_schema(value)
if CORE.is_esp8266:
from esphome.components.esp8266.gpio import CONF_ANALOG
value = pins.internal_gpio_pin_number({CONF_ANALOG: True, CONF_INPUT: True})(
value
)
if value != 17: # A0
raise cv.Invalid("ESP8266: Only pin A0 (GPIO17) supports ADC.")
return pins.gpio_pin_schema(
{CONF_ANALOG: True, CONF_INPUT: True}, internal=True
)(value)
raise NotImplementedError
def validate_config(config):
if config[CONF_RAW] and config.get(CONF_ATTENUATION, None) == "auto":
raise cv.Invalid("Automatic attenuation cannot be used when raw output is set.")
raise cv.Invalid("Automatic attenuation cannot be used when raw output is set")
return config
def final_validate_config(config):
if CORE.is_esp32:
variant = get_esp32_variant()
if (
CONF_WIFI in fv.full_config.get()
and config[CONF_PIN][CONF_NUMBER]
in ESP32_VARIANT_ADC2_PIN_TO_CHANNEL[variant]
):
raise cv.Invalid(
f"{variant} doesn't support ADC on this pin when Wi-Fi is configured"
)
return config
@@ -152,6 +73,8 @@ CONFIG_SCHEMA = cv.All(
validate_config,
)
FINAL_VALIDATE_SCHEMA = final_validate_config
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
@@ -160,21 +83,32 @@ async def to_code(config):
if config[CONF_PIN] == "VCC":
cg.add_define("USE_ADC_SENSOR_VCC")
elif config[CONF_PIN] == "TEMPERATURE":
cg.add(var.set_is_temperature())
else:
pin = await cg.gpio_pin_expression(config[CONF_PIN])
cg.add(var.set_pin(pin))
if CONF_RAW in config:
cg.add(var.set_output_raw(config[CONF_RAW]))
cg.add(var.set_output_raw(config[CONF_RAW]))
if CONF_ATTENUATION in config:
if config[CONF_ATTENUATION] == "auto":
if attenuation := config.get(CONF_ATTENUATION):
if attenuation == "auto":
cg.add(var.set_autorange(cg.global_ns.true))
else:
cg.add(var.set_attenuation(config[CONF_ATTENUATION]))
cg.add(var.set_attenuation(attenuation))
if CORE.is_esp32:
variant = get_esp32_variant()
pin_num = config[CONF_PIN][CONF_NUMBER]
chan = ESP32_VARIANT_ADC1_PIN_TO_CHANNEL[variant][pin_num]
cg.add(var.set_channel(chan))
if (
variant in ESP32_VARIANT_ADC1_PIN_TO_CHANNEL
and pin_num in ESP32_VARIANT_ADC1_PIN_TO_CHANNEL[variant]
):
chan = ESP32_VARIANT_ADC1_PIN_TO_CHANNEL[variant][pin_num]
cg.add(var.set_channel1(chan))
elif (
variant in ESP32_VARIANT_ADC2_PIN_TO_CHANNEL
and pin_num in ESP32_VARIANT_ADC2_PIN_TO_CHANNEL[variant]
):
chan = ESP32_VARIANT_ADC2_PIN_TO_CHANNEL[variant][pin_num]
cg.add(var.set_channel2(chan))

View File

@@ -16,13 +16,16 @@ ADC128S102Sensor = adc128s102_ns.class_(
)
CONF_ADC128S102_ID = "adc128s102_id"
CONFIG_SCHEMA = sensor.SENSOR_SCHEMA.extend(
{
cv.GenerateID(): cv.declare_id(ADC128S102Sensor),
cv.GenerateID(CONF_ADC128S102_ID): cv.use_id(ADC128S102),
cv.Required(CONF_CHANNEL): cv.int_range(min=0, max=7),
}
).extend(cv.polling_component_schema("60s"))
CONFIG_SCHEMA = (
sensor.sensor_schema(ADC128S102Sensor)
.extend(
{
cv.GenerateID(CONF_ADC128S102_ID): cv.use_id(ADC128S102),
cv.Required(CONF_CHANNEL): cv.int_range(min=0, max=7),
}
)
.extend(cv.polling_component_schema("60s"))
)
async def to_code(config):

View File

@@ -5,10 +5,12 @@
#include "esphome/components/display/display_buffer.h"
#include "esphome/components/light/addressable_light.h"
#include <vector>
namespace esphome {
namespace addressable_light {
class AddressableLightDisplay : public display::DisplayBuffer, public PollingComponent {
class AddressableLightDisplay : public display::DisplayBuffer {
public:
light::AddressableLight *get_light() const { return this->light_; }

View File

@@ -45,19 +45,18 @@ async def to_code(config):
cg.add(var.set_height(config[CONF_HEIGHT]))
cg.add(var.set_light(wrapped_light))
await cg.register_component(var, config)
await display.register_display(var, config)
if CONF_PIXEL_MAPPER in config:
if pixel_mapper := config.get(CONF_PIXEL_MAPPER):
pixel_mapper_template_ = await cg.process_lambda(
config[CONF_PIXEL_MAPPER],
pixel_mapper,
[(int, "x"), (int, "y")],
return_type=cg.int_,
)
cg.add(var.set_pixel_mapper(pixel_mapper_template_))
if CONF_LAMBDA in config:
if lambda_config := config.get(CONF_LAMBDA):
lambda_ = await cg.process_lambda(
config[CONF_LAMBDA], [(display.DisplayBufferRef, "it")], return_type=cg.void
lambda_config, [(display.DisplayRef, "it")], return_type=cg.void
)
cg.add(var.set_writer(lambda_))

View File

@@ -0,0 +1 @@
CODEOWNERS = ["@kpfleming"]

View File

@@ -0,0 +1,302 @@
// This component was developed using knowledge gathered by a number
// of people who reverse-engineered the Shelly 3EM:
//
// @AndreKR on GitHub
// Axel (@Axel830 on GitHub)
// Marko (@goodkiller on GitHub)
// Michaël Piron (@michaelpiron on GitHub)
// Theo Arends (@arendst on GitHub)
#include "ade7880.h"
#include "ade7880_registers.h"
#include "esphome/core/log.h"
namespace esphome {
namespace ade7880 {
static const char *const TAG = "ade7880";
void IRAM_ATTR ADE7880Store::gpio_intr(ADE7880Store *arg) { arg->reset_done = true; }
void ADE7880::setup() {
if (this->irq0_pin_ != nullptr) {
this->irq0_pin_->setup();
}
this->irq1_pin_->setup();
if (this->reset_pin_ != nullptr) {
this->reset_pin_->setup();
}
this->store_.irq1_pin = this->irq1_pin_->to_isr();
this->irq1_pin_->attach_interrupt(ADE7880Store::gpio_intr, &this->store_, gpio::INTERRUPT_FALLING_EDGE);
// if IRQ1 is already asserted, the cause must be determined
if (this->irq1_pin_->digital_read() == 0) {
ESP_LOGD(TAG, "IRQ1 found asserted during setup()");
auto status1 = read_u32_register16_(STATUS1);
if ((status1 & ~STATUS1_RSTDONE) != 0) {
// not safe to proceed, must initiate reset
ESP_LOGD(TAG, "IRQ1 asserted for !RSTDONE, resetting device");
this->reset_device_();
return;
}
if ((status1 & STATUS1_RSTDONE) == STATUS1_RSTDONE) {
// safe to proceed, device has just completed reset cycle
ESP_LOGD(TAG, "Acknowledging RSTDONE");
this->write_u32_register16_(STATUS0, 0xFFFF);
this->write_u32_register16_(STATUS1, 0xFFFF);
this->init_device_();
return;
}
}
this->reset_device_();
}
void ADE7880::loop() {
// check for completion of a reset cycle
if (!this->store_.reset_done) {
return;
}
ESP_LOGD(TAG, "Acknowledging RSTDONE");
this->write_u32_register16_(STATUS0, 0xFFFF);
this->write_u32_register16_(STATUS1, 0xFFFF);
this->init_device_();
this->store_.reset_done = false;
this->store_.reset_pending = false;
}
template<typename F>
void ADE7880::update_sensor_from_s24zp_register16_(sensor::Sensor *sensor, uint16_t a_register, F &&f) {
if (sensor == nullptr) {
return;
}
float val = this->read_s24zp_register16_(a_register);
sensor->publish_state(f(val));
}
template<typename F>
void ADE7880::update_sensor_from_s16_register16_(sensor::Sensor *sensor, uint16_t a_register, F &&f) {
if (sensor == nullptr) {
return;
}
float val = this->read_s16_register16_(a_register);
sensor->publish_state(f(val));
}
template<typename F>
void ADE7880::update_sensor_from_s32_register16_(sensor::Sensor *sensor, uint16_t a_register, F &&f) {
if (sensor == nullptr) {
return;
}
float val = this->read_s32_register16_(a_register);
sensor->publish_state(f(val));
}
void ADE7880::update() {
if (this->store_.reset_pending) {
return;
}
auto start = millis();
if (this->channel_n_ != nullptr) {
auto *chan = this->channel_n_;
this->update_sensor_from_s24zp_register16_(chan->current, NIRMS, [](float val) { return val / 100000.0f; });
}
if (this->channel_a_ != nullptr) {
auto *chan = this->channel_a_;
this->update_sensor_from_s24zp_register16_(chan->current, AIRMS, [](float val) { return val / 100000.0f; });
this->update_sensor_from_s24zp_register16_(chan->voltage, BVRMS, [](float val) { return val / 10000.0f; });
this->update_sensor_from_s24zp_register16_(chan->active_power, AWATT, [](float val) { return val / 100.0f; });
this->update_sensor_from_s24zp_register16_(chan->apparent_power, AVA, [](float val) { return val / 100.0f; });
this->update_sensor_from_s16_register16_(chan->power_factor, APF,
[](float val) { return std::abs(val / -327.68f); });
this->update_sensor_from_s32_register16_(chan->forward_active_energy, AFWATTHR, [&chan](float val) {
return chan->forward_active_energy_total += val / 14400.0f;
});
this->update_sensor_from_s32_register16_(chan->reverse_active_energy, AFWATTHR, [&chan](float val) {
return chan->reverse_active_energy_total += val / 14400.0f;
});
}
if (this->channel_b_ != nullptr) {
auto *chan = this->channel_b_;
this->update_sensor_from_s24zp_register16_(chan->current, BIRMS, [](float val) { return val / 100000.0f; });
this->update_sensor_from_s24zp_register16_(chan->voltage, BVRMS, [](float val) { return val / 10000.0f; });
this->update_sensor_from_s24zp_register16_(chan->active_power, BWATT, [](float val) { return val / 100.0f; });
this->update_sensor_from_s24zp_register16_(chan->apparent_power, BVA, [](float val) { return val / 100.0f; });
this->update_sensor_from_s16_register16_(chan->power_factor, BPF,
[](float val) { return std::abs(val / -327.68f); });
this->update_sensor_from_s32_register16_(chan->forward_active_energy, BFWATTHR, [&chan](float val) {
return chan->forward_active_energy_total += val / 14400.0f;
});
this->update_sensor_from_s32_register16_(chan->reverse_active_energy, BFWATTHR, [&chan](float val) {
return chan->reverse_active_energy_total += val / 14400.0f;
});
}
if (this->channel_c_ != nullptr) {
auto *chan = this->channel_c_;
this->update_sensor_from_s24zp_register16_(chan->current, CIRMS, [](float val) { return val / 100000.0f; });
this->update_sensor_from_s24zp_register16_(chan->voltage, CVRMS, [](float val) { return val / 10000.0f; });
this->update_sensor_from_s24zp_register16_(chan->active_power, CWATT, [](float val) { return val / 100.0f; });
this->update_sensor_from_s24zp_register16_(chan->apparent_power, CVA, [](float val) { return val / 100.0f; });
this->update_sensor_from_s16_register16_(chan->power_factor, CPF,
[](float val) { return std::abs(val / -327.68f); });
this->update_sensor_from_s32_register16_(chan->forward_active_energy, CFWATTHR, [&chan](float val) {
return chan->forward_active_energy_total += val / 14400.0f;
});
this->update_sensor_from_s32_register16_(chan->reverse_active_energy, CFWATTHR, [&chan](float val) {
return chan->reverse_active_energy_total += val / 14400.0f;
});
}
ESP_LOGD(TAG, "update took %u ms", millis() - start);
}
void ADE7880::dump_config() {
ESP_LOGCONFIG(TAG, "ADE7880:");
LOG_PIN(" IRQ0 Pin: ", this->irq0_pin_);
LOG_PIN(" IRQ1 Pin: ", this->irq1_pin_);
LOG_PIN(" RESET Pin: ", this->reset_pin_);
ESP_LOGCONFIG(TAG, " Frequency: %.0f Hz", this->frequency_);
if (this->channel_a_ != nullptr) {
ESP_LOGCONFIG(TAG, " Phase A:");
LOG_SENSOR(" ", "Current", this->channel_a_->current);
LOG_SENSOR(" ", "Voltage", this->channel_a_->voltage);
LOG_SENSOR(" ", "Active Power", this->channel_a_->active_power);
LOG_SENSOR(" ", "Apparent Power", this->channel_a_->apparent_power);
LOG_SENSOR(" ", "Power Factor", this->channel_a_->power_factor);
LOG_SENSOR(" ", "Forward Active Energy", this->channel_a_->forward_active_energy);
LOG_SENSOR(" ", "Reverse Active Energy", this->channel_a_->reverse_active_energy);
ESP_LOGCONFIG(TAG, " Calibration:");
ESP_LOGCONFIG(TAG, " Current: %u", this->channel_a_->current_gain_calibration);
ESP_LOGCONFIG(TAG, " Voltage: %d", this->channel_a_->voltage_gain_calibration);
ESP_LOGCONFIG(TAG, " Power: %d", this->channel_a_->power_gain_calibration);
ESP_LOGCONFIG(TAG, " Phase Angle: %u", this->channel_a_->phase_angle_calibration);
}
if (this->channel_b_ != nullptr) {
ESP_LOGCONFIG(TAG, " Phase B:");
LOG_SENSOR(" ", "Current", this->channel_b_->current);
LOG_SENSOR(" ", "Voltage", this->channel_b_->voltage);
LOG_SENSOR(" ", "Active Power", this->channel_b_->active_power);
LOG_SENSOR(" ", "Apparent Power", this->channel_b_->apparent_power);
LOG_SENSOR(" ", "Power Factor", this->channel_b_->power_factor);
LOG_SENSOR(" ", "Forward Active Energy", this->channel_b_->forward_active_energy);
LOG_SENSOR(" ", "Reverse Active Energy", this->channel_b_->reverse_active_energy);
ESP_LOGCONFIG(TAG, " Calibration:");
ESP_LOGCONFIG(TAG, " Current: %u", this->channel_b_->current_gain_calibration);
ESP_LOGCONFIG(TAG, " Voltage: %d", this->channel_b_->voltage_gain_calibration);
ESP_LOGCONFIG(TAG, " Power: %d", this->channel_b_->power_gain_calibration);
ESP_LOGCONFIG(TAG, " Phase Angle: %u", this->channel_b_->phase_angle_calibration);
}
if (this->channel_c_ != nullptr) {
ESP_LOGCONFIG(TAG, " Phase C:");
LOG_SENSOR(" ", "Current", this->channel_c_->current);
LOG_SENSOR(" ", "Voltage", this->channel_c_->voltage);
LOG_SENSOR(" ", "Active Power", this->channel_c_->active_power);
LOG_SENSOR(" ", "Apparent Power", this->channel_c_->apparent_power);
LOG_SENSOR(" ", "Power Factor", this->channel_c_->power_factor);
LOG_SENSOR(" ", "Forward Active Energy", this->channel_c_->forward_active_energy);
LOG_SENSOR(" ", "Reverse Active Energy", this->channel_c_->reverse_active_energy);
ESP_LOGCONFIG(TAG, " Calibration:");
ESP_LOGCONFIG(TAG, " Current: %u", this->channel_c_->current_gain_calibration);
ESP_LOGCONFIG(TAG, " Voltage: %d", this->channel_c_->voltage_gain_calibration);
ESP_LOGCONFIG(TAG, " Power: %d", this->channel_c_->power_gain_calibration);
ESP_LOGCONFIG(TAG, " Phase Angle: %u", this->channel_c_->phase_angle_calibration);
}
if (this->channel_n_ != nullptr) {
ESP_LOGCONFIG(TAG, " Neutral:");
LOG_SENSOR(" ", "Current", this->channel_n_->current);
ESP_LOGCONFIG(TAG, " Calibration:");
ESP_LOGCONFIG(TAG, " Current: %u", this->channel_n_->current_gain_calibration);
}
LOG_I2C_DEVICE(this);
LOG_UPDATE_INTERVAL(this);
}
void ADE7880::calibrate_s10zp_reading_(uint16_t a_register, int16_t calibration) {
if (calibration == 0) {
return;
}
this->write_s10zp_register16_(a_register, calibration);
}
void ADE7880::calibrate_s24zpse_reading_(uint16_t a_register, int32_t calibration) {
if (calibration == 0) {
return;
}
this->write_s24zpse_register16_(a_register, calibration);
}
void ADE7880::init_device_() {
this->write_u8_register16_(CONFIG2, CONFIG2_I2C_LOCK);
this->write_u16_register16_(GAIN, 0);
if (this->frequency_ > 55) {
this->write_u16_register16_(COMPMODE, COMPMODE_DEFAULT | COMPMODE_SELFREQ);
}
if (this->channel_n_ != nullptr) {
this->calibrate_s24zpse_reading_(NIGAIN, this->channel_n_->current_gain_calibration);
}
if (this->channel_a_ != nullptr) {
this->calibrate_s24zpse_reading_(AIGAIN, this->channel_a_->current_gain_calibration);
this->calibrate_s24zpse_reading_(AVGAIN, this->channel_a_->voltage_gain_calibration);
this->calibrate_s24zpse_reading_(APGAIN, this->channel_a_->power_gain_calibration);
this->calibrate_s10zp_reading_(APHCAL, this->channel_a_->phase_angle_calibration);
}
if (this->channel_b_ != nullptr) {
this->calibrate_s24zpse_reading_(BIGAIN, this->channel_b_->current_gain_calibration);
this->calibrate_s24zpse_reading_(BVGAIN, this->channel_b_->voltage_gain_calibration);
this->calibrate_s24zpse_reading_(BPGAIN, this->channel_b_->power_gain_calibration);
this->calibrate_s10zp_reading_(BPHCAL, this->channel_b_->phase_angle_calibration);
}
if (this->channel_c_ != nullptr) {
this->calibrate_s24zpse_reading_(CIGAIN, this->channel_c_->current_gain_calibration);
this->calibrate_s24zpse_reading_(CVGAIN, this->channel_c_->voltage_gain_calibration);
this->calibrate_s24zpse_reading_(CPGAIN, this->channel_c_->power_gain_calibration);
this->calibrate_s10zp_reading_(CPHCAL, this->channel_c_->phase_angle_calibration);
}
// write three default values to data memory RAM to flush the I2C write queue
this->write_s32_register16_(VLEVEL, 0);
this->write_s32_register16_(VLEVEL, 0);
this->write_s32_register16_(VLEVEL, 0);
this->write_u8_register16_(DSPWP_SEL, DSPWP_SEL_SET);
this->write_u8_register16_(DSPWP_SET, DSPWP_SET_RO);
this->write_u16_register16_(RUN, RUN_ENABLE);
}
void ADE7880::reset_device_() {
if (this->reset_pin_ != nullptr) {
ESP_LOGD(TAG, "Reset device using RESET pin");
this->reset_pin_->digital_write(false);
delay(1);
this->reset_pin_->digital_write(true);
} else {
ESP_LOGD(TAG, "Reset device using SWRST command");
this->write_u16_register16_(CONFIG, CONFIG_SWRST);
}
this->store_.reset_pending = true;
}
} // namespace ade7880
} // namespace esphome

View File

@@ -0,0 +1,131 @@
#pragma once
// This component was developed using knowledge gathered by a number
// of people who reverse-engineered the Shelly 3EM:
//
// @AndreKR on GitHub
// Axel (@Axel830 on GitHub)
// Marko (@goodkiller on GitHub)
// Michaël Piron (@michaelpiron on GitHub)
// Theo Arends (@arendst on GitHub)
#include "esphome/core/component.h"
#include "esphome/core/hal.h"
#include "esphome/components/i2c/i2c.h"
#include "esphome/components/sensor/sensor.h"
#include "ade7880_registers.h"
namespace esphome {
namespace ade7880 {
struct NeutralChannel {
void set_current(sensor::Sensor *sens) { this->current = sens; }
void set_current_gain_calibration(int32_t val) { this->current_gain_calibration = val; }
sensor::Sensor *current{nullptr};
int32_t current_gain_calibration{0};
};
struct PowerChannel {
void set_current(sensor::Sensor *sens) { this->current = sens; }
void set_voltage(sensor::Sensor *sens) { this->voltage = sens; }
void set_active_power(sensor::Sensor *sens) { this->active_power = sens; }
void set_apparent_power(sensor::Sensor *sens) { this->apparent_power = sens; }
void set_power_factor(sensor::Sensor *sens) { this->power_factor = sens; }
void set_forward_active_energy(sensor::Sensor *sens) { this->forward_active_energy = sens; }
void set_reverse_active_energy(sensor::Sensor *sens) { this->reverse_active_energy = sens; }
void set_current_gain_calibration(int32_t val) { this->current_gain_calibration = val; }
void set_voltage_gain_calibration(int32_t val) { this->voltage_gain_calibration = val; }
void set_power_gain_calibration(int32_t val) { this->power_gain_calibration = val; }
void set_phase_angle_calibration(int32_t val) { this->phase_angle_calibration = val; }
sensor::Sensor *current{nullptr};
sensor::Sensor *voltage{nullptr};
sensor::Sensor *active_power{nullptr};
sensor::Sensor *apparent_power{nullptr};
sensor::Sensor *power_factor{nullptr};
sensor::Sensor *forward_active_energy{nullptr};
sensor::Sensor *reverse_active_energy{nullptr};
int32_t current_gain_calibration{0};
int32_t voltage_gain_calibration{0};
int32_t power_gain_calibration{0};
uint16_t phase_angle_calibration{0};
float forward_active_energy_total{0};
float reverse_active_energy_total{0};
};
// Store data in a class that doesn't use multiple-inheritance (no vtables in flash!)
struct ADE7880Store {
volatile bool reset_done{false};
bool reset_pending{false};
ISRInternalGPIOPin irq1_pin;
static void gpio_intr(ADE7880Store *arg);
};
class ADE7880 : public i2c::I2CDevice, public PollingComponent {
public:
void set_irq0_pin(InternalGPIOPin *pin) { this->irq0_pin_ = pin; }
void set_irq1_pin(InternalGPIOPin *pin) { this->irq1_pin_ = pin; }
void set_reset_pin(InternalGPIOPin *pin) { this->reset_pin_ = pin; }
void set_frequency(float frequency) { this->frequency_ = frequency; }
void set_channel_n(NeutralChannel *channel) { this->channel_n_ = channel; }
void set_channel_a(PowerChannel *channel) { this->channel_a_ = channel; }
void set_channel_b(PowerChannel *channel) { this->channel_b_ = channel; }
void set_channel_c(PowerChannel *channel) { this->channel_c_ = channel; }
void setup() override;
void loop() override;
void update() override;
void dump_config() override;
float get_setup_priority() const override { return setup_priority::DATA; }
protected:
ADE7880Store store_{};
InternalGPIOPin *irq0_pin_{nullptr};
InternalGPIOPin *irq1_pin_{nullptr};
InternalGPIOPin *reset_pin_{nullptr};
float frequency_;
NeutralChannel *channel_n_{nullptr};
PowerChannel *channel_a_{nullptr};
PowerChannel *channel_b_{nullptr};
PowerChannel *channel_c_{nullptr};
void calibrate_s10zp_reading_(uint16_t a_register, int16_t calibration);
void calibrate_s24zpse_reading_(uint16_t a_register, int32_t calibration);
void init_device_();
// each of these functions allow the caller to pass in a lambda (or any other callable)
// which modifies the value read from the register before it is passed to the sensor
// the callable will be passed a 'float' value and is expected to return a 'float'
template<typename F> void update_sensor_from_s24zp_register16_(sensor::Sensor *sensor, uint16_t a_register, F &&f);
template<typename F> void update_sensor_from_s16_register16_(sensor::Sensor *sensor, uint16_t a_register, F &&f);
template<typename F> void update_sensor_from_s32_register16_(sensor::Sensor *sensor, uint16_t a_register, F &&f);
void reset_device_();
uint8_t read_u8_register16_(uint16_t a_register);
int16_t read_s16_register16_(uint16_t a_register);
uint16_t read_u16_register16_(uint16_t a_register);
int32_t read_s24zp_register16_(uint16_t a_register);
int32_t read_s32_register16_(uint16_t a_register);
uint32_t read_u32_register16_(uint16_t a_register);
void write_u8_register16_(uint16_t a_register, uint8_t value);
void write_s10zp_register16_(uint16_t a_register, int16_t value);
void write_u16_register16_(uint16_t a_register, uint16_t value);
void write_s24zpse_register16_(uint16_t a_register, int32_t value);
void write_s32_register16_(uint16_t a_register, int32_t value);
void write_u32_register16_(uint16_t a_register, uint32_t value);
};
} // namespace ade7880
} // namespace esphome

View File

@@ -0,0 +1,101 @@
// This component was developed using knowledge gathered by a number
// of people who reverse-engineered the Shelly 3EM:
//
// @AndreKR on GitHub
// Axel (@Axel830 on GitHub)
// Marko (@goodkiller on GitHub)
// Michaël Piron (@michaelpiron on GitHub)
// Theo Arends (@arendst on GitHub)
#include "ade7880.h"
namespace esphome {
namespace ade7880 {
// adapted from https://stackoverflow.com/a/55912127/1886371
template<size_t Bits, typename T> inline T sign_extend(const T &v) noexcept {
using S = struct { signed Val : Bits; };
return reinterpret_cast<const S *>(&v)->Val;
}
// Register types
// unsigned 8-bit (uint8_t)
// signed 10-bit - 16-bit ZP on wire (int16_t, needs sign extension)
// unsigned 16-bit (uint16_t)
// unsigned 20-bit - 32-bit ZP on wire (uint32_t)
// signed 24-bit - 32-bit ZPSE on wire (int32_t, needs sign extension)
// signed 24-bit - 32-bit ZP on wire (int32_t, needs sign extension)
// signed 24-bit - 32-bit SE on wire (int32_t)
// signed 28-bit - 32-bit ZP on wire (int32_t, needs sign extension)
// unsigned 32-bit (uint32_t)
// signed 32-bit (int32_t)
uint8_t ADE7880::read_u8_register16_(uint16_t a_register) {
uint8_t in;
this->read_register16(a_register, &in, sizeof(in));
return in;
}
int16_t ADE7880::read_s16_register16_(uint16_t a_register) {
int16_t in;
this->read_register16(a_register, reinterpret_cast<uint8_t *>(&in), sizeof(in));
return convert_big_endian(in);
}
uint16_t ADE7880::read_u16_register16_(uint16_t a_register) {
uint16_t in;
this->read_register16(a_register, reinterpret_cast<uint8_t *>(&in), sizeof(in));
return convert_big_endian(in);
}
int32_t ADE7880::read_s24zp_register16_(uint16_t a_register) {
// s24zp means 24 bit signed value in the lower 24 bits of a 32-bit register
int32_t in;
this->read_register16(a_register, reinterpret_cast<uint8_t *>(&in), sizeof(in));
return sign_extend<24>(convert_big_endian(in));
}
int32_t ADE7880::read_s32_register16_(uint16_t a_register) {
int32_t in;
this->read_register16(a_register, reinterpret_cast<uint8_t *>(&in), sizeof(in));
return convert_big_endian(in);
}
uint32_t ADE7880::read_u32_register16_(uint16_t a_register) {
uint32_t in;
this->read_register16(a_register, reinterpret_cast<uint8_t *>(&in), sizeof(in));
return convert_big_endian(in);
}
void ADE7880::write_u8_register16_(uint16_t a_register, uint8_t value) {
this->write_register16(a_register, &value, sizeof(value));
}
void ADE7880::write_s10zp_register16_(uint16_t a_register, int16_t value) {
int16_t out = convert_big_endian(value & 0x03FF);
this->write_register16(a_register, reinterpret_cast<uint8_t *>(&out), sizeof(out));
}
void ADE7880::write_u16_register16_(uint16_t a_register, uint16_t value) {
uint16_t out = convert_big_endian(value);
this->write_register16(a_register, reinterpret_cast<uint8_t *>(&out), sizeof(out));
}
void ADE7880::write_s24zpse_register16_(uint16_t a_register, int32_t value) {
// s24zpse means a 24-bit signed value, sign-extended to 28 bits, in the lower 28 bits of a 32-bit register
int32_t out = convert_big_endian(value & 0x0FFFFFFF);
this->write_register16(a_register, reinterpret_cast<uint8_t *>(&out), sizeof(out));
}
void ADE7880::write_s32_register16_(uint16_t a_register, int32_t value) {
int32_t out = convert_big_endian(value);
this->write_register16(a_register, reinterpret_cast<uint8_t *>(&out), sizeof(out));
}
void ADE7880::write_u32_register16_(uint16_t a_register, uint32_t value) {
uint32_t out = convert_big_endian(value);
this->write_register16(a_register, reinterpret_cast<uint8_t *>(&out), sizeof(out));
}
} // namespace ade7880
} // namespace esphome

View File

@@ -0,0 +1,243 @@
#pragma once
// This file is a modified version of the one created by Michaël Piron (@michaelpiron on GitHub)
// Source: https://www.analog.com/media/en/technical-documentation/application-notes/AN-1127.pdf
namespace esphome {
namespace ade7880 {
// DSP Data Memory RAM registers
constexpr uint16_t AIGAIN = 0x4380;
constexpr uint16_t AVGAIN = 0x4381;
constexpr uint16_t BIGAIN = 0x4382;
constexpr uint16_t BVGAIN = 0x4383;
constexpr uint16_t CIGAIN = 0x4384;
constexpr uint16_t CVGAIN = 0x4385;
constexpr uint16_t NIGAIN = 0x4386;
constexpr uint16_t DICOEFF = 0x4388;
constexpr uint16_t APGAIN = 0x4389;
constexpr uint16_t AWATTOS = 0x438A;
constexpr uint16_t BPGAIN = 0x438B;
constexpr uint16_t BWATTOS = 0x438C;
constexpr uint16_t CPGAIN = 0x438D;
constexpr uint16_t CWATTOS = 0x438E;
constexpr uint16_t AIRMSOS = 0x438F;
constexpr uint16_t AVRMSOS = 0x4390;
constexpr uint16_t BIRMSOS = 0x4391;
constexpr uint16_t BVRMSOS = 0x4392;
constexpr uint16_t CIRMSOS = 0x4393;
constexpr uint16_t CVRMSOS = 0x4394;
constexpr uint16_t NIRMSOS = 0x4395;
constexpr uint16_t HPGAIN = 0x4398;
constexpr uint16_t ISUMLVL = 0x4399;
constexpr uint16_t VLEVEL = 0x439F;
constexpr uint16_t AFWATTOS = 0x43A2;
constexpr uint16_t BFWATTOS = 0x43A3;
constexpr uint16_t CFWATTOS = 0x43A4;
constexpr uint16_t AFVAROS = 0x43A5;
constexpr uint16_t BFVAROS = 0x43A6;
constexpr uint16_t CFVAROS = 0x43A7;
constexpr uint16_t AFIRMSOS = 0x43A8;
constexpr uint16_t BFIRMSOS = 0x43A9;
constexpr uint16_t CFIRMSOS = 0x43AA;
constexpr uint16_t AFVRMSOS = 0x43AB;
constexpr uint16_t BFVRMSOS = 0x43AC;
constexpr uint16_t CFVRMSOS = 0x43AD;
constexpr uint16_t HXWATTOS = 0x43AE;
constexpr uint16_t HYWATTOS = 0x43AF;
constexpr uint16_t HZWATTOS = 0x43B0;
constexpr uint16_t HXVAROS = 0x43B1;
constexpr uint16_t HYVAROS = 0x43B2;
constexpr uint16_t HZVAROS = 0x43B3;
constexpr uint16_t HXIRMSOS = 0x43B4;
constexpr uint16_t HYIRMSOS = 0x43B5;
constexpr uint16_t HZIRMSOS = 0x43B6;
constexpr uint16_t HXVRMSOS = 0x43B7;
constexpr uint16_t HYVRMSOS = 0x43B8;
constexpr uint16_t HZVRMSOS = 0x43B9;
constexpr uint16_t AIRMS = 0x43C0;
constexpr uint16_t AVRMS = 0x43C1;
constexpr uint16_t BIRMS = 0x43C2;
constexpr uint16_t BVRMS = 0x43C3;
constexpr uint16_t CIRMS = 0x43C4;
constexpr uint16_t CVRMS = 0x43C5;
constexpr uint16_t NIRMS = 0x43C6;
constexpr uint16_t ISUM = 0x43C7;
// Internal DSP Memory RAM registers
constexpr uint16_t RUN = 0xE228;
constexpr uint16_t AWATTHR = 0xE400;
constexpr uint16_t BWATTHR = 0xE401;
constexpr uint16_t CWATTHR = 0xE402;
constexpr uint16_t AFWATTHR = 0xE403;
constexpr uint16_t BFWATTHR = 0xE404;
constexpr uint16_t CFWATTHR = 0xE405;
constexpr uint16_t AFVARHR = 0xE409;
constexpr uint16_t BFVARHR = 0xE40A;
constexpr uint16_t CFVARHR = 0xE40B;
constexpr uint16_t AVAHR = 0xE40C;
constexpr uint16_t BVAHR = 0xE40D;
constexpr uint16_t CVAHR = 0xE40E;
constexpr uint16_t IPEAK = 0xE500;
constexpr uint16_t VPEAK = 0xE501;
constexpr uint16_t STATUS0 = 0xE502;
constexpr uint16_t STATUS1 = 0xE503;
constexpr uint16_t AIMAV = 0xE504;
constexpr uint16_t BIMAV = 0xE505;
constexpr uint16_t CIMAV = 0xE506;
constexpr uint16_t OILVL = 0xE507;
constexpr uint16_t OVLVL = 0xE508;
constexpr uint16_t SAGLVL = 0xE509;
constexpr uint16_t MASK0 = 0xE50A;
constexpr uint16_t MASK1 = 0xE50B;
constexpr uint16_t IAWV = 0xE50C;
constexpr uint16_t IBWV = 0xE50D;
constexpr uint16_t ICWV = 0xE50E;
constexpr uint16_t INWV = 0xE50F;
constexpr uint16_t VAWV = 0xE510;
constexpr uint16_t VBWV = 0xE511;
constexpr uint16_t VCWV = 0xE512;
constexpr uint16_t AWATT = 0xE513;
constexpr uint16_t BWATT = 0xE514;
constexpr uint16_t CWATT = 0xE515;
constexpr uint16_t AFVAR = 0xE516;
constexpr uint16_t BFVAR = 0xE517;
constexpr uint16_t CFVAR = 0xE518;
constexpr uint16_t AVA = 0xE519;
constexpr uint16_t BVA = 0xE51A;
constexpr uint16_t CVA = 0xE51B;
constexpr uint16_t CHECKSUM = 0xE51F;
constexpr uint16_t VNOM = 0xE520;
constexpr uint16_t LAST_RWDATA_24BIT = 0xE5FF;
constexpr uint16_t PHSTATUS = 0xE600;
constexpr uint16_t ANGLE0 = 0xE601;
constexpr uint16_t ANGLE1 = 0xE602;
constexpr uint16_t ANGLE2 = 0xE603;
constexpr uint16_t PHNOLOAD = 0xE608;
constexpr uint16_t LINECYC = 0xE60C;
constexpr uint16_t ZXTOUT = 0xE60D;
constexpr uint16_t COMPMODE = 0xE60E;
constexpr uint16_t GAIN = 0xE60F;
constexpr uint16_t CFMODE = 0xE610;
constexpr uint16_t CF1DEN = 0xE611;
constexpr uint16_t CF2DEN = 0xE612;
constexpr uint16_t CF3DEN = 0xE613;
constexpr uint16_t APHCAL = 0xE614;
constexpr uint16_t BPHCAL = 0xE615;
constexpr uint16_t CPHCAL = 0xE616;
constexpr uint16_t PHSIGN = 0xE617;
constexpr uint16_t CONFIG = 0xE618;
constexpr uint16_t MMODE = 0xE700;
constexpr uint16_t ACCMODE = 0xE701;
constexpr uint16_t LCYCMODE = 0xE702;
constexpr uint16_t PEAKCYC = 0xE703;
constexpr uint16_t SAGCYC = 0xE704;
constexpr uint16_t CFCYC = 0xE705;
constexpr uint16_t HSDC_CFG = 0xE706;
constexpr uint16_t VERSION = 0xE707;
constexpr uint16_t DSPWP_SET = 0xE7E3;
constexpr uint16_t LAST_RWDATA_8BIT = 0xE7FD;
constexpr uint16_t DSPWP_SEL = 0xE7FE;
constexpr uint16_t FVRMS = 0xE880;
constexpr uint16_t FIRMS = 0xE881;
constexpr uint16_t FWATT = 0xE882;
constexpr uint16_t FVAR = 0xE883;
constexpr uint16_t FVA = 0xE884;
constexpr uint16_t FPF = 0xE885;
constexpr uint16_t VTHDN = 0xE886;
constexpr uint16_t ITHDN = 0xE887;
constexpr uint16_t HXVRMS = 0xE888;
constexpr uint16_t HXIRMS = 0xE889;
constexpr uint16_t HXWATT = 0xE88A;
constexpr uint16_t HXVAR = 0xE88B;
constexpr uint16_t HXVA = 0xE88C;
constexpr uint16_t HXPF = 0xE88D;
constexpr uint16_t HXVHD = 0xE88E;
constexpr uint16_t HXIHD = 0xE88F;
constexpr uint16_t HYVRMS = 0xE890;
constexpr uint16_t HYIRMS = 0xE891;
constexpr uint16_t HYWATT = 0xE892;
constexpr uint16_t HYVAR = 0xE893;
constexpr uint16_t HYVA = 0xE894;
constexpr uint16_t HYPF = 0xE895;
constexpr uint16_t HYVHD = 0xE896;
constexpr uint16_t HYIHD = 0xE897;
constexpr uint16_t HZVRMS = 0xE898;
constexpr uint16_t HZIRMS = 0xE899;
constexpr uint16_t HZWATT = 0xE89A;
constexpr uint16_t HZVAR = 0xE89B;
constexpr uint16_t HZVA = 0xE89C;
constexpr uint16_t HZPF = 0xE89D;
constexpr uint16_t HZVHD = 0xE89E;
constexpr uint16_t HZIHD = 0xE89F;
constexpr uint16_t HCONFIG = 0xE900;
constexpr uint16_t APF = 0xE902;
constexpr uint16_t BPF = 0xE903;
constexpr uint16_t CPF = 0xE904;
constexpr uint16_t APERIOD = 0xE905;
constexpr uint16_t BPERIOD = 0xE906;
constexpr uint16_t CPERIOD = 0xE907;
constexpr uint16_t APNOLOAD = 0xE908;
constexpr uint16_t VARNOLOAD = 0xE909;
constexpr uint16_t VANOLOAD = 0xE90A;
constexpr uint16_t LAST_ADD = 0xE9FE;
constexpr uint16_t LAST_RWDATA_16BIT = 0xE9FF;
constexpr uint16_t CONFIG3 = 0xEA00;
constexpr uint16_t LAST_OP = 0xEA01;
constexpr uint16_t WTHR = 0xEA02;
constexpr uint16_t VARTHR = 0xEA03;
constexpr uint16_t VATHR = 0xEA04;
constexpr uint16_t HX_REG = 0xEA08;
constexpr uint16_t HY_REG = 0xEA09;
constexpr uint16_t HZ_REG = 0xEA0A;
constexpr uint16_t LPOILVL = 0xEC00;
constexpr uint16_t CONFIG2 = 0xEC01;
// STATUS1 Register Bits
constexpr uint32_t STATUS1_RSTDONE = (1 << 15);
// CONFIG Register Bits
constexpr uint16_t CONFIG_SWRST = (1 << 7);
// CONFIG2 Register Bits
constexpr uint8_t CONFIG2_I2C_LOCK = (1 << 1);
// COMPMODE Register Bits
constexpr uint16_t COMPMODE_DEFAULT = 0x01FF;
constexpr uint16_t COMPMODE_SELFREQ = (1 << 14);
// RUN Register Bits
constexpr uint16_t RUN_ENABLE = (1 << 0);
// DSPWP_SET Register Bits
constexpr uint8_t DSPWP_SET_RO = (1 << 7);
// DSPWP_SEL Register Bits
constexpr uint8_t DSPWP_SEL_SET = 0xAD;
} // namespace ade7880
} // namespace esphome

View File

@@ -0,0 +1,290 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import sensor, i2c
from esphome import pins
from esphome.const import (
CONF_ACTIVE_POWER,
CONF_APPARENT_POWER,
CONF_CALIBRATION,
CONF_CURRENT,
CONF_FORWARD_ACTIVE_ENERGY,
CONF_FREQUENCY,
CONF_ID,
CONF_NAME,
CONF_PHASE_A,
CONF_PHASE_ANGLE,
CONF_PHASE_B,
CONF_PHASE_C,
CONF_POWER_FACTOR,
CONF_RESET_PIN,
CONF_REVERSE_ACTIVE_ENERGY,
CONF_VOLTAGE,
DEVICE_CLASS_APPARENT_POWER,
DEVICE_CLASS_CURRENT,
DEVICE_CLASS_ENERGY,
DEVICE_CLASS_POWER,
DEVICE_CLASS_POWER_FACTOR,
DEVICE_CLASS_VOLTAGE,
STATE_CLASS_MEASUREMENT,
STATE_CLASS_TOTAL_INCREASING,
UNIT_AMPERE,
UNIT_PERCENT,
UNIT_VOLT,
UNIT_VOLT_AMPS,
UNIT_VOLT_AMPS_REACTIVE_HOURS,
UNIT_WATT,
UNIT_WATT_HOURS,
)
DEPENDENCIES = ["i2c"]
ade7880_ns = cg.esphome_ns.namespace("ade7880")
ADE7880 = ade7880_ns.class_("ADE7880", cg.PollingComponent, i2c.I2CDevice)
NeutralChannel = ade7880_ns.struct("NeutralChannel")
PowerChannel = ade7880_ns.struct("PowerChannel")
CONF_CURRENT_GAIN = "current_gain"
CONF_IRQ0_PIN = "irq0_pin"
CONF_IRQ1_PIN = "irq1_pin"
CONF_POWER_GAIN = "power_gain"
CONF_VOLTAGE_GAIN = "voltage_gain"
CONF_NEUTRAL = "neutral"
NEUTRAL_CHANNEL_SCHEMA = cv.Schema(
{
cv.GenerateID(): cv.declare_id(NeutralChannel),
cv.Optional(CONF_NAME): cv.string_strict,
cv.Required(CONF_CURRENT): cv.maybe_simple_value(
sensor.sensor_schema(
unit_of_measurement=UNIT_AMPERE,
accuracy_decimals=2,
device_class=DEVICE_CLASS_CURRENT,
state_class=STATE_CLASS_MEASUREMENT,
),
key=CONF_NAME,
),
cv.Required(CONF_CALIBRATION): cv.Schema(
{
cv.Required(CONF_CURRENT_GAIN): cv.int_,
},
),
}
)
POWER_CHANNEL_SCHEMA = cv.Schema(
{
cv.GenerateID(): cv.declare_id(PowerChannel),
cv.Optional(CONF_NAME): cv.string_strict,
cv.Optional(CONF_VOLTAGE): cv.maybe_simple_value(
sensor.sensor_schema(
unit_of_measurement=UNIT_VOLT,
accuracy_decimals=1,
device_class=DEVICE_CLASS_VOLTAGE,
state_class=STATE_CLASS_MEASUREMENT,
),
key=CONF_NAME,
),
cv.Optional(CONF_CURRENT): cv.maybe_simple_value(
sensor.sensor_schema(
unit_of_measurement=UNIT_AMPERE,
accuracy_decimals=2,
device_class=DEVICE_CLASS_CURRENT,
state_class=STATE_CLASS_MEASUREMENT,
),
key=CONF_NAME,
),
cv.Optional(CONF_ACTIVE_POWER): cv.maybe_simple_value(
sensor.sensor_schema(
unit_of_measurement=UNIT_WATT,
accuracy_decimals=1,
device_class=DEVICE_CLASS_POWER,
state_class=STATE_CLASS_MEASUREMENT,
),
key=CONF_NAME,
),
cv.Optional(CONF_APPARENT_POWER): cv.maybe_simple_value(
sensor.sensor_schema(
unit_of_measurement=UNIT_VOLT_AMPS,
accuracy_decimals=1,
device_class=DEVICE_CLASS_APPARENT_POWER,
state_class=STATE_CLASS_MEASUREMENT,
),
key=CONF_NAME,
),
cv.Optional(CONF_POWER_FACTOR): cv.maybe_simple_value(
sensor.sensor_schema(
unit_of_measurement=UNIT_PERCENT,
accuracy_decimals=0,
device_class=DEVICE_CLASS_POWER_FACTOR,
state_class=STATE_CLASS_MEASUREMENT,
),
key=CONF_NAME,
),
cv.Optional(CONF_FORWARD_ACTIVE_ENERGY): cv.maybe_simple_value(
sensor.sensor_schema(
unit_of_measurement=UNIT_WATT_HOURS,
accuracy_decimals=2,
device_class=DEVICE_CLASS_ENERGY,
state_class=STATE_CLASS_TOTAL_INCREASING,
),
key=CONF_NAME,
),
cv.Optional(CONF_REVERSE_ACTIVE_ENERGY): cv.maybe_simple_value(
sensor.sensor_schema(
unit_of_measurement=UNIT_VOLT_AMPS_REACTIVE_HOURS,
accuracy_decimals=2,
device_class=DEVICE_CLASS_ENERGY,
state_class=STATE_CLASS_TOTAL_INCREASING,
),
key=CONF_NAME,
),
cv.Required(CONF_CALIBRATION): cv.Schema(
{
cv.Required(CONF_CURRENT_GAIN): cv.int_,
cv.Required(CONF_VOLTAGE_GAIN): cv.int_,
cv.Required(CONF_POWER_GAIN): cv.int_,
cv.Required(CONF_PHASE_ANGLE): cv.int_,
},
),
}
)
CONFIG_SCHEMA = (
cv.Schema(
{
cv.GenerateID(): cv.declare_id(ADE7880),
cv.Optional(CONF_FREQUENCY, default="50Hz"): cv.All(
cv.frequency, cv.Range(min=45.0, max=66.0)
),
cv.Optional(CONF_IRQ0_PIN): pins.internal_gpio_input_pin_schema,
cv.Required(CONF_IRQ1_PIN): pins.internal_gpio_input_pin_schema,
cv.Optional(CONF_RESET_PIN): pins.internal_gpio_output_pin_schema,
cv.Optional(CONF_PHASE_A): POWER_CHANNEL_SCHEMA,
cv.Optional(CONF_PHASE_B): POWER_CHANNEL_SCHEMA,
cv.Optional(CONF_PHASE_C): POWER_CHANNEL_SCHEMA,
cv.Optional(CONF_NEUTRAL): NEUTRAL_CHANNEL_SCHEMA,
}
)
.extend(cv.polling_component_schema("60s"))
.extend(i2c.i2c_device_schema(0x38))
)
async def neutral_channel(config):
var = cg.new_Pvariable(config[CONF_ID])
current = config[CONF_CURRENT]
sens = await sensor.new_sensor(current)
cg.add(var.set_current(sens))
cg.add(
var.set_current_gain_calibration(config[CONF_CALIBRATION][CONF_CURRENT_GAIN])
)
return var
async def power_channel(config):
var = cg.new_Pvariable(config[CONF_ID])
for sensor_type in [
CONF_CURRENT,
CONF_VOLTAGE,
CONF_ACTIVE_POWER,
CONF_APPARENT_POWER,
CONF_POWER_FACTOR,
CONF_FORWARD_ACTIVE_ENERGY,
CONF_REVERSE_ACTIVE_ENERGY,
]:
if conf := config.get(sensor_type):
sens = await sensor.new_sensor(conf)
cg.add(getattr(var, f"set_{sensor_type}")(sens))
for calib_type in [
CONF_CURRENT_GAIN,
CONF_VOLTAGE_GAIN,
CONF_POWER_GAIN,
CONF_PHASE_ANGLE,
]:
cg.add(
getattr(var, f"set_{calib_type}_calibration")(
config[CONF_CALIBRATION][calib_type]
)
)
return var
def final_validate(config):
for channel in [CONF_PHASE_A, CONF_PHASE_B, CONF_PHASE_C]:
if channel := config.get(channel):
channel_name = channel.get(CONF_NAME)
for sensor_type in [
CONF_CURRENT,
CONF_VOLTAGE,
CONF_ACTIVE_POWER,
CONF_APPARENT_POWER,
CONF_POWER_FACTOR,
CONF_FORWARD_ACTIVE_ENERGY,
CONF_REVERSE_ACTIVE_ENERGY,
]:
if conf := channel.get(sensor_type):
sensor_name = conf.get(CONF_NAME)
if (
sensor_name
and channel_name
and not sensor_name.startswith(channel_name)
):
conf[CONF_NAME] = f"{channel_name} {sensor_name}"
if channel := config.get(CONF_NEUTRAL):
channel_name = channel.get(CONF_NAME)
if conf := channel.get(CONF_CURRENT):
sensor_name = conf.get(CONF_NAME)
if (
sensor_name
and channel_name
and not sensor_name.startswith(channel_name)
):
conf[CONF_NAME] = f"{channel_name} {sensor_name}"
FINAL_VALIDATE_SCHEMA = final_validate
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
await cg.register_component(var, config)
await i2c.register_i2c_device(var, config)
if irq0_pin := config.get(CONF_IRQ0_PIN):
pin = await cg.gpio_pin_expression(irq0_pin)
cg.add(var.set_irq0_pin(pin))
pin = await cg.gpio_pin_expression(config[CONF_IRQ1_PIN])
cg.add(var.set_irq1_pin(pin))
if reset_pin := config.get(CONF_RESET_PIN):
pin = await cg.gpio_pin_expression(reset_pin)
cg.add(var.set_reset_pin(pin))
if frequency := config.get(CONF_FREQUENCY):
cg.add(var.set_frequency(frequency))
if channel := config.get(CONF_PHASE_A):
chan = await power_channel(channel)
cg.add(var.set_channel_a(chan))
if channel := config.get(CONF_PHASE_B):
chan = await power_channel(channel)
cg.add(var.set_channel_b(chan))
if channel := config.get(CONF_PHASE_C):
chan = await power_channel(channel)
cg.add(var.set_channel_c(chan))
if channel := config.get(CONF_NEUTRAL):
chan = await neutral_channel(channel)
cg.add(var.set_channel_n(chan))

View File

@@ -0,0 +1 @@
CODEOWNERS = ["@angelnu"]

View File

@@ -1,53 +0,0 @@
#include "ade7953.h"
#include "esphome/core/log.h"
namespace esphome {
namespace ade7953 {
static const char *const TAG = "ade7953";
void ADE7953::dump_config() {
ESP_LOGCONFIG(TAG, "ADE7953:");
LOG_PIN(" IRQ Pin: ", irq_pin_);
LOG_I2C_DEVICE(this);
LOG_UPDATE_INTERVAL(this);
LOG_SENSOR(" ", "Voltage Sensor", this->voltage_sensor_);
LOG_SENSOR(" ", "Current A Sensor", this->current_a_sensor_);
LOG_SENSOR(" ", "Current B Sensor", this->current_b_sensor_);
LOG_SENSOR(" ", "Active Power A Sensor", this->active_power_a_sensor_);
LOG_SENSOR(" ", "Active Power B Sensor", this->active_power_b_sensor_);
}
#define ADE_PUBLISH_(name, val, factor) \
if (err == i2c::ERROR_OK && this->name##_sensor_) { \
float value = (val) / (factor); \
this->name##_sensor_->publish_state(value); \
}
#define ADE_PUBLISH(name, val, factor) ADE_PUBLISH_(name, val, factor)
void ADE7953::update() {
if (!this->is_setup_)
return;
uint32_t val;
i2c::ErrorCode err = ade_read_32_(0x0312, &val);
ADE_PUBLISH(active_power_a, (int32_t) val, 154.0f);
err = ade_read_32_(0x0313, &val);
ADE_PUBLISH(active_power_b, (int32_t) val, 154.0f);
err = ade_read_32_(0x031A, &val);
ADE_PUBLISH(current_a, (uint32_t) val, 100000.0f);
err = ade_read_32_(0x031B, &val);
ADE_PUBLISH(current_b, (uint32_t) val, 100000.0f);
err = ade_read_32_(0x031C, &val);
ADE_PUBLISH(voltage, (uint32_t) val, 26000.0f);
// auto apparent_power_a = this->ade_read_<int32_t>(0x0310);
// auto apparent_power_b = this->ade_read_<int32_t>(0x0311);
// auto reactive_power_a = this->ade_read_<int32_t>(0x0314);
// auto reactive_power_b = this->ade_read_<int32_t>(0x0315);
// auto power_factor_a = this->ade_read_<int16_t>(0x010A);
// auto power_factor_b = this->ade_read_<int16_t>(0x010B);
}
} // namespace ade7953
} // namespace esphome

View File

@@ -1,95 +0,0 @@
#pragma once
#include "esphome/core/component.h"
#include "esphome/core/hal.h"
#include "esphome/components/i2c/i2c.h"
#include "esphome/components/sensor/sensor.h"
namespace esphome {
namespace ade7953 {
class ADE7953 : public i2c::I2CDevice, public PollingComponent {
public:
void set_irq_pin(InternalGPIOPin *irq_pin) { irq_pin_ = irq_pin; }
void set_voltage_sensor(sensor::Sensor *voltage_sensor) { voltage_sensor_ = voltage_sensor; }
void set_current_a_sensor(sensor::Sensor *current_a_sensor) { current_a_sensor_ = current_a_sensor; }
void set_current_b_sensor(sensor::Sensor *current_b_sensor) { current_b_sensor_ = current_b_sensor; }
void set_active_power_a_sensor(sensor::Sensor *active_power_a_sensor) {
active_power_a_sensor_ = active_power_a_sensor;
}
void set_active_power_b_sensor(sensor::Sensor *active_power_b_sensor) {
active_power_b_sensor_ = active_power_b_sensor;
}
void setup() override {
if (this->irq_pin_ != nullptr) {
this->irq_pin_->setup();
}
this->set_timeout(100, [this]() {
this->ade_write_8_(0x0010, 0x04);
this->ade_write_8_(0x00FE, 0xAD);
this->ade_write_16_(0x0120, 0x0030);
this->is_setup_ = true;
});
}
void dump_config() override;
void update() override;
protected:
i2c::ErrorCode ade_write_8_(uint16_t reg, uint8_t value) {
std::vector<uint8_t> data;
data.push_back(reg >> 8);
data.push_back(reg >> 0);
data.push_back(value);
return write(data.data(), data.size());
}
i2c::ErrorCode ade_write_16_(uint16_t reg, uint16_t value) {
std::vector<uint8_t> data;
data.push_back(reg >> 8);
data.push_back(reg >> 0);
data.push_back(value >> 8);
data.push_back(value >> 0);
return write(data.data(), data.size());
}
i2c::ErrorCode ade_write_32_(uint16_t reg, uint32_t value) {
std::vector<uint8_t> data;
data.push_back(reg >> 8);
data.push_back(reg >> 0);
data.push_back(value >> 24);
data.push_back(value >> 16);
data.push_back(value >> 8);
data.push_back(value >> 0);
return write(data.data(), data.size());
}
i2c::ErrorCode ade_read_32_(uint16_t reg, uint32_t *value) {
uint8_t reg_data[2];
reg_data[0] = reg >> 8;
reg_data[1] = reg >> 0;
i2c::ErrorCode err = write(reg_data, 2);
if (err != i2c::ERROR_OK)
return err;
uint8_t recv[4];
err = read(recv, 4);
if (err != i2c::ERROR_OK)
return err;
*value = 0;
*value |= ((uint32_t) recv[0]) << 24;
*value |= ((uint32_t) recv[1]) << 16;
*value |= ((uint32_t) recv[2]) << 8;
*value |= ((uint32_t) recv[3]);
return i2c::ERROR_OK;
}
InternalGPIOPin *irq_pin_{nullptr};
bool is_setup_{false};
sensor::Sensor *voltage_sensor_{nullptr};
sensor::Sensor *current_a_sensor_{nullptr};
sensor::Sensor *current_b_sensor_{nullptr};
sensor::Sensor *active_power_a_sensor_{nullptr};
sensor::Sensor *active_power_b_sensor_{nullptr};
};
} // namespace ade7953
} // namespace esphome

View File

@@ -1,90 +1,5 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import sensor, i2c
from esphome import pins
from esphome.const import (
CONF_ID,
CONF_VOLTAGE,
DEVICE_CLASS_CURRENT,
DEVICE_CLASS_POWER,
DEVICE_CLASS_VOLTAGE,
STATE_CLASS_MEASUREMENT,
UNIT_VOLT,
UNIT_AMPERE,
UNIT_WATT,
CONFIG_SCHEMA = CONFIG_SCHEMA = cv.invalid(
"The ade7953 sensor component has been renamed to ade7953_i2c."
)
DEPENDENCIES = ["i2c"]
ade7953_ns = cg.esphome_ns.namespace("ade7953")
ADE7953 = ade7953_ns.class_("ADE7953", cg.PollingComponent, i2c.I2CDevice)
CONF_IRQ_PIN = "irq_pin"
CONF_CURRENT_A = "current_a"
CONF_CURRENT_B = "current_b"
CONF_ACTIVE_POWER_A = "active_power_a"
CONF_ACTIVE_POWER_B = "active_power_b"
CONFIG_SCHEMA = (
cv.Schema(
{
cv.GenerateID(): cv.declare_id(ADE7953),
cv.Optional(CONF_IRQ_PIN): pins.internal_gpio_input_pin_schema,
cv.Optional(CONF_VOLTAGE): sensor.sensor_schema(
unit_of_measurement=UNIT_VOLT,
accuracy_decimals=1,
device_class=DEVICE_CLASS_VOLTAGE,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_CURRENT_A): sensor.sensor_schema(
unit_of_measurement=UNIT_AMPERE,
accuracy_decimals=2,
device_class=DEVICE_CLASS_CURRENT,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_CURRENT_B): sensor.sensor_schema(
unit_of_measurement=UNIT_AMPERE,
accuracy_decimals=2,
device_class=DEVICE_CLASS_CURRENT,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_ACTIVE_POWER_A): sensor.sensor_schema(
unit_of_measurement=UNIT_WATT,
accuracy_decimals=1,
device_class=DEVICE_CLASS_POWER,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_ACTIVE_POWER_B): sensor.sensor_schema(
unit_of_measurement=UNIT_WATT,
accuracy_decimals=1,
device_class=DEVICE_CLASS_POWER,
state_class=STATE_CLASS_MEASUREMENT,
),
}
)
.extend(cv.polling_component_schema("60s"))
.extend(i2c.i2c_device_schema(0x38))
)
async def to_code(config):
var = cg.new_Pvariable(config[CONF_ID])
await cg.register_component(var, config)
await i2c.register_i2c_device(var, config)
if CONF_IRQ_PIN in config:
irq_pin = await cg.gpio_pin_expression(config[CONF_IRQ_PIN])
cg.add(var.set_irq_pin(irq_pin))
for key in [
CONF_VOLTAGE,
CONF_CURRENT_A,
CONF_CURRENT_B,
CONF_ACTIVE_POWER_A,
CONF_ACTIVE_POWER_B,
]:
if key not in config:
continue
conf = config[key]
sens = await sensor.new_sensor(conf)
cg.add(getattr(var, f"set_{key}_sensor")(sens))

View File

@@ -0,0 +1,201 @@
import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.components import sensor
from esphome import pins
from esphome.const import (
CONF_IRQ_PIN,
CONF_VOLTAGE,
CONF_FREQUENCY,
DEVICE_CLASS_CURRENT,
DEVICE_CLASS_APPARENT_POWER,
DEVICE_CLASS_POWER,
DEVICE_CLASS_REACTIVE_POWER,
DEVICE_CLASS_POWER_FACTOR,
DEVICE_CLASS_VOLTAGE,
DEVICE_CLASS_FREQUENCY,
STATE_CLASS_MEASUREMENT,
UNIT_VOLT,
UNIT_HERTZ,
UNIT_AMPERE,
UNIT_VOLT_AMPS,
UNIT_WATT,
UNIT_VOLT_AMPS_REACTIVE,
UNIT_PERCENT,
)
CONF_CURRENT_A = "current_a"
CONF_CURRENT_B = "current_b"
CONF_ACTIVE_POWER_A = "active_power_a"
CONF_ACTIVE_POWER_B = "active_power_b"
CONF_APPARENT_POWER_A = "apparent_power_a"
CONF_APPARENT_POWER_B = "apparent_power_b"
CONF_REACTIVE_POWER_A = "reactive_power_a"
CONF_REACTIVE_POWER_B = "reactive_power_b"
CONF_POWER_FACTOR_A = "power_factor_a"
CONF_POWER_FACTOR_B = "power_factor_b"
CONF_VOLTAGE_PGA_GAIN = "voltage_pga_gain"
CONF_CURRENT_PGA_GAIN_A = "current_pga_gain_a"
CONF_CURRENT_PGA_GAIN_B = "current_pga_gain_b"
CONF_VOLTAGE_GAIN = "voltage_gain"
CONF_CURRENT_GAIN_A = "current_gain_a"
CONF_CURRENT_GAIN_B = "current_gain_b"
CONF_ACTIVE_POWER_GAIN_A = "active_power_gain_a"
CONF_ACTIVE_POWER_GAIN_B = "active_power_gain_b"
CONF_USE_ACCUMULATED_ENERGY_REGISTERS = "use_accumulated_energy_registers"
PGA_GAINS = {
"1x": 0b000,
"2x": 0b001,
"4x": 0b010,
"8x": 0b011,
"16x": 0b100,
"22x": 0b101,
}
ade7953_base_ns = cg.esphome_ns.namespace("ade7953_base")
ADE7953 = ade7953_base_ns.class_("ADE7953", cg.PollingComponent)
ADE7953_CONFIG_SCHEMA = cv.Schema(
{
cv.Optional(CONF_IRQ_PIN): pins.internal_gpio_input_pin_schema,
cv.Optional(CONF_VOLTAGE): sensor.sensor_schema(
unit_of_measurement=UNIT_VOLT,
accuracy_decimals=1,
device_class=DEVICE_CLASS_VOLTAGE,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_FREQUENCY): sensor.sensor_schema(
unit_of_measurement=UNIT_HERTZ,
accuracy_decimals=2,
device_class=DEVICE_CLASS_FREQUENCY,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_CURRENT_A): sensor.sensor_schema(
unit_of_measurement=UNIT_AMPERE,
accuracy_decimals=2,
device_class=DEVICE_CLASS_CURRENT,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_CURRENT_B): sensor.sensor_schema(
unit_of_measurement=UNIT_AMPERE,
accuracy_decimals=2,
device_class=DEVICE_CLASS_CURRENT,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_ACTIVE_POWER_A): sensor.sensor_schema(
unit_of_measurement=UNIT_WATT,
accuracy_decimals=1,
device_class=DEVICE_CLASS_POWER,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_ACTIVE_POWER_B): sensor.sensor_schema(
unit_of_measurement=UNIT_WATT,
accuracy_decimals=1,
device_class=DEVICE_CLASS_POWER,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_APPARENT_POWER_A): sensor.sensor_schema(
unit_of_measurement=UNIT_VOLT_AMPS,
accuracy_decimals=1,
device_class=DEVICE_CLASS_APPARENT_POWER,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_APPARENT_POWER_B): sensor.sensor_schema(
unit_of_measurement=UNIT_VOLT_AMPS,
accuracy_decimals=1,
device_class=DEVICE_CLASS_APPARENT_POWER,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_REACTIVE_POWER_A): sensor.sensor_schema(
unit_of_measurement=UNIT_VOLT_AMPS_REACTIVE,
accuracy_decimals=1,
device_class=DEVICE_CLASS_REACTIVE_POWER,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_REACTIVE_POWER_B): sensor.sensor_schema(
unit_of_measurement=UNIT_VOLT_AMPS_REACTIVE,
accuracy_decimals=1,
device_class=DEVICE_CLASS_REACTIVE_POWER,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_POWER_FACTOR_A): sensor.sensor_schema(
unit_of_measurement=UNIT_PERCENT,
accuracy_decimals=2,
device_class=DEVICE_CLASS_POWER_FACTOR,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(CONF_POWER_FACTOR_B): sensor.sensor_schema(
unit_of_measurement=UNIT_PERCENT,
accuracy_decimals=2,
device_class=DEVICE_CLASS_POWER_FACTOR,
state_class=STATE_CLASS_MEASUREMENT,
),
cv.Optional(
CONF_VOLTAGE_PGA_GAIN,
default="1x",
): cv.one_of(*PGA_GAINS, lower=True),
cv.Optional(
CONF_CURRENT_PGA_GAIN_A,
default="1x",
): cv.one_of(*PGA_GAINS, lower=True),
cv.Optional(
CONF_CURRENT_PGA_GAIN_B,
default="1x",
): cv.one_of(*PGA_GAINS, lower=True),
cv.Optional(CONF_VOLTAGE_GAIN, default=0x400000): cv.hex_int_range(
min=0x100000, max=0x800000
),
cv.Optional(CONF_CURRENT_GAIN_A, default=0x400000): cv.hex_int_range(
min=0x100000, max=0x800000
),
cv.Optional(CONF_CURRENT_GAIN_B, default=0x400000): cv.hex_int_range(
min=0x100000, max=0x800000
),
cv.Optional(CONF_ACTIVE_POWER_GAIN_A, default=0x400000): cv.hex_int_range(
min=0x100000, max=0x800000
),
cv.Optional(CONF_ACTIVE_POWER_GAIN_B, default=0x400000): cv.hex_int_range(
min=0x100000, max=0x800000
),
cv.Optional(CONF_USE_ACCUMULATED_ENERGY_REGISTERS, default=False): cv.boolean,
}
).extend(cv.polling_component_schema("60s"))
async def register_ade7953(var, config):
await cg.register_component(var, config)
if irq_pin_config := config.get(CONF_IRQ_PIN):
irq_pin = await cg.gpio_pin_expression(irq_pin_config)
cg.add(var.set_irq_pin(irq_pin))
cg.add(var.set_pga_v(PGA_GAINS[config.get(CONF_VOLTAGE_PGA_GAIN)]))
cg.add(var.set_pga_ia(PGA_GAINS[config.get(CONF_CURRENT_PGA_GAIN_A)]))
cg.add(var.set_pga_ib(PGA_GAINS[config.get(CONF_CURRENT_PGA_GAIN_B)]))
cg.add(var.set_vgain(config.get(CONF_VOLTAGE_GAIN)))
cg.add(var.set_aigain(config.get(CONF_CURRENT_GAIN_A)))
cg.add(var.set_bigain(config.get(CONF_CURRENT_GAIN_B)))
cg.add(var.set_awgain(config.get(CONF_ACTIVE_POWER_GAIN_A)))
cg.add(var.set_bwgain(config.get(CONF_ACTIVE_POWER_GAIN_B)))
cg.add(
var.set_use_acc_energy_regs(config.get(CONF_USE_ACCUMULATED_ENERGY_REGISTERS))
)
for key in [
CONF_VOLTAGE,
CONF_FREQUENCY,
CONF_CURRENT_A,
CONF_CURRENT_B,
CONF_POWER_FACTOR_A,
CONF_POWER_FACTOR_B,
CONF_APPARENT_POWER_A,
CONF_APPARENT_POWER_B,
CONF_ACTIVE_POWER_A,
CONF_ACTIVE_POWER_B,
CONF_REACTIVE_POWER_A,
CONF_REACTIVE_POWER_B,
]:
if key not in config:
continue
conf = config[key]
sens = await sensor.new_sensor(conf)
cg.add(getattr(var, f"set_{key}_sensor")(sens))

View File

@@ -0,0 +1,148 @@
#include "ade7953_base.h"
#include "esphome/core/log.h"
namespace esphome {
namespace ade7953_base {
static const char *const TAG = "ade7953";
static const float ADE_POWER_FACTOR = 154.0f;
static const float ADE_WATTSEC_POWER_FACTOR = ADE_POWER_FACTOR * ADE_POWER_FACTOR / 3600;
void ADE7953::setup() {
if (this->irq_pin_ != nullptr) {
this->irq_pin_->setup();
}
// The chip might take up to 100ms to initialise
this->set_timeout(100, [this]() {
// this->ade_write_8(0x0010, 0x04);
this->ade_write_8(0x00FE, 0xAD);
this->ade_write_16(0x0120, 0x0030);
// Set gains
this->ade_write_8(PGA_V_8, pga_v_);
this->ade_write_8(PGA_IA_8, pga_ia_);
this->ade_write_8(PGA_IB_8, pga_ib_);
this->ade_write_32(AVGAIN_32, vgain_);
this->ade_write_32(AIGAIN_32, aigain_);
this->ade_write_32(BIGAIN_32, bigain_);
this->ade_write_32(AWGAIN_32, awgain_);
this->ade_write_32(BWGAIN_32, bwgain_);
// Read back gains for debugging
this->ade_read_8(PGA_V_8, &pga_v_);
this->ade_read_8(PGA_IA_8, &pga_ia_);
this->ade_read_8(PGA_IB_8, &pga_ib_);
this->ade_read_32(AVGAIN_32, &vgain_);
this->ade_read_32(AIGAIN_32, &aigain_);
this->ade_read_32(BIGAIN_32, &bigain_);
this->ade_read_32(AWGAIN_32, &awgain_);
this->ade_read_32(BWGAIN_32, &bwgain_);
this->last_update_ = millis();
this->is_setup_ = true;
});
}
void ADE7953::dump_config() {
LOG_PIN(" IRQ Pin: ", irq_pin_);
LOG_UPDATE_INTERVAL(this);
LOG_SENSOR(" ", "Voltage Sensor", this->voltage_sensor_);
LOG_SENSOR(" ", "Current A Sensor", this->current_a_sensor_);
LOG_SENSOR(" ", "Current B Sensor", this->current_b_sensor_);
LOG_SENSOR(" ", "Power Factor A Sensor", this->power_factor_a_sensor_);
LOG_SENSOR(" ", "Power Factor B Sensor", this->power_factor_b_sensor_);
LOG_SENSOR(" ", "Apparent Power A Sensor", this->apparent_power_a_sensor_);
LOG_SENSOR(" ", "Apparent Power B Sensor", this->apparent_power_b_sensor_);
LOG_SENSOR(" ", "Active Power A Sensor", this->active_power_a_sensor_);
LOG_SENSOR(" ", "Active Power B Sensor", this->active_power_b_sensor_);
LOG_SENSOR(" ", "Rective Power A Sensor", this->reactive_power_a_sensor_);
LOG_SENSOR(" ", "Reactive Power B Sensor", this->reactive_power_b_sensor_);
ESP_LOGCONFIG(TAG, " USE_ACC_ENERGY_REGS: %d", this->use_acc_energy_regs_);
ESP_LOGCONFIG(TAG, " PGA_V_8: 0x%X", pga_v_);
ESP_LOGCONFIG(TAG, " PGA_IA_8: 0x%X", pga_ia_);
ESP_LOGCONFIG(TAG, " PGA_IB_8: 0x%X", pga_ib_);
ESP_LOGCONFIG(TAG, " VGAIN_32: 0x%08jX", (uintmax_t) vgain_);
ESP_LOGCONFIG(TAG, " AIGAIN_32: 0x%08jX", (uintmax_t) aigain_);
ESP_LOGCONFIG(TAG, " BIGAIN_32: 0x%08jX", (uintmax_t) bigain_);
ESP_LOGCONFIG(TAG, " AWGAIN_32: 0x%08jX", (uintmax_t) awgain_);
ESP_LOGCONFIG(TAG, " BWGAIN_32: 0x%08jX", (uintmax_t) bwgain_);
}
#define ADE_PUBLISH_(name, val, factor) \
if (err == 0 && this->name##_sensor_) { \
float value = (val) / (factor); \
this->name##_sensor_->publish_state(value); \
}
#define ADE_PUBLISH(name, val, factor) ADE_PUBLISH_(name, val, factor)
void ADE7953::update() {
if (!this->is_setup_)
return;
bool err;
uint32_t interrupts_a = 0;
uint32_t interrupts_b = 0;
if (this->irq_pin_ != nullptr) {
// Read and reset interrupts
this->ade_read_32(0x032E, &interrupts_a);
this->ade_read_32(0x0331, &interrupts_b);
}
uint32_t val;
uint16_t val_16;
uint16_t reg;
// Power factor
err = this->ade_read_16(0x010A, &val_16);
ADE_PUBLISH(power_factor_a, (int16_t) val_16, (0x7FFF / 100.0f));
err = this->ade_read_16(0x010B, &val_16);
ADE_PUBLISH(power_factor_b, (int16_t) val_16, (0x7FFF / 100.0f));
float pf = ADE_POWER_FACTOR;
if (this->use_acc_energy_regs_) {
const uint32_t now = millis();
const auto diff = now - this->last_update_;
this->last_update_ = now;
// prevent DIV/0
pf = ADE_WATTSEC_POWER_FACTOR * (diff < 10 ? 10 : diff) / 1000;
ESP_LOGVV(TAG, "ADE7953::update() diff=%d pf=%f", diff, pf);
}
// Apparent power
reg = this->use_acc_energy_regs_ ? 0x0322 : 0x0310;
err = this->ade_read_32(reg, &val);
ADE_PUBLISH(apparent_power_a, (int32_t) val, pf);
err = this->ade_read_32(reg + 1, &val);
ADE_PUBLISH(apparent_power_b, (int32_t) val, pf);
// Active power
reg = this->use_acc_energy_regs_ ? 0x031E : 0x0312;
err = this->ade_read_32(reg, &val);
ADE_PUBLISH(active_power_a, (int32_t) val, pf);
err = this->ade_read_32(reg + 1, &val);
ADE_PUBLISH(active_power_b, (int32_t) val, pf);
// Reactive power
reg = this->use_acc_energy_regs_ ? 0x0320 : 0x0314;
err = this->ade_read_32(reg, &val);
ADE_PUBLISH(reactive_power_a, (int32_t) val, pf);
err = this->ade_read_32(reg + 1, &val);
ADE_PUBLISH(reactive_power_b, (int32_t) val, pf);
// Current
err = this->ade_read_32(0x031A, &val);
ADE_PUBLISH(current_a, (uint32_t) val, 100000.0f);
err = this->ade_read_32(0x031B, &val);
ADE_PUBLISH(current_b, (uint32_t) val, 100000.0f);
// Voltage
err = this->ade_read_32(0x031C, &val);
ADE_PUBLISH(voltage, (uint32_t) val, 26000.0f);
// Frequency
err = this->ade_read_16(0x010E, &val_16);
ADE_PUBLISH(frequency, 223750.0f, 1 + val_16);
}
} // namespace ade7953_base
} // namespace esphome

Some files were not shown because too many files have changed in this diff Show More