Commit Graph

101 Commits

Author SHA1 Message Date
Samuel Sieb
b56c606523
add value option to timeout filter (#5222)
Co-authored-by: Samuel Sieb <samuel@sieb.net>
2023-08-10 17:11:03 +12:00
Mat931
cd46a69f2c
Add 'map_linear' and 'clamp' sensor filters (#5040) 2023-07-31 09:09:09 +12:00
esphomebot
959d1944fd
Synchronise Device Classes from Home Assistant (#5147) 2023-07-24 07:17:18 +00:00
Clyde Stubbs
ac81fae855
Add timeout filter (#5104) 2023-07-17 09:17:31 +12:00
github-actions[bot]
d7fd23d8a8
Synchronise Device Classes from Home Assistant (#4825)
Co-authored-by: esphomebot <esphome@nabucasa.com>
2023-05-15 23:13:17 +00:00
Fabian
535003014b
Keep Unit of Measurement in Flash. (#4719)
Co-authored-by: Your Name <you@example.com>
2023-05-10 11:42:55 +12:00
Jesse Hills
327cd662b4
Use proper schema for delta filter (#4723) 2023-04-23 20:42:46 +00:00
Fabian
afc2b3b74f
Keep Device Class in Flash. (#4639)
* Keep Device Class in Flash.

* Remove blank line

---------

Co-authored-by: Your Name <you@example.com>
2023-04-20 03:53:35 +00:00
Fabian
79f861f012
Avoid sensor padding. (#4638)
Co-authored-by: Your Name <you@example.com>
2023-03-31 04:29:17 +00:00
github-actions[bot]
a014d853a4
Synchronise Device Classes from Home Assistant (#4633)
* Synchronise Device Classes from Home Assistant

* Remove count do the `DEVICE_CLASSES` list is also updated

* Format file

---------

Co-authored-by: esphomebot <esphome@nabucasa.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-29 02:47:00 +00:00
Fabian
cb2fcaa9b1
EntityBase Name can stay in flash. (#4594)
* `EntityBase`can stay in flash.

* Trying to please the CI.

---------

Co-authored-by: Your Name <you@example.com>
2023-03-28 06:38:56 +00:00
Sybren A. Stüvel
48658d5a55
Add a simple 'skip_initial' filter (#4582)
* Add a simple 'skip' filter

This filter simply skips the first `send_first_at` values, then passes
everything as-is. This is quite useful when you know the first few sensor
readings should be ignored.

Example YAML:

```yaml
sensor:
  - platform: sgp30
    id: mysensor_sgp30
    eco2:
      id: mysensor_sgp30_co2
      name: "eCO₂"
      accuracy_decimals: 0
      filters:
        - skip:
            send_first_at: 41
```

* Rename the filter to `skip_initial` and simplify the schema

New usage:

```yaml
      filters:
        - skip_initial: 41
```

* Apply clang-format
2023-03-19 19:08:51 +00:00
Trent Houliston
25fb288016
Update the delta filter to take a percentage value as well as an absolute value (#4391) 2023-03-15 22:20:18 +00:00
Oxan van Leeuwen
ba1416cc0e
Drop deprecated entity property base methods (#4539) 2023-03-09 00:08:45 +00:00
Oxan van Leeuwen
afc1c83af4
Mark unique_id() override as deprecated (#4538) 2023-03-09 00:06:20 +00:00
Paulus Schoutsen
40e2832e67
Simplify sensor schema generation (#4462)
* Simplify sensor schema generation

* Mark class not optional

* Fix assignment
2023-02-19 19:20:13 +00:00
Oxan van Leeuwen
9aed758d1b
Automate syncing device classes with HA (#4438)
* Sync device classes with HA

* Rename blacklist
2023-02-16 00:28:12 +00:00
Jesse Hills
f2eafa8fbe
Add macro for sub sensor defining (#4315) 2023-01-19 17:36:43 +13:00
Jesse Hills
7e376ae952
Add precipitation device class (#4219) 2022-12-22 21:18:58 +13:00
Jesse Hills
9273e3775b
Add vector includes (#4080) 2022-11-24 13:12:55 +13:00
Franck Nijhof
237c7dd169
Add wind_speed sensor device class (#3941) 2022-10-26 07:35:12 +13:00
Franck Nijhof
60b7d1c8a1
Add water & precipitation_intensity sensor device classes (#3940) 2022-10-25 20:37:19 +13:00
Jesse Hills
786c8b6cfe
Add new sensor device classes (#3895) 2022-10-11 09:54:58 +13:00
Peter Galantha
aeb81e547b
Add state_class total (#3608)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-08-11 14:00:09 +12:00
RoboMagus
989b7be99b
Pass optional args to 'new_Pvariable' when creating new entities (#3690) 2022-08-08 07:31:50 +12:00
DAVe3283
ed26c57d99
Rework NaN handling in sensor filters (#3610)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2022-07-28 16:39:11 +12:00
Luca Adrian L
093989406f
Added more sensor device classes (#3624) 2022-07-07 11:32:38 +12:00
Maurice Makaay
0d1028be2e
Cleanup deprecated EntityBase::hash_base() (#3525)
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2022-06-08 09:13:11 +12:00
Jesse Hills
256395c28d
Add duration device class for sensors (#3421) 2022-04-26 21:02:08 +12:00
Jesse Hills
ba8d255cb4
Allow on_value_range for sensor and number to be templated (#3359) 2022-04-05 22:06:36 +12:00
EdJoPaTo
69633826bb
Implement send_first_at for exponential_moving_average (#3240) 2022-02-21 13:13:06 +13:00
Jesse Hills
3b8bb09ae3
Add class as first positional arg to sensor_schema (#3216) 2022-02-18 10:27:20 +13:00
Oxan van Leeuwen
80d03a631e
Force braces around multi-line statements (#3094)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2022-01-25 08:56:36 +13:00
Oxan van Leeuwen
7da12a878f
Enable readability-redundant-member-init check (#3097) 2022-01-23 20:34:43 +13:00
Oxan van Leeuwen
89e7448007
Remove deprecated attribute from virtual entity methods (#3056) 2022-01-16 23:40:15 +01:00
Oxan van Leeuwen
073828235f
Deprecate virtual methods to set entity properties (#3021) 2022-01-10 13:32:39 +01:00
Petr Vraník
5d70ff702b
quantile filter support (#2900)
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
Co-authored-by: pvranik <petr.vranik@mgm-tp.com>
2021-12-15 07:43:42 +13:00
Jesse Hills
3c0414c420
Add Entity categories for Home Assistant (#2636) 2021-11-08 07:24:52 +13:00
Sergio Mayoral Martínez
3dee057826
Add throttle_average sensor filter (#2485) 2021-10-13 11:35:30 +13: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
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
Paul Monigatti
64341d1d18
Fix MQTT discovery for sensor state_class (#2331) 2021-09-19 18:30:41 +02:00
Oxan van Leeuwen
e6b0a0ca2b
Clean-up sensor integration (#2275) 2021-09-13 18:58:49 +02:00
Oxan van Leeuwen
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
d9cb64b893
Add device classes new in HA 2021.9 (#2248) 2021-09-07 10:12:26 +12:00
Jesse Hills
ff6bed54c6
Remove last_reset_type and convert all those sensors to TOTAL_INCREASING (#2233) 2021-09-06 08:30:47 +12:00
Jesse Hills
f0b14055b6
Add new total_increasing state-class for Home Assistant 2021.9+ (#2166) 2021-08-18 11:04:13 +12:00
Franck Nijhof
ebabf0e7d8
Add Gas device class to DSMR component (#2169) 2021-08-17 21:43:51 +12:00
Jesse Hills
93796491af
Allow entities to be disabled by default in HA (#2113)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2021-08-10 13:45:31 +12:00