Bridge¶
Bridge Class to host multiple HAP Accessories.
-
class
pyhap.accessory.Bridge(driver, display_name, iid_manager=None)[source]¶ A representation of a HAP bridge.
A Bridge can have multiple Accessories.
-
add_accessory(acc)[source]¶ Add the given
Accessoryto thisBridge.Every
Accessoryin aBridgemust have an AID and this AID must be unique among all theAccessoriesin the same Bridge. If the givenAccessory’s AID is None, a unique AID will be assigned to it. Otherwise, it will be verified that the AID is not the standalone aid (STANDALONE_AID) and that there is no otherAccessoryalready in thisBridgewith that AID.Note
A
Bridgecannot be added to anotherBridge.Parameters: acc (Accessory) – The Accessoryto be bridged.Raises: ValueError – When the given Accessoryis of categoryCATEGORY_BRIDGEor if the AID of theAccessoryclashes with anotherAccessoryalready in thisBridge.
-