Skip to content

/sensors/ response fields has changed #2

Description

@gene1wood

It looks like the response to the /sensors/ endpoint has changed. The library is expecting these fields

def __init__(self, id=None, uuid=None, user=None, bridge=None, last_bridge_hardware_id=None, name=None,
location_id=None, system_id=None, hardware_id=None, firmware_version=None, hardware_revision=None,
device_key=None, installed_at=None, calibrated_at=None, last_reported_at=None, missing_at=None,
updated_at=None, created_at=None, signal_strength=None, links=None, encryption_key=None, lqi=None, rssi=None):

however the current fields returned include surface_type and as a result a call like this

sensors = p.get_sensors()

results in this

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/gene/bin/r/PyNotion/PyNotion.py", line 73, in get_sensors
    sensors.append(Sensor(**sensor))
TypeError: __init__() got an unexpected keyword argument 'surface_type'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions