Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jun 3, 2024
1 parent 32d2c18 commit bf46583
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion custom_components/yoto/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,4 @@ async def async_set_sleep_timer(self, player_id: str, time: int) -> None:
await self.async_check_and_refresh_token()
await self.hass.async_add_executor_job(
self.yoto_manager.set_sleep, player_id, str(time)
)
)
8 changes: 2 additions & 6 deletions custom_components/yoto/number.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from homeassistant.components.number import (
NumberEntity,
NumberEntityDescription,
NumberMode,
)

from homeassistant.const import PERCENTAGE
Expand Down Expand Up @@ -67,7 +66,7 @@
native_min_value=0,
native_max_value=46500,
native_step=1,
)
),
)


Expand Down Expand Up @@ -114,7 +113,6 @@ def native_value(self) -> float | None:
return 100
else:
return getattr(self.player.config, self._key)


@property
def native_min_value(self):
Expand Down Expand Up @@ -150,7 +148,5 @@ async def async_set_native_value(self, value: float) -> None:
self.player.id, self._key, value
)
elif self._key == "sleep_timer_seconds_remaining":
await self.coordinator.async_set_sleep_timer(
self.player.id, value
)
await self.coordinator.async_set_sleep_timer(self.player.id, value)
self.async_write_ha_state()

0 comments on commit bf46583

Please sign in to comment.