Skip to content

Latest commit

 

History

History
79 lines (49 loc) · 1.46 KB

power_sensor.md

File metadata and controls

79 lines (49 loc) · 1.46 KB

power_sensor

This module implements a power usage sensor based on the Emporia Vue Gen2 device.

RecordScale Objects

class RecordScale(Enum)

Task priority levels.

CacheEntry Objects

class CacheEntry()

Represent a cached information for a particular scale.

The cached information is considered expired when the scale time unit has rolled over. For instance, a RecordScale.SECOND.value cache entry expires on each second, a RecordScale.MINUTE cache entry expires on each new minute ...

value

@property
def value() -> dict

Return the current cache entry stored value.

has_expired

def has_expired() -> bool

Return True if the entry value has expired.

PowerSensor Objects

class PowerSensor(Sensor)

This Sensor class implementation provides power consumption readings.

read

@Pyro5.api.expose
def read(**kwargs: dict) -> dict

Return an instant record from the sensor.

The optional SCALE RecordScale parameter indicates which time unit resolution should be used. RecordScale.MINUTE is used by default.

The optional TIME parameter indicates the instant the power record should be from.