Following the recent issue with HA 2019.9 and the suggestion to use config-template-card on elements inside on the picture-elements card, not outside the picture-elements card itself, this PR provides proper support for styles in elements.
Compared to the current implementation:
style can be defined inside element and will be applied to the resulting element
style defined at config-template-card level will be applied to the whole card and supports templates
I am not 100% sure the code is correct but according to my manual tests it does work.
The templated style is applied only for elements but I think it can be used also for the other types (cards and rows).
Following the recent issue with HA 2019.9 and the suggestion to use config-template-card on elements inside on the picture-elements card, not outside the picture-elements card itself, this PR provides proper support for styles in elements.
Compared to the current implementation:
style
can be defined insideelement
and will be applied to the resulting elementstyle
defined atconfig-template-card
level will be applied to the whole card and supports templatesI am not 100% sure the code is correct but according to my manual tests it does work.
The templated style is applied only for elements but I think it can be used also for the other types (cards and rows).
See also: