ESPHome  2022.12.8
Public Member Functions | Protected Member Functions | Protected Attributes
esphome::sun::Sun Class Reference

#include <sun.h>

Public Member Functions

void set_time (time::RealTimeClock *time)
time::RealTimeClockget_time () const
void set_latitude (double latitude)
void set_longitude (double longitude)
optional< time::ESPTimesunrise (double elevation)
optional< time::ESPTimesunset (double elevation)
double elevation ()
double azimuth ()

Protected Member Functions

internal::HorizontalCoordinate calc_coords_ ()
optional< time::ESPTimecalc_event_ (bool rising, double zenith)

Protected Attributes

internal::GeoLocation location_

Detailed Description

Definition at line 53 of file sun.h.

Member Function Documentation

◆ azimuth()

double esphome::sun::Sun::azimuth ( )

Definition at line 314 of file sun.cpp.

◆ calc_coords_()

HorizontalCoordinate esphome::sun::Sun::calc_coords_ ( )

Definition at line 277 of file sun.cpp.

◆ calc_event_()

optional< time::ESPTime > esphome::sun::Sun::calc_event_ ( bool  rising,
double  zenith 

Definition at line 290 of file sun.cpp.

◆ elevation()

double esphome::sun::Sun::elevation ( )

Definition at line 313 of file sun.cpp.

◆ get_time()

time::RealTimeClock* esphome::sun::Sun::get_time ( ) const

Definition at line 56 of file sun.h.

◆ set_latitude()

void esphome::sun::Sun::set_latitude ( double  latitude)

Definition at line 57 of file sun.h.

◆ set_longitude()

void esphome::sun::Sun::set_longitude ( double  longitude)

Definition at line 58 of file sun.h.

◆ set_time()

void esphome::sun::Sun::set_time ( time::RealTimeClock time)

Definition at line 55 of file sun.h.

◆ sunrise()

optional< time::ESPTime > esphome::sun::Sun::sunrise ( double  elevation)

Definition at line 311 of file sun.cpp.

◆ sunset()

optional< time::ESPTime > esphome::sun::Sun::sunset ( double  elevation)

Definition at line 312 of file sun.cpp.

Field Documentation

◆ location_

internal::GeoLocation esphome::sun::Sun::location_

Definition at line 71 of file sun.h.

◆ time_

time::RealTimeClock* esphome::sun::Sun::time_

Definition at line 70 of file sun.h.

The documentation for this class was generated from the following files: