mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-05 20:38:27 +02:00
Get Sunrise & Sunset for a Specific Date (#4712)
* Update real_time_clock.cpp * Update real_time_clock.h * Update sun.h * Update sun.h * Update sun.h * Enable the sunAtLocation to be used externally * Enable the sunAtLocation to be used externally * Update sun.h * Update sun.h * update * update * update to only use one function * Update sun.h * Update sun.cpp
This commit is contained in:
@@ -59,6 +59,8 @@ class Sun {
|
||||
|
||||
optional<time::ESPTime> sunrise(double elevation);
|
||||
optional<time::ESPTime> sunset(double elevation);
|
||||
optional<time::ESPTime> sunrise(time::ESPTime date, double elevation);
|
||||
optional<time::ESPTime> sunset(time::ESPTime date, double elevation);
|
||||
|
||||
double elevation();
|
||||
double azimuth();
|
||||
@@ -66,6 +68,7 @@ class Sun {
|
||||
protected:
|
||||
internal::HorizontalCoordinate calc_coords_();
|
||||
optional<time::ESPTime> calc_event_(bool rising, double zenith);
|
||||
optional<time::ESPTime> calc_event_(time::ESPTime date, bool rising, double zenith);
|
||||
|
||||
time::RealTimeClock *time_;
|
||||
internal::GeoLocation location_;
|
||||
|
||||
Reference in New Issue
Block a user