Commit Graph

719 Commits

Author SHA1 Message Date
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
Guillermo Ruffino 4250af4dd9 Switch to esphome/AsyncTCP-esphome v1.2.2. (#1762) 2021-05-11 12:05:49 -03:00
Otto Winter 229bf719a2 Implement external custom components installing from YAML (#1630)
* Move components import loading to importlib MetaPathFinder and importlib.resources

* Add external_components component

* Fix

* Fix

* fix cv.url return

* fix validate shorthand git

* implement git refresh

* Use finders from sys.path_hooks instead of looking for __init__.py

* use github:// schema

* error handling

* add test

* fix handling git output

* revert file check handling

* fix test

* allow full component path be specified for local

* fix test

* fix path handling

* lint

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2021-05-07 15:02:17 -03:00
Farzad E 2225594ee8 Added an option to disable mDNS (#1716)
* Added an option to disable mDNS

* Fixed linter issues

* Moved the enable_mdns option to WiFi and Ethernet components

* extracted common method for add mdns library

* lint

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2021-05-06 12:31:42 -03:00
mbo18 f7232b199a Change wifi signal strength unit to dBm (#1734) 2021-05-05 20:13:14 +12:00
Ryan Mounce ffc6fe9ca0 Add support for controlling Tuya fan direction (#1409) 2021-05-05 16:24:31 +12:00
Alex Konradi 06b8e4df27 Call Stepper::should_step_ every loop iteration (#1373) 2021-05-05 14:32:15 +12:00
d-two 28ed42d879 Add Hyperion Support (#1339) 2021-05-05 14:09:38 +12:00
0x0a11c0de 98f0d75180 Fix #1940: Implement speed_count in TuyaFan (#1654)
Co-authored-by: Frank Riley <fhriley@gmail.com>
2021-05-04 14:11:24 +12:00
buxtronix dd4fb85170 Ble client fixes (#1739)
Co-authored-by: Ben Buxton <bb@cactii.net>
2021-05-04 08:51:03 +12:00
buxtronix 02aa75f68c BLE client support on ESP32 (#1177)
Co-authored-by: Ben Buxton <bb@cactii.net>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-05-03 11:10:50 +12:00
Alex 07db9319ad Swap fan and swing fields for Fujitu ACs (#1635) 2021-04-30 11:53:44 +12:00
Wojtek Strzalka 4ae4a4ee88 Support for TOF10120 distance sensor (#1375) 2021-04-29 11:49:46 +12:00
Guillermo Ruffino a7c648b60b RC522 fixes (#1479) 2021-04-29 10:50:24 +12:00
Barry Loong 4d7c1ae143 Add Grow Fingerprint Reader (#1356) 2021-04-29 10:08:27 +12:00
elyorkhakimov cc6d1e85cc Addition of forward and reverse active energy counters to ATM90E32 sensor component (#1271)
Co-authored-by: Elyor Khakimov <elyorkhakimov@forwardnetworks.com>
2021-04-29 07:15:50 +12:00
Stephen Tierney 7fb116d87d Add support for SHT4X (#1512) 2021-04-28 20:22:46 +12:00
Christian Ferbar cc43e01e34 Add monochromatic effects: Pulse, Random (#1616) 2021-04-28 15:05:04 +12:00
Guillermo Ruffino bb3d0706d3 Revert "Bump AsyncTCP-esphome to 1.2.1. (#1693)" (#1709)
This reverts commit aed6f2b1ea.
2021-04-21 10:33:59 -03:00
Richard Klingler 820dedbcd2 Added / to default glyphs (#1691)
Co-authored-by: Charlie Root <klingler@blender.klingler.net>
2021-04-21 12:10:45 +02:00
Maurice Makaay aed6f2b1ea Bump AsyncTCP-esphome to 1.2.1. (#1693)
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2021-04-19 20:15:37 -03:00
John Coggeshall bf1885af3f Implementing the remainder of GPS data for the GPS component. (#1676) 2021-04-11 19:15:23 +02:00
Otto Winter d8e4f5d56b Sensor Average Filter Fix Floating Pointer Error Accumulating (#1624) 2021-04-09 10:27:18 +02:00
SenexCrenshaw 2033ac34e5 Sgp40 (#1513)
* Start of SGP40 dev

* Clean up

* Initial Commit

* VOC is working

* Fixed up sensor config

* Lint Fixes
Added in save/restore baseline
Noted original repo in header

* Lint Fixes
Added to test

* Lint Fixes

* Added additional check on restoring

* Removed double check

* Changed defines to static const double

* Changed defines to const
Do not send voc index until sensor stabilizes

* Fixed sensor stabilization message

* Fixup according to PR

* samples_read increment fix

* Fixed missing device class

* Choose a SENSOR device class

* Moved some sensors for tests

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2021-04-08 22:40:19 -03:00
SenexCrenshaw a39bb7b92f Support custom build_flags for bme680_bsec (#1678) 2021-04-08 17:06:54 +02:00
Dan Gentry b53f9f2a81 Daylight Saving Time spelling fix (#1677) 2021-04-08 17:04:40 +02:00
Otto Winter 586e36906d Fix sensor.sensor_schema interface changed (#1659) 2021-04-08 14:37:55 +02:00
Gareth Cooper e6f8e73705 Receive long MQTT payload (#1590) 2021-04-08 14:26:34 +02:00
Guillermo Ruffino 2e50e1f506 Fix servo detach chopped PWM (#1650) 2021-04-08 14:22:30 +02:00
Anthony Uk 76a6c39f25 mqtt_client: Added MQTTClientComponent::unsubscribe() (#1672)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2021-04-08 14:21:42 +02:00
rbaron bf01c22e1f Adds support for b-parasite soil moisture sensor (#1666) 2021-04-08 13:59:30 +02:00
Otto Winter 7964b724ed Rewrite sun component calculations (#1661) 2021-04-07 12:16:36 +02:00
Vegetto 3ecae3f16f fixes #858 - esphome crashes with neolightbus and RMT (#1667)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2021-04-06 14:31:38 +02:00
Anthony Uk 5c359856ff Fixed CustomComponentConstructor::get_component() (#1653)
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2021-04-06 13:50:31 +02:00
Trevor North 2d618768d5 Add BME680 via BSEC integration (#1313) 2021-04-06 12:19:56 +02:00
Stanislav Meduna 808e3be324 Add the display.is_displaying_page condition (#1646)
* display: add the display.is_displaying_page condition

* use maybe_simple_value for page_id

* add test
2021-04-02 23:00:41 -03:00
Andreas Hergert 9e23987db8 Add I2CMultiplexer in generel and the TCA9548A in special (#1410)
* Added I2CMultiplexer in generel and the TCA9548A in special

* cleanup

* tidy

* tidy

* tidy

* tidy

* Update CODEOWNERS

* Update CODEOWNERS

* added CODEOWNERS

* Fix CODEOWNERS

* protected function

* fixed scan

* fixed style

* added to test1.yaml

* Update esphome/components/tca9548a/__init__.py

* Update esphome/components/i2c/__init__.py

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

* Update esphome/components/i2c/i2c.cpp

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

* Update esphome/components/i2c/__init__.py

* Update esphome/components/i2c/__init__.py

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

* Update esphome/components/i2c/i2c.cpp

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

* added define statements for I2C Multiplexer

* fix

* try to tidy

* bug fix

* tidy

* override fix

* only change channel if different

* tidy

* added test

* testfix

* added defines

* tidy

* fix dep

* like recommended

Co-authored-by: Andreas Hergert <andreas.hergert@otrs.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2021-03-29 16:50:30 -03:00
Guillermo Ruffino ad76312f66 fix servo not reattaching with same target (#1649) 2021-03-28 22:35:39 -03:00
Diego Elio Pettenò a6255c31fe Add optional bindkey support for CGG1. (#1407) 2021-03-26 07:33:06 +13:00
buxtronix 46356cbc4a Fix BLE UUID matching (#1637)
Co-authored-by: Ben Buxton <bb@cactii.net>
2021-03-23 18:21:04 +13:00
Jesse Hills af3273d930 Add trigger for http actions to receive the status code (#1599) 2021-03-22 16:26:10 +13:00
Niccolò Maggioni 8f1eb77e05 Background calibration & ABC commands for SenseAir S8 (#1623) 2021-03-22 12:59:41 +13:00
matikij 91898cb814 Add 2.13in-ttgo-b1 waveshare epaper module. (#1326) 2021-03-20 20:32:46 +13:00
Keith Burzinski 818a7f1c78 Declare Color objects in main.cpp (#1395) 2021-03-19 23:40:05 +13:00
Jesse Hills dedf343bd5 Fix pulse-meter with device_class and black (#1621) 2021-03-19 21:40:11 +13:00
DrZoid e5b45b6b4b e131: fix issue 1579: limitation of maximum light count (#1619) 2021-03-19 21:19:34 +13:00
Steve Baxter a77784a6da Implement pulse_meter as an improvement on pulse_counter and pulse_width for meters (#1434) 2021-03-19 21:16:27 +13:00
Mike Ryan f63f9168ff Add addressable_light display platform (#1272) 2021-03-18 19:08:50 +13:00
SenexCrenshaw b5b2036971 8266 hardware spi enable with just 3 pins (#1617) 2021-03-18 13:59:47 +13:00
SenexCrenshaw a96b6e7002 SPI transfer fix. Use write when no miso pin is set (#1563) 2021-03-18 13:54:58 +13:00