File: wink.py

package info (click to toggle)
python-netdisco 2.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 508 kB
  • sloc: python: 1,532; xml: 247; sh: 10; makefile: 8
file content (17 lines) | stat: -rw-r--r-- 588 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""Discover Wink hub devices."""
from typing import List  # noqa: F401

from . import SSDPDiscoverable
from ..ssdp import UPNPEntry  # noqa: F401


class Discoverable(SSDPDiscoverable):
    """Add support for discovering Wink hub devices."""

    def get_entries(self):
        """Return all Wink entries."""
        results = []  # type: List[UPNPEntry]
        results.extend(self.find_by_st('urn:wink-com:device:hub2:2'))
        results.extend(self.find_by_st('urn:wink-com:device:hub:2'))
        results.extend(self.find_by_st('urn:wink-com:device:relay:2'))
        return results