Skip to content
This repository was archived by the owner on Oct 1, 2021. It is now read-only.

Commit dffaee1

Browse files
rytilahtiballoob
authored andcommitted
Ignore bravia televisions from songpal detection (#180)
It was discovered that sony bravia televisions do also use the very same protocol for communication as "songpal" component, causing them to be added to homeassistant although all relevant parts for them are not yet supported. This patch adds an ignore for those devices for the time being, at some later point the python-songpal will likely be extended to work more properly on those devices and this may be removed. Related to home-assistant/core#13022
1 parent e59754f commit dffaee1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

netdisco/discoverables/songpal.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,21 @@ class Discoverable(SSDPDiscoverable):
1010

1111
def get_entries(self):
1212
"""Get all the Songpal devices."""
13-
return self.find_by_st(
13+
devs = self.find_by_st(
1414
"urn:schemas-sony-com:service:ScalarWebAPI:1")
1515

16+
# At least some Bravia televisions use this API for communication.
17+
# Based on some examples they always seem to lack modelNumber,
18+
# so we use it here to keep them undiscovered for now.
19+
non_bravias = []
20+
for dev in devs:
21+
if 'device' in dev.description:
22+
device = dev.description['device']
23+
if 'modelNumber' in device:
24+
non_bravias.append(dev)
25+
26+
return non_bravias
27+
1628
def info_from_entry(self, entry):
1729
"""Get information for a device.."""
1830
info = super().info_from_entry(entry)

0 commit comments

Comments
 (0)