It is done in corresponding functions associated with every card: if a state of the shown entity is updated - the card is re-rendered.
Right , as he said, when the Device came online and changed the state(battery_level).
(some cards might not be well-written, and with various update features)
I will end here thanks for the conversation
Sorry, these are merely someone’s assumptions, in fact all stock cards (not to mention more-info) track for the changed “states” object and call their “render()” functions.
Seems like ICON is Not related to the Entities-State ( In the State-Engine ) ( So change of Icon won’t trigger state-engine )( could be bc it’s not a feature )
So again you confirm Francois findings
Settle with it or confirm his findings as i believe you have IPhone
It is related since it is a part of an entity (as well as entity picture). See no confirmation here.
This is a reason: How to remove a YAML entity customization - #15 by Ildar_Gabdullin
This You linked to ? , Yes You think !, and You have not tested, where/how can it not be Updated ?
Not sure I understood your question.
I you are asking why entities created by a Mobile App integration may become not updated - there are at least 2 reasons:
- When a mobile device is not connected to wifi (due to many reasons) - then the integration stops getting data from a brethren Companion App.
- In fact, even when a mobile is connected to WiFi, its entities may be not updated as well! Sometimes opening the Companing App helps (data start being updated again), sometimes you need to press a corr. button in the Companion App (called smth like “Update”). This glitch is the reason why I consider this Mobile App integration as rather unreliable.
No changes/updates was either requested, nor performed to/from the Phone ( I Know )
He changed an entity Added/Removed an Icon, In UI
I did say he “could” find these changes under /Entities , Which he confirmed “Default Icon”
This He would also be able to see in core.entities, as i also said
If You change a name or icon on entities, if will also immediately be reflected/updated , in his core.entities ( If you do these changes manually, no restart needed )
a browser refresh would also show the changes in integration and Card/view
His Changes was in config.yaml, and restarted was required, and after that he saw in /entities it had Default Icon,
He would also have found this in core.entities( or should have )
NOTE: I’ve tested on a Device which was/is Unavailable … Not plugged in(obvious not a phone ![]()
But State-Engine/Recorder/DB Might not Have registered any Changes, Because either Device/Entity was/is “still unavailable”(State) Or, Battery_Level % Did not changed(State)(obvious if the device/entity was unavailable) …
State-Engine wakes up, when Device/Entity come Online, Saying … Im here! , please change my Status, and Changes since last time we connected( Recorder/DB )
I also have found changes made via the companion App even outside my home network, update immediately in my system.
I agree with this ![]()
I have tested this across quite a few devices.
Thank you all for your participation in this conversation.
After reading all your inputs, I’m not sure I’m closer to a solution.
I’m just an HA newbie and all I wanted to know is if HA’s behavior, in my particular case, is normal or not.
My initial understanding was that adding/removing a customization in configuration.yaml only requires a yaml reload or an HA restart to take effect. My little experiment prove that other parameters are in play.
Just a quick recap:
- In a dashboard, I added a tile card to show the status of my iPad battery level. The sensor value is 40% and the shown icon is the custom entity_picture declared in configuration.yaml. I didn’t check if the custom icon was shown anywhere else in HA.
- My experiment is over, so I want to put everything back to the way it was.
- I removed the entity_picture customization in configuration.yaml.
- I performed a YAML reload → the custom icon is still shown in the tile card.
- I refreshed the dashboard web page → the custom icon is still shown in the tile card.
- I cleared the web cache and refreshed the web page → the custom icon is still shown in the tile card.
- I restarted HA → the custom icon is still shown in the tile card.
- I rebooted HA platform (raspberry Pi) → the custom icon is still shown in the tile card.
- I repeated step 4 to 8 a few times → the custom icon is still shown in the tile card.
- I checked, in Developer Tools/states/, the iPad battery level sensor entity shows the custom entity_picture listed in the attributes even if it was removed from configuration.yaml in step 1.
- I checked, in Settings/Devices & services/Entities, the iPad battery level sensor entity shows the default icon on the main Entities page, but if I click on the entity, the icon shown on the History pop-up is the custom icon.
- After reading @Ildar_Gabdullin initial reply, he suggested that an entity state change would also make the customization take effect. I knew from previous experiments that iPhone and iPads HA sensors are updated using an algorithm that focus on preserving battery consumption. So, I picked up my iPad and opened the main page to force a battery level HA sensor update. In less than a second, the iPad battery level on the tile card went from 40% to 30% and the shown icon went from custom to default.
- I checked, in Developer Tools/states/, the iPad battery level sensor entity didn’t show the custom entity_picture in the attributes.
- I checked, in Settings/Devices & services/Entities, the iPad battery level sensor entity shows the default icon on the main Entities page and also in the History pop-up.
Now, was this behavior due to a state change or a device regaining consciousness, I don’t know.
Is it normal? I still don’t know.
But what I understand is, for now, a customization declared in configuration.yaml takes effect not only with a YAML reload (or HA restart or HA reboot), but also if other parameters are met. I hope this list of parameters is listed somewhere.
I leave the follow up to the experts.
fwiw, this all might be moot, (not saying you’re late to the party…
)
HA devs are actively discouraging the use of customize:, especially so for these types of configuration options.
I do use (still only) use a few myself, but just so you are aware.
Only mentioning this so you’re not going to customize all of your entities, while you should probably either override icons in the UI, or set template entities with customized pictures.
(no we can not set an entity_picture in the UI, that is a very longstanding FR and yet unanswered)
You need to:
- Either restart HA.
- Or go to “Dev tools - yaml - reload customizations”, then await for a state change or reload a corresponding config entry in “Settings - Integrations”.
If you are saying that these actions did not help you to customize an entity_picture for a MobileApp entity - then (as I assumed above) in both cases there is a chance that the state will not be changed if the physical device is not available.
Ps. In my experience MobileApp is one of most unreliable integrations since with every 5 devices which I used for testing (from iPhone 5s to iPhone 15) all data coming from a device could stop being updated any moment, so I cannot rely on this integration for person tracking.