snsary.contrib.awair

Outputs raw (unaveraged) data from all sensors of a specified device every 5 minutes. The long period is necessary due to the severe rate limiting Awair have on their API.

Calling .discover() will auto-discover and return a list of AwairSensors associated with an account, which is more convenient than having to manually find and specify the details of each device. You can also call .discover_from_env, which expects:

  • AWAIR_TOKEN

Module Contents

class snsary.contrib.awair.AwairSensor(*, device_type, device_id, token)

Bases: snsary.sources.PollingSensor

property name
DEVICES_URL = 'https://developer-apis.awair.is/v1/users/self/devices'
DATA_URL = 'https://developer-apis.awair.is/v1/users/self/devices/{deviceType}/{deviceId}/air-data/raw?from={...'
PERIOD
classmethod discover_from_env()
classmethod discover(*, token)
sample(now, **kwargs)