Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106377

Entity customization for appdeamon created sensors

$
0
0

Hey

created a appdaemon script to create some sensors about rubbish collection data scraped from my local council.
I was trying to customize the icon (and then move onto trying to get colour to change based on state etc)
but despite adding the data in the the configuration.yaml I still get the default icon.

I noticed when ever I restart home assistant the entity seems to get deleted so I’ve had to set the entity_state in the init as well as the timed callback so I assume this has something to do with it, its created after customization is applied or something like that any ideas ?

script snippet:

        self.set_state("sensor.bin_date", state = BinCollectionFriendlyDate)
        self.set_state("sensor.bin_colour", state = BinCollectionType)
        self.set_state("sensor.bin2_colour", state = Bin2CollectionType)

configuration.yaml snipped

homeassistant:
  customize:
    sensor.bin_colour:
      friendly_name: Bin Colour
      icon: mdi:delete
    sensor.bin_date:
      friendly_name: Bin Collection Date
      icon: mdi:calendar-clock
    sensor.bin2_colour:
      friendly_name: 2nd Bin Colour
      icon: mdi:delete

p.s i rolled the dice on whether this was a config issue or a appdaemon script issue I went with I messed up the config but if this should live in the appdaemon section applogies in advance ! :slight_smile:

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106377

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>