class Steinel::HPD2

Included Modules

Defined in:

steinel/hpd2.cr

Constant Summary

NO_MATCH = [] of Interface::Sensor::Detail
TYPES = {illuminance: SensorType::Illuminance, temperature: SensorType::Temperature, humidity: SensorType::Humidity, presence: SensorType::Presence, people: SensorType::PeopleCount, illuminance_zones: SensorType::Illuminance, presence_zones: SensorType::Presence, people_zones: SensorType::PeopleCount}

Class Method Summary

Instance Method Summary

Class Method Detail

def self.driver_interface : String #

Instance Method Detail

def get_status #

[View source]
def on_load #

[View source]
def on_update #

[View source]
def sensor(mac : String, id : String | Nil = nil) : Interface::Sensor::Detail | Nil #
Description copied from module PlaceOS::Driver::Interface::Sensor

return the specified sensor details


[View source]
def sensors(type : String | Nil = nil, mac : String | Nil = nil, zone_id : String | Nil = nil) : Array(Interface::Sensor::Detail) #
Description copied from module PlaceOS::Driver::Interface::Sensor

return an array of sensor details zone_id can be ignored if location is unknown by the sensor provider mac_address can be used to grab data from a single device (basic grouping)


[View source]
def state : NamedTuple(illuminance: Interface::Sensor::Detail, temperature: Interface::Sensor::Detail, humidity: Interface::Sensor::Detail, presence: Interface::Sensor::Detail, people: Interface::Sensor::Detail, illuminance_zones: Array(Interface::Sensor::Detail), presence_zones: Array(Interface::Sensor::Detail), people_zones: Array(Interface::Sensor::Detail)) #

[View source]
def state? : NamedTuple(illuminance: Interface::Sensor::Detail, temperature: Interface::Sensor::Detail, humidity: Interface::Sensor::Detail, presence: Interface::Sensor::Detail, people: Interface::Sensor::Detail, illuminance_zones: Array(Interface::Sensor::Detail), presence_zones: Array(Interface::Sensor::Detail), people_zones: Array(Interface::Sensor::Detail)) | Nil #

[View source]