Open Altau38650 opened 1 year ago
I'm not sure what a "dashboard map" is, especially as related to sun2 entities. Also, the update rate of sun2 entities depends on its type. I.e., some sun2 entities update once a day, some update depending on some event (e.g., the sun rising above a certain elevation), etc. Can you tell me which type of sun2 entities you're using (e.g., could you share your sun2 configuration)?
Closing due to no response. Feel free to reopen if/when you care.
I have a similar question. I'm using the azimuth sensor for control of solar panel trackers. Currently it appears to update approx every 4 minutes in the middle of the day. Can this be adjusted through the configuration yaml ?
I chose to implement the azimuth sensor a bit differently than the others.
Usually (many of) the sensors update as required to maintain a certain increment between values. E.g., the elevation sensor updates so that it changes by 0.5 degrees on each update. However, it wasn't as easy to do the same with the azimuth sensor given the nature of its curve.
So, instead, I chose to implement its update frequency the same way the standard sun integration does. I.e., its update frequency depends on the elevation. It updates the most frequently for elevations between 0 and 10, and less and less often the further the elevation is away from that range. I'm not sure why the standard sun integration works that way, but again, I chose to simply duplicate its behavior for the azimuth sensor.
FWIW, here is where this is done:
So, right now, no, there's no way to change the update frequency of the azimuth sensor via the integration's configuration. You'd have to edit the code directly to do so. Which, of course, you can do.
Honestly, I've never really been happy with the implementation of the azimuth sensor. In fact, this integration didn't even have that sensor for a long time, which is why I chose the easy path of simply duplicating the standard sun integration's implementation, just to fill the gap in the integration.
I'm not sure I'd like to make the update frequency configurable. But it might make sense to make the update frequency for all elevations above -6 degrees be every 2 minutes (instead of only every 2 minutes for elevations between 0 - 10 degrees, and every 4 minutes for all other elevations above -6 degrees.) Would that suffice?
Thanks Phil. For my immediate needs, I've realised that the 4 minute update interval for azimuth isn't as big a problem as I was initially thinking. Refining to 2-minute updates as you've suggested would be a reasonable compromise I think.
Hello,
I have used sun2 entities in a dashboard map and I can see that the values are updated every 5 minutes. Can this be changed?
Thank you in advance and congratulations for this very useful tool.
-- Alain France