shauntarves / wyze-sdk

A modern Python client for controlling Wyze devices.
The Unlicense
304 stars 49 forks source link

events.list not executing properly #149

Closed liamhoganson closed 7 months ago

liamhoganson commented 11 months ago

When trying to execute: response = client.events.list(event_values= "[EventAlarmType.MOTION]")

I'm getting this error: kwargs.update({"event_value_list": [code for code in event_values.codes]}) AttributeError: 'str' object has no attribute 'codes'

shauntarves commented 7 months ago

Hi @liamhoganson, this isn't the correct syntax for the command you're trying to execute. You have the quotes in the wrong place. It should be:

from wyze_sdk.models.events import EventAlarmType
...
response = client.events.list(event_values= [EventAlarmType.MOTION])