Since I would like to fine-tune the moment when my shutter-automation closes the shutters, I would prefer a much finer time-resolution around sun-set. And during the day I use my shutters for a shadowing-function, so even there I would prefer to configure shorter update intervals. Others might want to define shorter (or larger) intervals for other reasons throughout the day/night.
So my proposal is to have these 6 time-intervals as a configuration option, so everyone can set them according to the needs of the connected automations.
Could you explain this a little more in detail? I wasn’t aware of this and it does not seem to work the way I try it.
I guess you mean having a time_pattern trigger running e.g. every second that executes homeassistant.update_entity with the sun-elevation and sun-azimuth entities as targets? I can see the automation gets executed, but azimuth and elevation does not update.
Of course I did try “sun.sun” also, but it does not cause an update either.
What do you mean with “it doesn’t have any source information”?
The only source a sun-position calculation needs is the time, so I guess/hope the integration has access to the system-time?
The sensor entities only update when sun.sun does a calculation. If update_entity isn’t working then the sun.sun entity does not employ a method to allow it to update.
I doubt this FR will ever be added, I could see an update allowed on sun.sun though to make update_entity work. You may want to switch to sun2 a custom integration instead.
Thanks a lot for these information, I will have a look into sun2.
Just for reference and completeness to this FR, I read the discussion on the merge request https://github.com/home-assistant/core/pull/23832
So the whole motivation behind reducing the 30-seconds update interval that the sun integration had before was obviously to reduce the number of log-entries caused by this.
I totally disagree with the whole reasoning behind that change.
If log-entries cause problems, then this should be fixed, not the guy who writes to the logs. The log-level of the entity could be adopted, the logging could be disabled, filtered or in any other suitable way adopted. But the assumption, that position updates are “useless” is quite arbitrary, because it judges over “legitimate” or “useless” uses of sun’s position. A normal user of a sun-device wants exactly this, a regular, fine-granular and accurate update of the position of the sun – not more and not less, but no assumption by the author of that device what uses are “useless” and what are not.
So I guess in fact, I’m questioning the whole change of this merge request.
Whether this changes anything here or not is a different story, but I thought to document at least my point of view.