Fix Alexa ChangeReports Filter non-proactively_reported_properties (#30655)
* Fix Change Report Properties. * Fix Change Report Properties.pull/30662/head
parent
3f29c234b8
commit
d0062fc740
|
@ -503,6 +503,10 @@ class AlexaColorController(AlexaCapability):
|
|||
"""Return what properties this entity supports."""
|
||||
return [{"name": "color"}]
|
||||
|
||||
def properties_proactively_reported(self):
|
||||
"""Return True if properties asynchronously reported."""
|
||||
return True
|
||||
|
||||
def properties_retrievable(self):
|
||||
"""Return True if properties can be retrieved."""
|
||||
return True
|
||||
|
@ -548,6 +552,10 @@ class AlexaColorTemperatureController(AlexaCapability):
|
|||
"""Return what properties this entity supports."""
|
||||
return [{"name": "colorTemperatureInKelvin"}]
|
||||
|
||||
def properties_proactively_reported(self):
|
||||
"""Return True if properties asynchronously reported."""
|
||||
return True
|
||||
|
||||
def properties_retrievable(self):
|
||||
"""Return True if properties can be retrieved."""
|
||||
return True
|
||||
|
@ -590,6 +598,10 @@ class AlexaPercentageController(AlexaCapability):
|
|||
"""Return what properties this entity supports."""
|
||||
return [{"name": "percentage"}]
|
||||
|
||||
def properties_proactively_reported(self):
|
||||
"""Return True if properties asynchronously reported."""
|
||||
return True
|
||||
|
||||
def properties_retrievable(self):
|
||||
"""Return True if properties can be retrieved."""
|
||||
return True
|
||||
|
|
|
@ -255,6 +255,9 @@ class AlexaEntity:
|
|||
def serialize_properties(self):
|
||||
"""Yield each supported property in API format."""
|
||||
for interface in self.interfaces():
|
||||
if not interface.properties_proactively_reported():
|
||||
continue
|
||||
|
||||
for prop in interface.serialize_properties():
|
||||
yield prop
|
||||
|
||||
|
|
Loading…
Reference in New Issue