Commit Graph

125 Commits

Author SHA1 Message Date
Oxan van Leeuwen cb21c7c18d Fix crash when using addressable_set with out-of-range indices (#2120) 2021-08-05 11:30:32 +12:00
Oxan van Leeuwen 0d104776bc Various follow-up fixes to color mode changes (#2118) 2021-08-05 11:28:39 +12:00
Oxan van Leeuwen ceb0564ebf Fix mixup between ColorMode and ColorCapability (#2121) 2021-08-04 12:32:42 +12:00
Oxan van Leeuwen 20f7eb7327 Add version argument to ESPDEPRECATED macro (#2116) 2021-08-04 10:43:01 +12:00
Oxan van Leeuwen 441d5bd44d Migrate COLOR constants to Color class & disallow implicit conversions to Color (#2093)
Co-authored-by: Xo Wang <xo@geekshavefeelings.com>
2021-08-04 09:21:57 +12:00
John K. Luebs 69c7cf783e Fix missing include in light_traits.h (#2105) 2021-08-02 07:13:46 +12:00
Oxan van Leeuwen 5983ccc55c Color mode implementation (#2012) 2021-07-29 19:11:56 +02:00
Oxan van Leeuwen 1652914d39 Make light.addressable_set color parameters behave as documented & consistent with elsewhere (#2009) 2021-07-28 19:49:43 +02:00
Oxan van Leeuwen fc0deb642a Fix white value transition for addressable lights (#2045) 2021-07-21 08:42:03 +12:00
Jesse Hills 07ae8ec553 Remove a whole bunch of deprecated/removed stuff (#1981) 2021-07-14 14:42:16 +12:00
Oxan van Leeuwen fb8ec79a52 Color brightness fixes (#2008) 2021-07-13 12:28:29 +12:00
Oxan van Leeuwen f9797825ad Change color model to fix white channel issues (#1895) 2021-07-08 21:37:47 +12:00
Oxan van Leeuwen 7051f897bc Validate color temperature values for RGBWW/CWWW lights (#1957)
Check if the color temperature of the cold white channel is colder (less) than
the warm white channel.
2021-06-24 00:07:27 +02:00
Oxan van Leeuwen 93f8ee7e60 Fix non-const global (#1907) 2021-06-15 09:12:06 +12:00
Oxan van Leeuwen 0efc1f06f2 Split files in light component (#1893) 2021-06-14 18:01:56 +02:00
Stefan Agner 501f88ca86 Avoid non-const globals and enable clang-tidy check (#1892) 2021-06-11 08:19:44 +12:00
Otto Winter 360effcb72 Activate some clang-tidy checks (#1884) 2021-06-10 13:04:40 +02:00
Oxan van Leeuwen ea0127e42b Simplify LightCall validation (#1874) 2021-06-09 17:01:05 +02:00
Otto Winter a33bb32874 Convert components to async-def syntax (#1823)
* Convert components to async-def syntax

* Remove stray @coroutine

* Manual part

* Convert complexer components code to async-def

* Manual cleanup

* More manual cleanup
2021-05-24 21:45:31 +02:00
Franck Nijhof 0ce57e5a39 Light & Switch Inverted Restore mode (#1810) 2021-05-24 08:20:11 +12:00
Otto Winter aebad04c0b Convert core components to async-def coroutine syntax (#1658)
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2021-05-23 22:10:30 +02:00
Guillermo Ruffino 3d6dcc9eee Add more json schema generation features (#1690)
* some enums

* extract enums, light effects remote_receiver etc

* more pins schema

* update to core changes
2021-05-14 20:35:39 -03:00
Christian Ferbar cc43e01e34 Add monochromatic effects: Pulse, Random (#1616) 2021-04-28 15:05:04 +12:00
Guillermo Ruffino 69879920eb add-black (#1593)
* Add black

Update pre commit

Update pre commit

add empty line

* Format with black
2021-03-07 16:03:16 -03:00
SenexCrenshaw ac25b138f5 Migrate ESPColor to Color (#1551)
* Migrate ESPColor to Color

* color.h constructor fix

* Updated componets to use Color
Added a using for ESPColor

* Lint fixes

* Fixed value error

* Update display components to use colorutil

* Updated to latest PR comments

* Fixed COLOR_WHITE

* Moved esp_scale to color_utils

* Rename color_utils to display_color_utils
2021-03-02 11:08:57 -03:00
Philipp Tölke f084ab339b Make fade_to*, lighten, and darken const (#1450) 2021-01-22 20:55:49 +13:00
Marvin Gaube c9caf44c2e Fix RGBW color-interlock control (#1325) 2020-10-15 09:48:12 -03:00
MartinWelsch 4988349677 Fix Light Trigger (#1308)
* make LightTransitionTransformer publish at end

* adjust on trigger + cleanup

* add target_state_reached_callback_

* fix format

* revert publish_at_end change

* fix bug for rapid on/off switching + remove debug logging

* formatting

* call state reached callback when no transition

Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-10-10 22:50:53 -03:00
Emil Hesslow 36e4a8b444 Stop infinite loop in light on_turn_on (#1219)
Co-authored-by: Otto Winter <otto@otto-winter.com>
2020-07-29 09:13:51 +02:00
Otto Winter 4996967c79 Add CODEOWNERS mechanism (#1199) 2020-07-25 15:57:18 +02:00
Otto Winter 32efa5d83e New script modes POC (#1168)
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
2020-07-25 14:20:51 +02:00
peq123 e5d4e12457 RGBWW - added channel interlock for RGB vs white (#1042)
* Update light_color_values.h

* Update light_color_values.h

* Update light_color_values.h

* Update light_color_values.h

* colour relative to white value

* Update light_state.cpp

* Update light_state.cpp

* Update light_state.cpp

* Update light_state.cpp

* Update light_color_values.h

* Update light_state.cpp

* linting

* Update light_state.cpp

* Update light_color_values.h

* more lint

* more lint

* Update light_state.cpp

* Update light_state.cpp

* Update light_state.cpp

* add optional interlock

* Update test1.yaml

* Update light_state.cpp

* Update light_state.h

* interlock

* optional interlock.

* interlock as trait

* color interlock as trait

* optional color interlock....

* optional color interlock

* Update light_color_values.h

* Lint checks....

* making travis happy

* making sure gamma_correct fix is included

* Update light_color_values.h

* making travis happy

* clang-format

* Code tidy

* Update light_color_values.h

* Update light_color_values.h
2020-07-09 20:29:44 -03:00
Niklas Wagner 8aedac81a5 RGBWW/CCT Lights: Fix gamma_correct when using constant_brightness (#1043) 2020-06-12 15:17:46 -03:00
Niklas Wagner 39b35b79ba Make initial run variable available to addressable_lambda (#1035)
* Make initial run variable available to addressable_lambda

* Fix linting

* Remove if clause
2020-04-28 19:24:06 -03:00
Guillermo Ruffino 31ae337931 add lights on off triggers (#1037)
* add lights on off triggers

* add test
2020-04-25 15:39:34 -03:00
kroimon 8613c02d5c Add constant_brightness property to CWWW/RGBWW lights (#1007)
Fixes https://github.com/esphome/feature-requests/issues/460

Co-authored-by: Otto Winter <otto@otto-winter.com>
2020-04-08 09:31:23 -03:00
Quinn Hosler 177617e6e3 Rgbww color fix (#967)
* RGBWW color vs white and brightness adjustments
2020-03-11 17:33:20 -07:00
Paul Nicholls 11069085e3 Fix esphome/issues#947 - RGBW(W) white brightness (#925) 2020-03-11 17:17:29 -07:00
Kamil Trzciński 3b689ef39c Add register_*_effect to allow registering custom effects (#947)
This allows to register custom effect from user components,
allowing for bigger composability of source.
2020-01-12 17:08:48 +01:00
Otto Winter 056c72d50d Drop Python 2 Support (#793)
* Remove Python 2 support

* Remove u-strings

* Remove docker symlinks

* Remove from travis

* Update requirements

* Upgrade flake8/pylint

* Fixes

* Manual

* Run pyupgrade

* Lint

* Remove base_int

* Fix

* Update platformio_api.py

* Update component.cpp
2019-12-07 18:28:55 +01:00
Otto Winter e9e92afc9e Optimize application loop speed (#860)
* Optimize application loop speed

* Also check call_loop

* Remove duplicate code

* Fixes
2019-12-04 16:03:37 +01:00
Otto Winter 1bf55c130b Format 2019-10-18 16:43:37 +02:00
Otto Winter 95a74a7f19 Addressable light transition (#750)
* Improve addressable light transition behavior

Fixes https://github.com/esphome/issues/issues/555

* Improve addressable flicker effect

See also https://github.com/esphome/feature-requests/issues/348

* Update addressable_light_effect.h

* Refactor

* Format

* Prevent divide by zero

* Fixes
2019-10-18 16:27:36 +02:00
Otto Winter aae633277f Fix strobe/flicker effect not using selected value (#749)
Fixes https://github.com/esphome/issues/issues/562
2019-10-17 19:15:02 +02:00
Otto Winter e15071228e Fix addressable light fade to black function (#752)
Fixes https://github.com/esphome/issues/issues/517
2019-10-17 16:53:55 +02:00
Otto Winter 93cfee8026 Fix strobe effect
Fixes https://github.com/esphome/issues/issues/620
2019-08-31 20:23:06 +02:00
Guillermo Ruffino 5c9755ecc1 fix missing schedule call (#690) 2019-08-11 12:30:47 +02:00
rnauber 5cd7f23065 Provide the lights current color to the addressable_lambda_effect. (#646)
* Provide the lights current color to the addressable_lambda_effect.

* Fix formatting

* More formatting

* Change the call signature of the lambda

* lint


Co-authored-by: olg <x>
2019-06-19 11:33:14 +02:00
Otto Winter 36f47ade70 Add Captive Portal (#624)
* WIP: Captive Portal

* Updates

* Updates

* Lint

* Fixes
2019-06-09 17:03:51 +02:00
Major Péter 970838ed09 Scan length for AddressableScanEffect (#608)
* Added scan_length to AddressableScanEffect (allow more than one LED)

* Added check for scan length being longer than addressable light

* Added config option 'scan_length' to AddressableScanEffect (default: 1)

* Renamed scan_length to scan_width, removed erroneous length check

* Fixed indentation issue in addressable_light_effect.h

Co-Authored-By: Otto Winter <otto@otto-winter.com>
2019-06-04 12:11:59 +02:00