1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 03:12:20 +01:00

Feat: add support for hex color in color component (#4493)

* Feat: add support for hex color in color component

* Chore: move hex color validator to color component

* Chore: add test

* Chore: fix formatting

* Chore: make linter happy

* Chore: make linter happy

* Fix: parse correct offsets

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

* Chore: use cv.Invalid

* Fix: remove # because it indicates a comment in yaml

* Fix: only allow hex if no other color value is set

* Fix: tests

* Fix: mutual exclusion of raw and hex colors

* Chore: format file

* Update __init__.py

---------

Co-authored-by: Oxan van Leeuwen <oxan@oxanvanleeuwen.nl>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Dorian Zedler
2023-03-12 21:26:27 +01:00
committed by GitHub
parent 5a56644702
commit 32a0a60480
2 changed files with 46 additions and 15 deletions

View File

@@ -2528,6 +2528,8 @@ color:
red: 0%
green: 1%
blue: 100%
- id: kbx_green
hex: "3DEC55"
display:
- platform: lcd_gpio