Improve stability of homekit media players (#35080)
This commit is contained in:
1 parent
a083eb334e
commit
bd882fa4e4
5 files changed
+125
-35
No files matched your search
@@ -275,13 +275,12 @@ def get_accessory(hass, driver, state, aid, config):
|
||||
|
||||
elif state.domain == "media_player":
|
||||
device_class = state.attributes.get(ATTR_DEVICE_CLASS)
|
||||
feature_list = config.get(CONF_FEATURE_LIST)
|
||||
feature_list = config.get(CONF_FEATURE_LIST, [])
|
||||
|
||||
if device_class == DEVICE_CLASS_TV:
|
||||
a_type = "TelevisionMediaPlayer"
|
||||
else:
|
||||
if feature_list and validate_media_player_features(state, feature_list):
|
||||
a_type = "MediaPlayer"
|
||||
elif validate_media_player_features(state, feature_list):
|
||||
a_type = "MediaPlayer"
|
||||
|
||||
elif state.domain == "sensor":
|
||||
device_class = state.attributes.get(ATTR_DEVICE_CLASS)
|
||||
|
||||
Reference in new issue
Block a user