Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.plant.DailyHistory Class Reference

Public Member Functions

def __init__ (self, max_length)
 
def add_measurement (self, value, timestamp=None)
 

Public Attributes

 max
 
 max_length
 

Private Member Functions

def _add_day (self, day, value)
 

Private Attributes

 _days
 
 _max_dict
 

Detailed Description

Stores one measurement per day for a maximum number of days.

At the moment only the maximum value per day is kept.

DEVELOPMENT OF THE PLANT INTEGRATION IS FROZEN
PENDING A DESIGN EVALUATION.

Definition at line 369 of file __init__.py.

Constructor & Destructor Documentation

◆ __init__()

def homeassistant.components.plant.DailyHistory.__init__ (   self,
  max_length 
)
Create new DailyHistory with a maximum length of the history.

Definition at line 378 of file __init__.py.

Member Function Documentation

◆ _add_day()

def homeassistant.components.plant.DailyHistory._add_day (   self,
  day,
  value 
)
private
Add a new day to the history.

Deletes the oldest day, if the queue becomes too long.

Definition at line 404 of file __init__.py.

◆ add_measurement()

def homeassistant.components.plant.DailyHistory.add_measurement (   self,
  value,
  timestamp = None 
)
Add a new measurement for a certain day.

Definition at line 385 of file __init__.py.

Member Data Documentation

◆ _days

homeassistant.components.plant.DailyHistory._days
private

Definition at line 381 of file __init__.py.

◆ _max_dict

homeassistant.components.plant.DailyHistory._max_dict
private

Definition at line 382 of file __init__.py.

◆ max

homeassistant.components.plant.DailyHistory.max

Definition at line 383 of file __init__.py.

◆ max_length

homeassistant.components.plant.DailyHistory.max_length

Definition at line 380 of file __init__.py.


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