mirror of
https://github.com/no2chem/wideq.git
synced 2025-05-16 07:10:09 -07:00
Show how to check device type
This commit is contained in:
parent
c696489de2
commit
fe77d66e96
@ -70,7 +70,12 @@ def ac_mon(client, device_id):
|
||||
its status such as its temperature and operation mode.
|
||||
"""
|
||||
|
||||
ac = wideq.ACDevice(client, client.get_device(device_id))
|
||||
device = client.get_device(device_id)
|
||||
if device.type != wideq.DeviceType.AC:
|
||||
print('This is not an AC device.')
|
||||
return
|
||||
|
||||
ac = wideq.ACDevice(client, device)
|
||||
|
||||
try:
|
||||
ac.monitor_start()
|
||||
|
Loading…
x
Reference in New Issue
Block a user