Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceMetrics ¶
type HomeMetrics ¶
type HomeMetrics struct {
// States contains all encountered home states. The current home state is set to true.
States map[string]bool
// ID of the home
ID int64
// Manual indicates that the current home mode is set manually
Manual bool
}
func (HomeMetrics) IsHome ¶
func (h HomeMetrics) IsHome() bool
type MetricDescriptors ¶
type MetricDescriptors struct {
// contains filtered or unexported fields
}
func NewMetricDescriptors ¶
func NewMetricDescriptors(prefix string) *MetricDescriptors
func (*MetricDescriptors) Describe ¶
func (d *MetricDescriptors) Describe(ch chan<- *prometheus.Desc)
type Metrics ¶
type Metrics struct {
Users UserMetrics
Devices map[string]DeviceMetrics
Zones map[string]ZoneMetrics
Weather WeatherMetrics
Home HomeMetrics
// contains filtered or unexported fields
}
func (Metrics) Collect ¶
func (m Metrics) Collect(ch chan<- prometheus.Metric)
func (Metrics) Describe ¶
func (m Metrics) Describe(ch chan<- *prometheus.Desc)
func (Metrics) WithMetricDescriptors ¶ added in v0.8.1
func (m Metrics) WithMetricDescriptors(descriptors *MetricDescriptors) Metrics
type OverlayMode ¶
type OverlayMode int
OverlayMode represents the current overlay mode of a zone.
const ( OverlayModeOff OverlayMode = iota OverlayModeManual OverlayModeTimer )
type UserMetrics ¶
type WeatherMetrics ¶
type WeatherMetrics struct {
// States contains all encountered weather states. The current weather state is set to true.
States map[string]bool
// SolarIntensity contains the solar intensity as a percentage (0.0 - 1.0)
SolarIntensity float32
// OutsideTemperature contains the outside temperature in degrees Celsius
OutsideTemperature float32
}
func (WeatherMetrics) Weather ¶
func (m WeatherMetrics) Weather() string
type ZoneMetrics ¶
type ZoneMetrics struct {
// Type is the type of system (heating, air conditioning, etc.)
Type string
// ID is the zone's unique identifier
ID int64
// OverlayMode indicates if the zone is controlled manually
OverlayMode OverlayMode
// OverlayRemaining is the remaining time in seconds for the manual control.
// This is only used when OverlayMode is [OverlayModeTimer]
OverlayRemaining time.Duration
// OpenWindowDuration is the amount of time that the window has been open
OpenWindowDuration time.Duration
// OpenWindowRemaining is the amount of time before heating is switched on again
OpenWindowRemaining time.Duration
// Temperature is the zone's temperature, in Celsius
Temperature float32
// Humidity is the zone's humidity, in percent (0.0 - 1.0)
Humidity float32
// TargetTemperature is the zone's target temperature
TargetTemperature float32
// OpenWindow is true if the window is open
OpenWindow bool
// Heating is true if the zone is being heated
Heating bool
}
Click to show internal directories.
Click to hide internal directories.