My Home-IoT
Find a file
Maurice Makaay 7665a220a0
Fix error when using %% in printf format. (#1713)
For printf formatting, a check is done to see if the number of
arguments matches the number of printf formatting placeholders.

The escape code `%%` that is used for representing a literal `%`
is also counted as a placeholder, but no argument will be provided
for that one.

This makes it impossible to use something like `("%f%%", percentage)`
in the code. In such case, one gets the error:

  `Found 2 printf-patterns (%f, %%), but 1 args were given!`

This commit fixes this behavior by omitting the `%%` from the matches.

Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2021-05-11 12:15:29 -03:00
.devcontainer Add lambda to devcontainer config (#1059) 2020-05-19 21:02:10 -03:00
.github Implement external custom components installing from YAML (#1630) 2021-05-07 15:02:17 -03:00
.vscode Run task for VS Code (#1361) 2020-12-13 16:24:26 -03:00
docker Switch docker images to debian (#1626) 2021-03-20 20:58:46 +01:00
esphome Fix error when using %% in printf format. (#1713) 2021-05-11 12:15:29 -03:00
script Implement external custom components installing from YAML (#1630) 2021-05-07 15:02:17 -03:00
tests Implement external custom components installing from YAML (#1630) 2021-05-07 15:02:17 -03:00
.clang-format 🏗 Merge C++ into python codebase (#504) 2019-04-17 12:06:00 +02:00
.clang-tidy 🏗 Merge C++ into python codebase (#504) 2019-04-17 12:06:00 +02:00
.coveragerc Unittests for esphome python code (#931) 2020-03-12 14:27:22 -07:00
.dockerignore Fix docker build 2018-09-25 10:30:45 +02:00
.editorconfig Formatted test yaml files (#1382) 2020-11-19 23:59:19 -03:00
.gitignore Run task for VS Code (#1361) 2020-12-13 16:24:26 -03:00
.gitpod.yml extract and use current version of python 3 (#938) 2020-01-09 13:27:39 -08:00
.pre-commit-config.yaml add-black (#1593) 2021-03-07 16:03:16 -03:00
CODE_OF_CONDUCT.md Update email addresses (#1733) 2021-05-03 11:51:10 +12:00
CODEOWNERS BLE client support on ESP32 (#1177) 2021-05-03 11:10:50 +12:00
CONTRIBUTING.md Rename esphomeyaml to esphome (#426) 2019-02-13 16:54:02 +01:00
LICENSE 🏗 Merge C++ into python codebase (#504) 2019-04-17 12:06:00 +02:00
MANIFEST.in Fix sdist missing requirements.txt (#1214) 2020-07-28 14:29:01 +02:00
platformio.ini Switch to esphome/AsyncTCP-esphome v1.2.2. (#1762) 2021-05-11 12:05:49 -03:00
pylintrc add-black (#1593) 2021-03-07 16:03:16 -03:00
pyproject.toml add-black (#1593) 2021-03-07 16:03:16 -03:00
pytest.ini Unittests for esphome python code (#931) 2020-03-12 14:27:22 -07:00
README.md Update README.md 2019-02-14 13:49:22 +01:00
requirements.txt Bump protobuf from 3.15.7 to 3.15.8 (#1682) 2021-04-09 10:14:38 +02:00
requirements_test.txt Bump pylint from 2.7.2 to 2.8.2 (#1729) 2021-05-10 17:57:25 -03:00
setup.cfg add-black (#1593) 2021-03-07 16:03:16 -03:00
setup.py Update email addresses (#1733) 2021-05-03 11:51:10 +12:00

ESPHome Build Status Discord Chat GitHub release

ESPHome Logo

Documentation: https://esphome.io/

For issues, please go to the issue tracker.

For feature requests, please see feature requests.