Commit graph

124 commits

Author SHA1 Message Date
Christian
ae838b13a8
Update PulseLightEffect with range brightness (#4820)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-05-16 08:29:00 +12:00
spacemanspiff2007
4eb69d6af5
Fix restore (#4655)
* ALWAYS_OFF for fan

* ALWAYS_OFF for light

* ALWAYS_OFF for switch
2023-04-12 21:28:02 +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
Oxan van Leeuwen
14e38f0469
Upgrade clang-format to v13 (#4535)
* Upgrade clang-format to v13

* Apply clang-format-13 formatting changes

* Format

* Format bme_680

---------

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2023-03-20 03:38:41 +00:00
myhomeiot
57a1c207c2
Fix saving light state for restore modes LIGHT_RESTORE_AND_OFF/ON (#4131) 2022-12-22 20:57:53 +13:00
Jesse Hills
9273e3775b
Add vector includes (#4080) 2022-11-24 13:12:55 +13:00
André Klitzing
72cce391ab
Fix some typos found by codespell (#3598) 2022-06-27 18:02:46 -03:00
Guillermo Ruffino
f002a23d2d
Language schema 202204 (#3492) 2022-06-17 13:46:20 +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
Niorix
771162bfb1
light: add RESTORE_AND_OFF/RESTORE_AND_ON LightRestoreMode (#3238) 2022-02-21 12:52:14 +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
Jesse Hills
1c51cac5ba
Add initial_run to regular lambda light effect (#3059) 2022-01-21 11:09:07 +13:00
Oxan van Leeuwen
6383eca54a
Clean-up random helper functions (#3022) 2022-01-10 13:50:26 +13:00
Jesse Hills
33f17f75a0
Upgrade ArduinoJson to 6.18.5 and migrate code (#2844) 2022-01-01 22:31:43 +13:00
tony
9c0506592b
Add light.on_state trigger (#2868) 2021-12-13 09:19:57 +13:00
Oxan van Leeuwen
607601b3a4
Enable a bunch of clang-tidy checks (#2149) 2021-12-02 09:03:51 +13:00
Oxan van Leeuwen
bb9793d5b7
Enable addressable light power supply based on raw values (#2690) 2021-11-11 11:53:25 +13:00
Oxan van Leeuwen
07a9cb910f
Fix validation of addressable light IDs (#2588) 2021-10-21 20:07:37 +02:00
Paul Monigatti
4896f870f0
Fix: Color modes not being correctly used in light partitions (#2513) 2021-10-14 21:04:50 +13:00
Paul Monigatti
867fecd157
Fix: Light flash not restoring previous LightState (#2383)
* Update light state when transformer has finished

* Revert writing direct to output

* Correct handling of zero-length light transformers

* Allow transformers to handle zero-length transitions, and check more boundary conditions when transitioning back to start state

* Removed log.h

* Fixed race condition between LightFlashTransformer.apply() and is_finished()

* clang-format

* Step progress from 0.0f to 1.0f at t=start_time for zero-length transforms to avoid divide-by-zero
2021-10-13 21:59:52 +02:00
Oxan van Leeuwen
05388d2dfc
Fix light state remaining on after turn off with transition (#2509) 2021-10-14 08:53:00 +13:00
Jan Čermák
85461a752a
Fix color temperature persistence on CWWW lights (#2486) 2021-10-11 23:56:35 +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
Otto Winter
aec02afcdc
Fix clang-tidy header filter (#2385)
* Fix clang-tidy header filter

* Allow private members

* Fix clang-tidy detections

* Run clang-format

* Fix remaining detections

* Fix graph

* Run clang-format
2021-09-24 18:02:28 +02:00
Paul Monigatti
c51352d04d
Allow non-addressable lights in light partitions (#2256) 2021-09-22 13:59:21 +12: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
Oxan van Leeuwen
50da630811
Apply color brightness to addressable light effects (#2321) 2021-09-19 18:46:26 +02:00
Oxan van Leeuwen
68d547595e
Light transition fixes (#2320) 2021-09-19 18:31:20 +02:00
Matthew Mazzanti
8f3a739da7
Allow transforms and flashes to not update remote_values (#2313) 2021-09-16 05:59:58 +12:00
Jesse Hills
4cc2817fcd
Fix binary strobe (#2301) 2021-09-14 22:59:15 +12:00
Oxan van Leeuwen
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
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
Jesse Hills
e2d97b6f36
Light: include ON_OFF capability to BRIGHTNESS ColorMode (#2204) 2021-09-06 08:57:58 +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
Jesse Hills
39cd2838df
Revert "Light: include ON_OFF capability to BRIGHTNESS ColorMode (#2186)" (#2202)
This reverts commit b0fa317302.
2021-08-25 19:38:51 +12:00
Oxan van Leeuwen
518c271eba
Fix addressable light control without transitions & effects with transitions (#2187) 2021-08-23 20:44:24 +12:00
Oxan van Leeuwen
d71996e58d
Reduce static RAM usage (#2140) 2021-08-23 20:43:54 +12:00
Oxan van Leeuwen
2f33cd2db5
Remove double scheduling from addressable lights (#1963) 2021-08-23 20:00:38 +12:00
puuu
b0fa317302
Light: include ON_OFF capability to BRIGHTNESS ColorMode (#2186) 2021-08-21 22:26:24 +12:00
Maurice Makaay
607e1f823d
Minor code cleanup in light components (#2162)
Co-authored-by: Maurice Makaay <mmakaay1@xs4all.net>
2021-08-17 20:12:29 +12:00
Oxan van Leeuwen
0c370d5897
Initialize color temperature to value within range if possible (#2168) 2021-08-17 14:02:38 +12:00
Oxan van Leeuwen
46f17bea66
Modular light transformers (#2124) 2021-08-11 16:51:35 +12:00
Jesse Hills
d258e06fd7
Add rgbct and color_temperature light platforms (#2138)
Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
2021-08-10 21:28:56 +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
Oxan van Leeuwen
c038cf27a7
Don't discard cold/warm white brightness in constant brightness mode (#2136) 2021-08-10 13:30:29 +12:00
Jesse Hills
ea4a458214
Removed unused arguments from rgbww code (#2137) 2021-08-09 16:44:52 +12:00
Oxan van Leeuwen
1d6b4bfcef
Don't stop effects if brightness goes to zero (#2134) 2021-08-07 23:24:47 +12:00
Oxan van Leeuwen
cb21c7c18d
Fix crash when using addressable_set with out-of-range indices (#2120) 2021-08-05 11:30:32 +12:00