Skip to content
Merged
Changes from 2 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
6 changes: 4 additions & 2 deletions homeassistant/components/enigma2/media_player.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ def state(self):
"""Return the state of the device."""
if self.e2_box.is_recording_playback:
return STATE_PLAYING
return STATE_OFF if self.e2_box.in_standby else STATE_ON
if self.e2_box.in_standby or self.e2_box.is_offline:
Comment thread
frenck marked this conversation as resolved.
Outdated
return STATE_OFF
return STATE_ON

@property
def supported_features(self):
Expand Down Expand Up @@ -249,7 +251,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