Commit Graph

2752 Commits

Author SHA1 Message Date
Chris Nussbaum
c3b8c84131
Fix below freezing temperature for Inkbird sensors (#2466) 2021-10-10 10:53:58 +02:00
Paul Monigatti
471b82f727
EntityBase Refactor (#2418)
* Renamed Nameable to EntityBase (cpp)

* Renamed NAMEABLE_SCHEMA to ENTITY_BASE_SCHEMA (Python)

* Renamed cg.Nameable to cg.EntityBase (Python)

* Remove redundant use of CONF_NAME from esp32_touch

* Remove redundant use of CONF_NAME from mcp3008

* Updated test

* Moved EntityBase from Component.h and Component.cpp

* Added icon property to EntityBase

* Added CONF_ICON to ENTITY_BASE_SCHEMA and added setup_entity function to cpp_helpers

* Added MQTT component getters for icon and disabled_by_default

* Lint

* Removed icon field from MQTT components

* Code generation now uses setup_entity to setENTITY_BASE_SCHEMA fields

* Removed unused import

* Added cstdint include

* Optimisation: don't set icon if it is empty

* Remove icon from NumberTraits and SelectTraits

* Removed unused import

* Integration and Total Daily Energy sensors now inherit icons from their parents during code generation

* Minor comment correction

* Removed redundant icon-handling code from sensor, switch, and text_sensor

* Update esphome/components/tsl2591/tsl2591.h

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

* Added icon property to binary sensor, climate, cover, and fan component tests

* Added icons for Binary Sensor, Climate, Cover, Fan, and Light  to API

* Consolidated EntityBase fields in MQTT components

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
2021-10-10 10:37:05 +02:00
Nate Lust
92b85f98e8
Sgp40 fix (#2462)
* Sample from SGP40 sensor at the appropriate interval

The spg40 sensor must be sampled at 1Hz for the VOC index algorithm
to work correctly. This commit introduces a on device timer to
sample correctly seperately from updating the public state of the
component.

* Add missing configuration values for SGP40

The SGP40 component was not printing all of it's configuration in
dump_config, add in the missing store_baseline value.

* Address review comments

* Format according to clang-tidy

* Attempt 2 at clang tidy
2021-10-10 10:33:04 +02:00
definitio
c092d92d45
Fix cover state (#2468) 2021-10-10 10:31:15 +02:00
Ryan Mounce
e514a1fcd4
Use enum for Tuya fan direction datapoint (#2471)
Fix regression from PR2059. Tested with Arlec DCF5242HA.
2021-10-10 10:28:37 +02:00
davidmonro
a1b28cb36e
atm90e32: make the total_increasing class sensors actually be increasing totals. (#2459)
Co-authored-by: David Monro <david.monro@anu.edu.au>
2021-10-09 17:44:16 +02:00
Maurice Makaay
3f2d9abfe6
Correct I2C read() return val check in bh1750 component. (#2465)
Co-authored-by: Maurice Makaay <account-github@makaay.nl>
2021-10-09 10:30:21 +02:00
Otto Winter
f3ec4b514d
Merge pull request #2461 from esphome/bump-2021.9.3
2021.9.3
2021-10-08 10:37:52 +02:00
Otto winter
fc5798fa71
Bump version to 2021.9.3 2021-10-07 22:05:30 +02:00
Otto Winter
95d7ad543f
API encryption switch to libsodium backend (#2456) 2021-10-07 22:05:26 +02:00
Jesse Hills
d9b2903d78
Add log line to show if API encryption is being used (#2450) 2021-10-07 22:04:55 +02:00
dependabot[bot]
32a664eedc
Bump aioesphomeapi from 9.1.2 to 9.1.4 (#2443) 2021-10-07 22:04:16 +02:00
dependabot[bot]
e7477890cf
Bump aioesphomeapi from 9.1.1 to 9.1.2 (#2426)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-07 22:03:52 +02:00
Otto Winter
9bf72ff05f
Re-enable TCP nodelay for ESP32 (#2390) 2021-10-07 22:03:05 +02:00
Martin
5461f87ff0
I2c fix (#2460) 2021-10-07 21:18:00 +02:00
Otto Winter
1c58b17235
API encryption switch to libsodium backend (#2456) 2021-10-06 22:36:12 +02:00
Alex Iribarren
d34a1c3ed6
Add timestamp to ESPHome dashboard/cli logs (#2455) 2021-10-07 08:56:07 +13:00
Jesse Hills
22e3bc7cfe
Add id() for restoring global (#2454) 2021-10-06 22:35:11 +13:00
Paul Monigatti
955c96731e
Add Safe Mode Restart Switch (#2437) 2021-10-06 20:44:48 +13:00
Otto Winter
54a173dbf1
I2C re-introduce very verbose logging (#2446) 2021-10-06 11:57:23 +13:00
Jesse Hills
9ff8240802
Bump esphome-dashboard to 20211006.0 (#2451) 2021-10-06 11:45:01 +13:00
Alex Iribarren
7bbb5213f3
Only ping once every two seconds (#2448) 2021-10-06 11:44:48 +13:00
dependabot[bot]
b8b30599ee
Bump aioesphomeapi from 9.1.4 to 9.1.5 (#2449)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-06 11:29:30 +13:00
Jesse Hills
e083d7f4d0
Add log line to show if API encryption is being used (#2450) 2021-10-06 11:26:18 +13:00
Martin
a57580b5ab
Fix compilation error (#2447) 2021-10-05 17:56:32 +02:00
dependabot[bot]
e22f1fc044
Bump pytest-cov from 2.12.1 to 3.0.0 (#2444) 2021-10-05 14:50:18 +02:00
dependabot[bot]
e09ee8f23d
Bump aioesphomeapi from 9.1.2 to 9.1.4 (#2443) 2021-10-05 14:49:55 +02:00
Paul Monigatti
6ec546a6a4
Improved validation for Addressable Light Partition Segments (#2439)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2021-10-05 12:00:23 +13:00
NMC
877367677b
Add support for Airthing Wave Mini (#2440) 2021-10-05 11:56:34 +13:00
Otto Winter
8be4086224
Always upload using esptool (#2433) 2021-10-04 16:59:15 +02:00
Otto Winter
871d3b66fb
Fix restoring globals (#2442) 2021-10-04 16:15:25 +02:00
Otto Winter
87358e8843
Fix esp32 no longer has Hash internal lib (#2441) 2021-10-04 16:14:51 +02:00
Maurice Makaay
5c06cd8eb3
Fix I2C recovery ESP32 esp-idf (#2438)
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2021-10-04 12:33:25 +02:00
Stefan Agner
46b4c970d1
Fix socket abstraction for ESP-IDF v4 (#2434) 2021-10-03 22:21:45 +02:00
Stefan Agner
49f46a7cdd
Use size_t to fix comparision using RISC-V toolchain (#2436) 2021-10-03 21:55:19 +02:00
Stefan Agner
1627dff166
Disable dependency finder on ESP32 (#2435) 2021-10-03 21:53:40 +02:00
Maurice Makaay
cee08debff
Hotfix for ESP8266 OTA issue: ERROR Error binary size (#2432)
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2021-10-03 16:15:01 +02:00
Otto Winter
912793eddf
Convert time to use tzdata (#2425) 2021-10-03 14:10:53 +02:00
Keith Burzinski
eaa5200a35
Thermostat publish state fix (#2427) 2021-10-03 14:10:43 +02:00
cvwillegen
a7687c3e17
Add local MAC address to WiFi info (#2428) 2021-10-03 13:27:59 +02:00
Maurice Makaay
932e0469f7
Fix ESP32 esp-idf OTA updates (#2424)
* WIP on separating out the OTA backends.

* Split off the individual OTA backends.

* Cleanup the three backends, split into .h and .cpp.

* After successfull flashing, activate the new boot partition.

* Fix linting issues.

* Minor cleanup

Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
Co-authored-by: Otto winter <otto@otto-winter.com>
2021-10-02 16:02:01 +02:00
dependabot[bot]
15ab8918af
Bump aioesphomeapi from 9.1.1 to 9.1.2 (#2426)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-10-02 15:20:12 +02:00
Maurice Makaay
d0dfc94a61
Fix I2C recovery on Arduino (#2412)
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2021-10-01 12:53:37 +02:00
Maurice Makaay
5a2984d03a
Fix attach_interrupt(...) for esp-idf framework (#2416)
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2021-10-01 10:11:07 +02:00
Maurice Makaay
c89018a431
Option to ignore CRC for EFuse MAC address (#2399)
* Accept changes as proposed by black.

* Added test and implemented optional correctly.

* Disable PHY RF full calibration (because it calls the breaking MAC retrieval function).

* Disable CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE instead of enable, dummy!

* Rename CONF_IGNORE_EFUSE_MAC_CRC to CONF_ESP32_IGNORE_EFUSE_MAC_CRC.

* Removed unused import.

* Fix ordering of constants.

* Moved all MAC address logic to core helpers.

* Use pretty MAC address for the log.

* Use standard MAC formatter function for debug component.

* Fix clang-formatting.

* Fix clang-formatting.

* Brought wording of comments in line with other function-describing comments.

* Processed code review by @OttoWinter

* Add USE_ESP32_IGNORE_EFUSE_MAC_CRC to defines.h

Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2021-09-30 18:08:15 +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
Andy Allsopp
946db3fd50
Add viewport meta tag to web server layout (#2419)
* Update web_server.cpp

Added viewport meta tag to web_server.cpp in order to better control layout on mobile browsers. Adds 70 characters. Vastly improves accessibility on mobile devices.

* Update web_server.cpp

split line to meet clang format requirement.

* Update web_server.cpp

Reworked line break for clangtidy
2021-09-30 13:03:30 +02:00
WeekendWarrior1
3dfc8d4291
String manipulation filters for text sensors (#2393)
* initial text sensor filter POC

* fixed verbose logging

* add append, prepend, substitute filters

* add to lower, get to upper working without dummy

* clang lint

* more linting...

* std::move append and prepend filters

* fix verbose filter::input logging

* value.c_str() in input print

* lambda filter verbose log fix

* correct log tag, neaten to upper and to lower

* add on_raw_value automation/trigger
2021-09-29 23:25:06 +02:00