Clyde Stubbs
caaa08d678
[core] Fix for missing arguments to shared_lambda ( #12115 )
2025-11-26 17:05:45 -06:00
J. Nick Koston
b328758634
Revert "[core] Deduplicate identical stateless lambdas to reduce flash usage" ( #12117 )
2025-11-26 10:53:44 -06:00
J. Nick Koston
bda17180df
[core] Deduplicate identical stateless lambdas to reduce flash usage ( #11918 )
2025-11-26 12:48:08 +13:00
J. Nick Koston
e28c152298
[cpp_generator] Align isinstance() with codebase style (tuple vs PEP 604) ( #11645 )
2025-11-01 20:48:58 +11:00
J. Nick Koston
3c18558003
Optimize stateless lambdas to use function pointers ( #11551 )
2025-10-28 08:06:22 +13:00
Jesse Hills
3b20969171
[core] Add typing to some core files ( #10843 )
2025-09-23 09:32:13 -05:00
J. Nick Koston
8d90f13e97
[core] Store component source strings in flash on ESP8266 (breaking change) ( #10621 )
2025-09-07 20:10:00 -05:00
J. Nick Koston
d64e4d3c49
[ruff] Enable FURB rules for code modernization ( #9896 )
2025-07-26 20:54:03 +12:00
J. Nick Koston
ffebd30033
[ruff] Enable SIM rules and fix code simplification violations ( #9872 )
2025-07-25 18:26:08 +12:00
Jimmy Hedman
68d66c873e
Upgrade to use C++20 ( #9135 )
...
Co-authored-by: J. Nick Koston <nick@koston.org >
2025-06-27 17:31:50 +00:00
Jimmy Hedman
c81dbf9d59
Improve on C++17 ( #9170 )
2025-06-22 12:09:38 +02:00
Jimmy Hedman
ee37d2f9c8
Build with C++17 ( #8603 )
...
Co-authored-by: J. Nick Koston <nick@koston.org >
2025-06-14 08:21:39 -05:00
J. Nick Koston
3411e45a0a
Reserve memory for component and platform vectors ( #9042 )
2025-06-11 22:05:42 +12:00
Emmanuel Ferdman
5921a9cd68
Resolve regex library warnings ( #8890 )
2025-05-26 19:45:47 +12:00
Thomas Rupprecht
aeb4e63950
update minimal python version to 3.10 ( #8850 )
2025-05-22 13:21:43 +12:00
Clyde Stubbs
f10bc73d31
[mapping] Implement yaml-configured maps ( #8333 )
2025-04-17 13:18:48 +12:00
Katherine Whitlock
3020083564
Ruff format for CI ( #8276 )
2025-02-19 13:24:43 -06:00
Rodrigo Martín
03e2701bd0
feat(core): Add support for <...> includes ( #8132 )
2025-02-02 21:34:38 +01:00
Jesse Hills
e64709c37e
[code-quality] Organise core imports ( #7149 )
2024-07-29 14:07:44 +12:00
Clyde Stubbs
dd81c83686
Typing hint and doc fixes ( #6729 )
2024-05-13 15:21:02 +12:00
NP v/d Spek
71b3a14a29
update docstrings in cpp_generator.py ( #6212 )
2024-02-12 10:08:32 +13:00
Jesse Hills
972598a698
Handle nanoseconds in config ( #5695 )
2023-11-08 21:34:44 +13: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
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
Jesse Hills
b184b01600
Remove a bunch of unnecessary pylint disabling ( #4079 )
2022-11-24 11:09:19 +13:00
Jesse Hills
d220d41182
Bump python min to 3.9 ( #3871 )
2022-10-05 20:09:27 +13:00
Javier Peletier
05edfd0e82
Add cg.with_local_variable ( #3577 )
2022-10-05 11:50:03 +13:00
cstaahl
07c1cf7137
Pulse meter internal filter mode ( #3082 )
...
Co-authored-by: Paul Daumlechner <paul.daumlechner@live.de >
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com >
Co-authored-by: Otto Winter <otto@otto-winter.com >
2022-02-21 09:32:35 +13:00
Otto Winter
35e6a13cd1
Remove unused obj attribute from AssignmentExpression ( #3145 )
2022-02-09 14:56:42 +01:00
stegm
58fa63ad88
Add Select for modbus ( #3032 )
...
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl >
2022-02-08 22:27:22 +13:00
Otto Winter
871d3b66fb
Fix restoring globals ( #2442 )
2021-10-04 16:15:25 +02:00
Otto Winter
a27a884191
Add missing MockObj operators ( #2378 )
2021-09-23 11:53:10 +02:00
Paul Monigatti
17dcba8f8a
Fix: Pin flags code generation returning FLAG_NONE ( #2377 )
...
Co-authored-by: Otto winter <otto@otto-winter.com >
2021-09-23 11:19:17 +02:00
Otto Winter
ac0d921413
ESP-IDF support and generic target platforms ( #2303 )
...
* Socket refactor and SSL
* esp-idf temp
* Fixes
* Echo component and noise
* Add noise API transport support
* Updates
* ESP-IDF
* Complete
* Fixes
* Fixes
* Versions update
* New i2c APIs
* Complete i2c refactor
* SPI migration
* Revert ESP Preferences migration, too complex for now
* OTA support
* Remove echo again
* Remove ssl again
* GPIOFlags updates
* Rename esphal and ICACHE_RAM_ATTR
* Make ESP32 arduino compilable again
* Fix GPIO flags
* Complete pin registry refactor and fixes
* Fixes to make test1 compile
* Remove sdkconfig file
* Ignore sdkconfig file
* Fixes in reviewing
* Make test2 compile
* Make test4 compile
* Make test5 compile
* Run clang-format
* Fix lint errors
* Use esp-idf APIs instead of btStart
* Another round of fixes
* Start implementing ESP8266
* Make test3 compile
* Guard esp8266 code
* Lint
* Reformat
* Fixes
* Fixes v2
* more fixes
* ESP-IDF tidy target
* Convert ARDUINO_ARCH_ESPxx
* Update WiFiSignalSensor
* Update time ifdefs
* OTA needs millis from hal
* RestartSwitch needs delay from hal
* ESP-IDF Uart
* Fix OTA blank password
* Allow setting sdkconfig
* Fix idf partitions and allow setting sdkconfig from yaml
* Re-add read/write compat APIs and fix esp8266 uart
* Fix esp8266 store log strings in flash
* Fix ESP32 arduino preferences not initialized
* Update ifdefs
* Change how sdkconfig change is detected
* Add checks to ci-custom and fix them
* Run clang-format
* Add esp-idf clang-tidy target and fix errors
* Fixes from clang-tidy idf round 2
* Fixes from compiling tests with esp-idf
* Run clang-format
* Switch test5.yaml to esp-idf
* Implement ESP8266 Preferences
* Lint
* Re-do PIO package version selection a bit
* Fix arduinoespressif32 package version
* Fix unit tests
* Lint
* Lint fixes
* Fix readv/writev not defined
* Fix graphing component
* Re-add all old options from core/config.py
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com >
2021-09-20 11:47:51 +02:00
dependabot[bot]
dbb195691b
Bump pylint from 2.10.2 to 2.11.1 ( #2334 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Otto winter <otto@otto-winter.com >
2021-09-19 19:22:28 +02:00
Stefan Agner
159744e09e
Support library override using named library with repository ( #2056 )
2021-07-26 10:50:45 +02:00
Otto Winter
a33bb32874
Convert components to async-def syntax ( #1823 )
...
* Convert components to async-def syntax
* Remove stray @coroutine
* Manual part
* Convert complexer components code to async-def
* Manual cleanup
* More manual cleanup
2021-05-24 21:45:31 +02:00
Stanislav Meduna
063d9c47a4
Refactor font creation to save stack ( #1707 )
2021-05-24 08:24:54 +12:00
Otto Winter
aebad04c0b
Convert core components to async-def coroutine syntax ( #1658 )
...
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com >
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com >
2021-05-23 22:10:30 +02:00
Otto Winter
d4686c0fb1
Introduce new async-def coroutine syntax ( #1657 )
2021-05-17 17:14:15 +12:00
Keith Burzinski
818a7f1c78
Declare Color objects in main.cpp ( #1395 )
2021-03-19 23:40:05 +13:00
Guillermo Ruffino
69879920eb
add-black ( #1593 )
...
* Add black
Update pre commit
Update pre commit
add empty line
* Format with black
2021-03-07 16:03:16 -03:00
Guillermo Ruffino
28e39f7f76
Add config validator location ( #1490 )
...
* show validation source location for id
* show validation source location for lambda
* refactor lambda #line position
* account content offset on made lambdas
* lint
* remove redundant check
2021-02-06 12:09:15 -03:00
Andrew Zaborowski
c7c71089ce
codegen: Lambda improvements ( #1476 )
...
* Use #line directives in generated C++ code for lambdas
The #line directive in gcc is meant specifically for pieces of imported
code included in generated code, exactly what happens with lambdas in
the yaml files: https://gcc.gnu.org/onlinedocs/cpp/Line-Control.html
With this change, if I add the following at line 165 of kithen.yaml:
- lambda: undefined_var == 5;
then "$ esphome kitchen.yaml compile" shows the following:
INFO Reading configuration kitchen.yaml...
INFO Generating C++ source...
INFO Compiling app...
INFO Running: platformio run -d kitchen
<...>
Compiling .pioenvs/kitchen/src/main.cpp.o
kitchen.yaml: In lambda function:
kitchen.yaml:165:7: error: 'undefined_var' was not declared in this scope
*** [.pioenvs/kitchen/src/main.cpp.o] Error 1
== [FAILED] Took 2.37 seconds ==
* Silence gcc warning on multiline macros in lambdas
When the \ is used at the end of the C++ source in a lambda (line
continuation, often used in preprocessor macros), esphome will copy that
into main.cpp once as code and once as a // commment. gcc will complain
about the multiline commment:
Compiling .pioenvs/kitchen/src/main.cpp.o
kitchen.yaml:640:3: warning: multi-line comment [-Wcomment]
Try to replace the \ with a "<cont>" for lack of a better idea.
2021-01-23 20:17:15 -03:00
Niklas Wagner
c2e0ea97d8
Upgrade dependencies
2020-05-23 20:33:58 -03:00
Tim Savage
d447548893
Tests for CPP Code generation and some Python3 improvements ( #961 )
...
* Basic pytest configuration
* Added unit_test script that triggers pytest
* Changed "fixtures" to fixture_path
This is consistent with pytest's tmp_path
* Initial unit tests for esphome.helpers
* Disabled coverage reporting for esphome/components.
Focus initial unittest efforts on the core code.
* Migrated some ip_address to hypothesis
* Added a hypothesis MAC address strategy
* Initial tests for core
* Added hypothesis to requirements
* Added tests for core classes
TestTimePeriod
Lambda
ID
DocumentLocation
DocumentRange
Define
Library
* Updated test config so package root is discovered
* Setup fixtures and inital tests for pins
* Added tests for validate GPIO
* Added tests for pin type
* Added initial config_validation tests
* Added more tests for config_validation
* Added comparison unit tests
* Added repr to core.TimePeriod. Simplified identifying faults in tests
* Fixed inverted gt/lt tests
* Some tests for Espcore
* Updated syntax for Python3
* Removed usage of kwarg that isn't required
* Started writing test cases
* Started writing test cases for cpp_generator
* Additional docs and more Python3 releated improvements
* More test cases for cpp_generator.
* Fixed linter errors
* Add codegen tests to ensure file API remains stable
* Add test cases for cpp_helpers
2020-04-19 21:05:58 -03:00
Otto Winter
056c72d50d
Drop Python 2 Support ( #793 )
...
* Remove Python 2 support
* Remove u-strings
* Remove docker symlinks
* Remove from travis
* Update requirements
* Upgrade flake8/pylint
* Fixes
* Manual
* Run pyupgrade
* Lint
* Remove base_int
* Fix
* Update platformio_api.py
* Update component.cpp
2019-12-07 18:28:55 +01:00
Fritz Mueller
1d5f8d5a52
Use default format to render FloatLiteral ( #717 )
...
Fixes https://github.com/esphome/issues/issues/557
2019-09-04 11:06:18 +02:00
Otto Winter
f811b1157c
Updates for 1.13 ( #546 )
...
* Update CI matcher
* Check Executable bit
* Quicklint
* Updates
* Allow pm1.0 and pm10.0 for PMS5003ST
Fixes https://github.com/esphome/feature-requests/issues/225
* PowerSupplyRequester
* Lint
* Include debug data in generated main.cpp
* Updates
* Auto-select bit_depth
* Updates
2019-05-12 23:04:36 +02:00
Otto Winter
f1a0e5a313
Sun support ( #531 )
...
* Sun
* Add sun support
* Lint
* Updates
* Fix elevation
* Lint
* Update mqtt_climate.cpp
2019-05-11 12:31:00 +02:00