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:
@@ -2528,6 +2528,8 @@ color:
|
||||
red: 0%
|
||||
green: 1%
|
||||
blue: 100%
|
||||
- id: kbx_green
|
||||
hex: "3DEC55"
|
||||
|
||||
display:
|
||||
- platform: lcd_gpio
|
||||
|
Reference in New Issue
Block a user