Skip to content
Merged
Changes from 4 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
7 changes: 6 additions & 1 deletion homeassistant/components/enigma2/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ def state(self):
return STATE_PLAYING
return STATE_OFF if self.e2_box.in_standby else STATE_ON

@property
def available(self):
"""Return True if the device is available."""
return self.e2_box.is_offline

@property
def supported_features(self):
"""Flag of media commands that are supported."""
Expand Down Expand Up @@ -249,7 +254,7 @@ def device_state_attributes(self):
currservice_begin: is in the format '21:00'.
currservice_end: is in the format '21:00'.
"""
if self.e2_box.in_standby:
if self.e2_box.in_standby or self.e2_box.is_offline:
Comment thread
reaper7 marked this conversation as resolved.
Outdated
return {}
return {
ATTR_MEDIA_CURRENTLY_RECORDING: self.e2_box.status_info["isRecording"],
Expand Down