All devices should have an option to set a custom icon with duplicating everything into the customize.yaml.
As they don’t have this option how is it duplication?
I get what you are saying though. It would be nice to have all the configuration options for an entity in the one place.
What I mean is that I need to create a separate piece of code into customize.yaml in order to set an icon
This feature request just appeared and as its something I have considered it as being very useful I think I will add a Vote for it.
Pretty much as you have said @tom_l I find it strange that the full range of options for configuring sensors including custom icon, swap icon for state change, etc is not available in the sensor config.
For instance to get my sensor to display a custom icon which changes colour for state I do (what someone else figured out and I have reused):
# Slow Sand Filter
# HI LVL
ssfilt_hi_lvl:
entity_picture_template: >-
{% if is_state('binary_sensor.slow_sand_filter_hi_lvl', 'on') %}
/local/images/lowLevel.png
{% else %}
/local/images/HIHILevel.png
{% endif %}
friendly_name: Slow Sand Filter HI LVL
value_template: "{{ is_state('binary_sensor.slow_sand_filter_hi_lvl', 'on') }}"
For me I have probably used that same modification maybe 50 times atm and no doubt will be reusing it many more times.
So that requires two sensor configs to get the one I need working. It really doesn’t make too much sense to me to continue to do it that way I reckon?
Please, could you have a little think about this issue HA developers?
But at the same time thanks for building such a fantastic product you should all be proud! So much so that it feels like I’m standing on the heads of giants around this community!
Cheers!
I agree, it absolutely awesome, I’m not well versed into python, but I’m making my way through YAML and get stuff to work, custom icons, flashing icons, toggling between two icons, displaying custom text for sensors, etc… I’m not inventing anything, but figuring out new ways to get stuff done with what’s available