Hi,
I have created an input_select entity with AppDaemon and am trying to fill/overwrite it using the input_select.set_options service or select a option via the input_select.select service. Unfortunately without success…
Interestingly, it works when I do this with an input_select entity that I created using the Input Helper function.
Creating a HA entity is more complicated than just using a set_state(). As of this point, the only valid entities you can create using set_state() are sensor/binary_sensor. You have to create the entity in HA and then you can use call_service() to perform operations on the entity and listen_state() to watch it for state changes. There have been some other topics on this if you look around and there are probably some workarounds but IMO they are more effort than it is worth.
To add to this, you can create any entity you want in homeassistant it just won’t gain homeassistant’s service calls. It also won’t persist past a homeassistant reset.
Advantage is you can save these entities in a custom appdaemon namespace and have appdaemon also update those entities in homeassistant. Customs templates and scripts will react to appdaemon entities created in homeassitant.
This can be very useful for creating interesting entities for your HA UI. For example I have custom entities that have color as one of their attributes and I can use that attribute to change the way they are displayed in my UI. Having dramatic color changes is easy in python ,but gets very complicated if you try to implement it in HA.