Skip to content

Commit

Permalink
feat(rest+2nd): remove state off
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlb committed Sep 11, 2024
1 parent 4f61c3e commit 0bec5bf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions custom_components/ha_hatch/riot_media_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from homeassistant.const import (
STATE_IDLE,
STATE_PLAYING,
STATE_OFF,
)
from hatch_rest_api import RestIot, RestoreIot, RIoTAudioTrack, REST_IOT_AUDIO_TRACKS
from .rest_entity import RestEntity
Expand Down Expand Up @@ -44,10 +43,7 @@ def _update_local_state(self):
if self.rest_device.is_playing:
self._attr_state = STATE_PLAYING
else:
if self.rest_device.is_on:
self._attr_state = STATE_IDLE
else:
self._attr_state = STATE_OFF
self._attr_state = STATE_IDLE
self._attr_extra_state_attributes["current"] = self.rest_device.current_playing
self._attr_extra_state_attributes["current_favorite"] = self.rest_device.current_id
self._attr_extra_state_attributes["current_step"] = self.rest_device.current_step
Expand Down

0 comments on commit 0bec5bf

Please sign in to comment.