sunpeek.components.base.SensorSlot#

class sunpeek.components.base.SensorSlot(name, sensor_type, descriptive_name=None, virtual=IsVirtual.never, description=None)#

Bases: object

A pydantic class used to hold and validate information on a component sensor slot.

Parameters:
  • name (str) – The name of the slot, which behaves like a component attribute and can be used to access the mapped sensor from the component. e.g. te_amb. name only needs to be unique and understandable in the context of a specific component, e.g. the tp slot of a plant includes the total power of all arrays, whereas tp of an array is just that array’s power.

  • descriptive_name (str) – A longer more descriptive name, e.g. for display to a user in a front end client. Limited to 24 characters

  • description (str) – A description of the purpose and use of the slot.

  • virtual (enum) – Whether the sensor for a slot is always virtual, can be virtual given certain conditions, or is never virtual

Methods

__init__(name, sensor_type[, ...])