Commit Graph
100 Commits
Author SHA1 Message Date
Oxan van Leeuwen b4cd8d21a5 Enable addressable light power supply based on raw values (#2690) 2021-11-11 12:25:41 +13:00
Oxan van Leeuwen 99c775d8cb Introduce encode_value/decode_value() template functions (#2662) 2021-11-10 19:44:01 +01:00
Oxan van Leeuwen 4d43396835 Clean-up string sanitation helpers (#2660) 2021-11-10 19:42:41 +01:00
Oxan van Leeuwen c422b2fb0b Introduce byteswap helpers (#2661)
* Backport std::byteswap() in helpers.h

* Introduce convert_big_endian() function

* Use convert_big_endian() in i2c byte swap functions
2021-11-10 19:40:18 +01:00
Oxan van LeeuwenandJesse Hills d8e33c5a69 Add repeat action for automations (#2538)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-11-11 07:30:07 +13:00
Oxan van Leeuwen 15f9677d33 Introduce parse_number() helper function (#2659) 2021-11-11 07:15:06 +13:00
Oxan van Leeuwen 2ac232e634 Add missing hal.h include in esp32_camera_web_server (#2689) 2021-11-10 19:09:10 +01:00
ychieux f72389147d SSD1306_base: Add support for 64x32 size and fix flip functions (#2682)
* Add support for SSD1306 OLED display 0.42inch 64x32 and fix a typo in __init__.py preventing flip functions to operate as intended

* convert tab to spaces

* fix typo on filename for __init__.py
2021-11-09 18:47:19 +01:00
Ed 696643d037 BH1750: Fix a too high default H-res2 mode value (#2536) 2021-10-29 11:51:57 +13:00
Alex Iribarren 0d3e6b2c4c Expose web_server port via the API (#2467) 2021-10-28 11:46:55 +13:00
0hax b34eed125d Teleinfo ptec (#2599)
* teleinfo: handle historical mode correctly.

In historical mode, tags like PTEC leads to an issue where we detect a
timestamp wheras this is not possible in historical mode.

PTEC teleinfo tag looks like:
    PTEC HP..
Instead of the usual format
    IINST1 001 I

This make our data parsing fails.

While at here, make sure we continue parsing other tags even if parsing
one of the tag fails.

Signed-off-by: 0hax <0hax@protonmail.com>

* teleinfo: fix compilation with loglevel set to debug.

Signed-off-by: 0hax <0hax@protonmail.com>
2021-10-27 10:49:10 +13:00
Oxan van Leeuwen 87328686a0 Allow setting URL as platform_version (#2598) 2021-10-26 10:55:09 +02:00
0hax a687b083ae Teleinfo ptec (#2599)
* teleinfo: handle historical mode correctly.

In historical mode, tags like PTEC leads to an issue where we detect a
timestamp wheras this is not possible in historical mode.

PTEC teleinfo tag looks like:
    PTEC HP..
Instead of the usual format
    IINST1 001 I

This make our data parsing fails.

While at here, make sure we continue parsing other tags even if parsing
one of the tag fails.

Signed-off-by: 0hax <0hax@protonmail.com>

* teleinfo: fix compilation with loglevel set to debug.

Signed-off-by: 0hax <0hax@protonmail.com>
2021-10-23 19:01:23 +02:00
Oxan van Leeuwen bbcd523967 Fix validation of addressable light IDs (#2588) 2021-10-22 18:26:21 +02:00
Oxan van Leeuwen 115bca98f1 Fix old-style arduino_version on ESP8266 and with magic values (#2591) 2021-10-22 18:24:48 +02:00
Oxan van Leeuwen ed0b34b2fe Fix pin/component switchup in SX1509 pin configuration (#2593) 2021-10-22 18:24:48 +02:00
Oxan van Leeuwen ab34401421 Fix PlatformIO version for latest Arduino framework (#2590) 2021-10-22 18:24:48 +02:00
Oxan van Leeuwen f7b3f52731 Limit hostnames to 31 characters (#2531) 2021-10-22 12:09:47 +02:00
Oxan van Leeuwen 07a9cb910f Fix validation of addressable light IDs (#2588) 2021-10-21 20:07:37 +02:00
Oxan van Leeuwen 27d7d7ca69 Fix old-style arduino_version on ESP8266 and with magic values (#2591) 2021-10-21 19:56:47 +02:00
Oxan van Leeuwen c0fc5b48ae Fix pin/component switchup in SX1509 pin configuration (#2593) 2021-10-21 19:55:19 +02:00
Oxan van Leeuwen 8735d3b83e Fix PlatformIO version for latest Arduino framework (#2590) 2021-10-21 18:59:49 +02:00
Oxan van Leeuwen 3a760fbb44 Fix ADC pin validation on ESP32-C3 (#2551) 2021-10-20 10:14:30 +13:00
Oxan van Leeuwen 5b5ead872b Fix ADC pin validation on ESP32-C3 (#2551) 2021-10-19 12:56:49 +02:00
Oxan van LeeuwenandOtto winter 723fb7eaac Autodetect ESP32 variant (#2530)
Co-authored-by: Otto winter <otto@otto-winter.com>
2021-10-18 15:31:01 +13:00
Oxan van LeeuwenandOtto winter ced11bc707 Autodetect ESP32 variant (#2530)
Co-authored-by: Otto winter <otto@otto-winter.com>
2021-10-18 13:36:18 +13:00
Oxan van Leeuwen f83950fd75 Fix bitshift on read in ADE7953 (#2537) 2021-10-17 20:28:43 +13:00
Oxan van Leeuwen 4dd1bf920d Replace framework version_hint with source option (#2529) 2021-10-17 20:28:43 +13:00
Keith Burzinski c3a8a044b9 Fix Nextion HTTPClient error for ESP32 (#2524) 2021-10-17 20:28:42 +13:00
Oxan van Leeuwen 65d2b37496 Fix bitshift on read in ADE7953 (#2537) 2021-10-17 19:53:49 +13:00
Oxan van Leeuwen 94d518a418 Replace framework version_hint with source option (#2529) 2021-10-15 22:07:05 +02:00
Oxan van Leeuwen c82d5d63e3 Move TemplatableValue helper class to automation.h (#2511) 2021-10-15 22:05:11 +02:00
Keith Burzinski 7178f10bda Fix Nextion HTTPClient error for ESP32 (#2524) 2021-10-15 20:26:26 +13:00
Oxan van Leeuwen 73940bc1bd Don't define UART_SELECTION_UART2 when UART2 is unavailable (#2512) 2021-10-15 09:42:43 +13:00
Oxan van Leeuwen 5f7cef0b06 Disallow using UART2 for logger on ESP-32 variants that lack it (#2510) 2021-10-15 09:42:43 +13:00
Oxan van Leeuwen b3b9ccd314 Fix light state remaining on after turn off with transition (#2509) 2021-10-15 09:42:43 +13:00
Oxan van Leeuwen 63d6b610b8 Don't define UART_SELECTION_UART2 when UART2 is unavailable (#2512) 2021-10-14 11:25:10 +02:00
Oxan van Leeuwen 6bbb5e9b56 Disallow using UART2 for logger on ESP-32 variants that lack it (#2510) 2021-10-14 09:21:43 +13:00
Oxan van Leeuwen 05388d2dfc Fix light state remaining on after turn off with transition (#2509) 2021-10-14 08:53:00 +13:00
Oxan van Leeuwen 1184bbc976 Reduce IRAM usage in test3 (#2499) 2021-10-13 08:22:38 +13:00
Alex Iribarren d34a1c3ed6 Add timestamp to ESPHome dashboard/cli logs (#2455) 2021-10-07 08:56:07 +13:00
Alex Iribarren 7bbb5213f3 Only ping once every two seconds (#2448) 2021-10-06 11:44:48 +13:00
Keith Burzinski eaa5200a35 Thermostat publish state fix (#2427) 2021-10-03 14:10:43 +02:00
Oxan van Leeuwen 1031ea4313 Fix line endings normalization (#2407)
* Strip CRLF line endings from modbus controller files

* Normalize all line endings to LF
2021-09-30 18:07:28 +02:00
Oxan van Leeuwen 5b0fbbaada Replace std::move() with const references where possible (#2421)
* Replace std::move() with const references where possible

* Fix formatting
2021-09-30 16:25:08 +02:00
Oxan van Leeuwen 0e4f1ac40d Fix default environment for clang-tidy (#2420)
* Drop unnecessary platformio call from script/lint-cpp

* Default environment for clang-tidy to esp32-tidy
2021-09-30 16:24:02 +02:00
Oxan van Leeuwen 4f5e4f3b86 Move #ifdef to after header include (#2417)
defines.h needs to be included first.

Fixes esphome/issues#2490.
2021-09-29 23:21:52 +02:00
Oxan van Leeuwen 5596751c2c Add str_sprintf function that returns std::string (#2408) 2021-09-28 10:24:55 +13:00
0haxandJörg Wagner 5624fafb3a Fix handling of timestamps in Teleinfo component. (#2392)
* teleinfo: avoid a buffer overflow.

When reading tag or values, data is written to the buffer even if the
size if bigger than the buffer. Add a new 'max_len' argument to
get_field() to avoid this error.

Signed-off-by: 0hax <0hax@protonmail.com>

* teleinfo: read extra timestamp field for some tags.

Some tags has an extra timestamp field that need to be read before the
actual data.
The code is inspired by Jpsy work:

https://github.com/Jpsy/esphome/commit/29339c14f96ed7cf7a68911ca7d9bd5eb94955d6

Signed-off-by: 0hax <0hax@protonmail.com>

* teleinfo: increase MAX_BUF_SIZE to suffice for 3-phase Linky in Standard mode.

* teleinfo: handle DATE tag correctly.

The DATE tag is special due its format and need to be handled
separately.
Fix from DrCoolzic.

Signed-off-by: 0hax <0hax@protonmail.com>

Co-authored-by: Jörg Wagner <jwagner@digilog.de>
2021-09-27 22:32:08 +02:00
Marcos Pérez FerroandOxan van Leeuwen e30f17f64f Add Current based cover (#1439)
* Adding first version of current_base cover. No Interlock yet.

* simplifying code

* Implementing malfunction protection

* Adding test

* Fixing too long lines

* Fixing test sensor names

* Adding missing id's in ade7953 tests

* Adding code owners as requested

* Fixing issue setting position when stop reached

* Fixing issue setting position when stop reached

* Black formatting

* Fixing format issues

* Fix for concurrent changes

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
2021-09-27 22:22:45 +02:00
Stijn TintelandOtto winter 5ddba719c5 Fix ir_climate on ESP32-C3 (#2314)
Co-authored-by: Otto winter <otto@otto-winter.com>
2021-09-22 20:13:24 +02:00
Oxan van Leeuwen 0406e27100 Don't generate IDs with the name of loaded integrations (#2373) 2021-09-22 19:07:57 +02:00
Oxan van Leeuwen ed3ad615d8 Fix compilation due to incompatibility between #1237 and IDF changes (#2372) 2021-09-22 14:07:39 +02:00
Tommy van der VorstandOxan van Leeuwen 9fe7b08874 Add support for Waveshare 7.5 inch (C) bichromatic display (black-and-white only for now) (#1844)
* Add support for Waveshare 7.5 inch (B) bichromatic display (black-and-white only for now)

* Use drawing commands specific to bichromatic displays

* Fix inaccurate comment

* Fix merge error

* Formatting

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
2021-09-22 12:39:41 +02:00
637b55bfbf Allow compilation against IDF from repository (#2355)
* Fix src_filter in platformio.ini after src_dir change

* Add -Wno-nonnull-compare to platformio.ini as well

* Create default sdkconfig for static analysis

* Add more compiler flags to clang ignore list

* Clean-up platformio.ini

* Remove unnecessary blank line

* Fix accidentally dropped library

* Don't gitignore sdkconfig.defaults

Co-authored-by: Otto winter <otto@otto-winter.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-09-21 17:12:17 +02:00
AlexandOtto winter 491f8cc611 Configurable Flash Write Interval (#2119)
Co-authored-by: Alex <33379584+alexyao2015@users.noreply.github.com>
Co-authored-by: Otto winter <otto@otto-winter.com>
2021-09-21 13:47:51 +02:00
Oxan van Leeuwen 71fc61117b Fix duplicate defines and restore alphabetical order (#2352) 2021-09-21 16:52:01 +12:00
Oxan van Leeuwen 1e8e471dec Introduce call_dump_config() indirection (#2325) 2021-09-20 11:16:31 +02:00
Oxan van Leeuwen 7452ef23b1 Add ESPHOME_VERSION_CODE define (#2324) 2021-09-20 20:16:59 +12:00
poptixandMatt Hallacy 81685573e1 Properly calculate negative temperatures in sm300d2 (#2335)
Co-authored-by: Matt Hallacy <github@poptix.net>
2021-09-20 19:44:18 +12:00
Oxan van Leeuwen 8bda8e5393 Clean-up sensor integration (#2275) 2021-09-20 14:34:59 +12:00
Oxan van Leeuwen d180aee57f Apply color brightness to addressable light effects (#2321) 2021-09-20 14:16:56 +12:00
Oxan van Leeuwen e3ffecefc0 Cease using deprecated Cover methods in automations (#2326) 2021-09-20 14:16:56 +12:00
Oxan van Leeuwen 4c61cf153c Light transition fixes (#2320) 2021-09-20 14:16:56 +12:00
Oxan van Leeuwen 50da630811 Apply color brightness to addressable light effects (#2321) 2021-09-19 18:46:26 +02:00
Oxan van Leeuwen f76685fccf Cease using deprecated Cover methods in automations (#2326) 2021-09-19 18:31:31 +02:00
Oxan van Leeuwen 68d547595e Light transition fixes (#2320) 2021-09-19 18:31:20 +02:00
Oxan van Leeuwen aed140d802 Fix typo 2021-09-15 19:13:30 +02:00
Oxan van Leeuwen c69b88bb55 Fix platformio.ini parser used by container build 2021-09-15 19:10:51 +02:00
Oxan van Leeuwen c6dc8a11e2 Add namespace to all PlatformIO library references (#2296)
* Remove unnecessary duplication in platformio.ini

* Add namespace to all platformio library references

* Add cmake-build-* to gitignore

They're generated by the CLion add-on for each PlatformIO environment.
Listing them all separately seems nonsensical.
2021-09-15 19:01:31 +02:00
Oxan van Leeuwen 716039e452 Use standard version of make_unique when available (#2292) 2021-09-14 14:27:35 +02:00
Oxan van Leeuwen 23ead416d5 Suppress excessive warnings about deprecated Fan interfaces (#2270) 2021-09-14 23:06:13 +12:00
Oxan van Leeuwen 1b5f11bbee Only try compat parsing after regular parsing fails (#2269) 2021-09-14 23:06:13 +12:00
Oxan van Leeuwen 4eb51ab4d6 Disable automatic usage of SNTP servers from DHCP (#2273) 2021-09-14 07:12:59 +12:00
Oxan van Leeuwen e6b0a0ca2b Clean-up sensor integration (#2275) 2021-09-13 18:58:49 +02:00
Oxan van LeeuwenandOtto winter 924df1e7de Run clang-tidy against Arduino 3 (#2146)
* Add macros header with more usable Arduino version defines

* Change Arduino version checking to use our version defines

* Add missing ESP8266 check

* Rename Arduino version macro to ARDUINO_VERSION_CODE

* Upgrade clang-tidy to use Arduino 3

* Fix clang-tidy warnings

* Upgrade NeoPixelBus to upstream 2.6.7

* Use Arduino-version-appropriate API to set redirect flags

* Remove now unnecessary CLANG_TIDY ifdefs

* Add preprocessor hackery to avoid including pgmspace.h

* Bump base image to 4.1.1 and update lint

* Fix nfctag

* Fix make_unique ambiguous

* Fix ignore name

* Fix ambiguous v2

* Remove unused begin

* Cast time_t to prevent issues on platforms where time_t is 32bit

Co-authored-by: Otto winter <otto@otto-winter.com>
2021-09-13 18:55:04 +02:00
40c474cd83 Run clang-tidy against ESP32 (#2147)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Otto winter <otto@otto-winter.com>
2021-09-13 18:11:27 +02:00
Oxan van Leeuwen 133a17d6eb Add esphal.h include to inkplate6 component (#2286) 2021-09-13 16:55:01 +02:00
Oxan van Leeuwen fe47ddc27a Convert st7735.h to use LF line endings (#2287) 2021-09-13 16:39:35 +02:00
Alex 4e308f551c Fix devcontainer scripts on Windows (#2239) 2021-09-13 10:08:06 +02:00
Oxan van LeeuwenandOtto winter d594a6fcbc Store strings only used for logging in flash (#2274)
Co-authored-by: Otto winter <otto@otto-winter.com>
2021-09-13 09:48:52 +02:00
Oxan van Leeuwen e18dfdd656 Suppress excessive warnings about deprecated Fan interfaces (#2270) 2021-09-13 09:39:18 +02:00
Oxan van Leeuwen 3aa107142b Only try compat parsing after regular parsing fails (#2269) 2021-09-13 09:37:11 +02:00
Oxan van Leeuwen 0cd24c629a Compatibility with clang-tidy v14 (#2272) 2021-09-13 09:35:55 +02:00
Oxan van Leeuwen f31e0532c4 Untangle core headers (part 1) (#2276) 2021-09-13 09:33:29 +02:00
Oxan van Leeuwen 97a18717e6 Disable automatic usage of SNTP servers from DHCP (#2273) 2021-09-13 12:44:39 +12:00
Oxan van Leeuwen ede1de9021 Drop obsolete comments from CONTRIBUTING.md (#2271) 2021-09-12 22:04:35 +02:00
poptixandMatt Hallacy 87842e097b sm300d2: Accept (undocumented) 0x80 checksum offset. (#2263)
Co-authored-by: Matt Hallacy <github@poptix.net>
2021-09-10 21:34:38 +12:00
poptixandMatt Hallacy 3d71e2e189 sm300d2: Accept (undocumented) 0x80 checksum offset. (#2263)
Co-authored-by: Matt Hallacy <github@poptix.net>
2021-09-10 21:05:25 +12:00
Keith Burzinski faf1c8bee8 SGP40 sensor start-up fix (#2178) 2021-09-09 09:42:35 +12:00
Oxan van Leeuwen d9cb64b893 Add device classes new in HA 2021.9 (#2248) 2021-09-07 10:12:26 +12:00
Alex 4a6f1f150a Fix runtime exception due to dict typing (#2243) 2021-09-06 14:48:28 +12:00
Oxan van Leeuwen 54de0ca0da Reject template select/number/switches that don't handle user input (#2230) 2021-09-04 14:46:53 +12:00
Oxan van Leeuwen f364788c03 Expose WHITE/CWWW/RGBCT color modes over MQTT (#2231) 2021-09-04 14:32:33 +12:00
Alex 9937ad7fa0 Cleanup flash transitions (#2227) 2021-09-02 11:56:40 +12:00
Alex ea1b5e19f0 Add transitions to light flash (#2201) 2021-08-31 14:18:16 +12:00
Oxan van Leeuwen fac49896df Update known boards (#2190) 2021-08-30 09:41:05 +12:00
Alessandro Campolo b5de43b225 cs_pin made optional for ili9341 (#2219) 2021-08-30 09:07:06 +12:00
Oxan van Leeuwen ad953f02d1 Fix addressable light control without transitions & effects with transitions (#2187) 2021-08-24 14:26:27 +12:00
Oxan van Leeuwen 1c1ad32610 Add deprecated attribute to some deprecated types/methods (#2185) 2021-08-24 06:48:12 +12:00