Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions homekit/zeroconf_impl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ def add_service(self, zeroconf, zeroconf_type, name):
info = zeroconf.get_service_info(zeroconf_type, name)
if info is not None:
self.data.append(info)


def update_service(self, zc: "zeroconf.Zeroconf", type_: str, name: str) -> None:
"""Callback for state updates, which we ignore for now."""

def get_data(self):
"""
Use this method to get the data of the collected announcements.
Expand All @@ -49,19 +52,6 @@ def get_data(self):
"""
return self.data

def update_service(self, zeroconf, service_type, name, state_change):
# prevent FutureWarning: XXX has no update_service method. Provide one
# (it can be empty if you don't care about the updates), it'll become
# mandatory.
logging.debug(
'update_service zeroconf=%s service_type=%s name=%s state_change=%s',
zeroconf,
service_type,
name,
state_change,
)


def get_from_properties(props, key, default=None, case_sensitive=True):
"""
This function looks up the key in the given zeroconf service information properties. Those are a dict between bytes.
Expand Down