Update interfaces so they all inherit from Device (#893)

Brings consistency to the api across Smart and Iot so the interfaces can be used for their specialist methods as well as the device methods (e.g. turn_on/off).
This commit is contained in:
Steven B
2024-05-02 13:55:08 +01:00
committed by GitHub
parent b2194a1c62
commit 28d41092e5
4 changed files with 14 additions and 8 deletions

View File

@@ -46,7 +46,9 @@ AVAILABLE_BULB_EFFECTS = {
}
class SmartDevice(Device, Bulb, Fan):
# Device must go last as the other interfaces also inherit Device
# and python needs a consistent method resolution order.
class SmartDevice(Bulb, Fan, Device):
"""Base class to represent a SMART protocol based device."""
def __init__(