Can somebody help me with this, i want to switch between png file when status is ON or OFF
this is already working ( at /config/configuration.yaml):
‘’’’’’’’’’’’’’’’’’
homeassistant:
name: Home
unit_system: metric
customize:
switch.tuin_verlichting_waterornament:
friendly_name: Tuin verlichting
entity_picture: /local/GardenLight48_On.png
‘’’’’’’’
the entity “switch.tuin_verlichting_waterornament” has the .png icon at the dashboard, but it should change when it is OFF ( to icon /local/GardenLight48_Off.png)
i did try many codes but non was working
can somebody give be the correct direction
did something like this:
‘’’’’’’’
state_image:
“on”: /local/GardenLight48_On.jpg
“off”: /local/GardenLight48_Off.jpg
‘’’’’’’’
did something like this:
‘’’’’’’’
type: picture-entity
entity: switch.tuin_verlichting_waterornament
state_image:
“on”: /local/GardenLight48_On.png
“off”: /local/GardenLight48_Off.png
did something like this:
‘’’’’’’’
switch.tuin_verlichting_waterornament:
templates:
icon: if (state > 0) return ‘/local/GardenLight48_On.png’ ; return ‘/local/GardenLight48_Off.png’;
‘’’’’’’’
homeassistant:
customize:
# Add an entry for each entity that you want to overwrite.
switch.tuin_verlichting_waterornament:
friendly_name: Tuin verlichting
entity_picture: /local/Custom_icons/GardenLight48_Off.png
?? how to add to configuration.yaml
entity_picture: /local/Custom_icons/GardenLight48_On.png
OK for supporting . im a newbe and every week testing and learning about HA. I run for some years Domoticz now, but that has its limitations. So i hoping HA will do the job for me in future