mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 20:55:10 +02:00
Improve type hints in yamaha_musiccast number (#76467)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""Number entities for musiccast."""
|
||||
from __future__ import annotations
|
||||
|
||||
from aiomusiccast.capabilities import NumberSetter
|
||||
|
||||
@@ -50,10 +51,10 @@ class NumberCapability(MusicCastCapabilityEntity, NumberEntity):
|
||||
self._attr_native_step = capability.value_range.step
|
||||
|
||||
@property
|
||||
def native_value(self):
|
||||
def native_value(self) -> float | None:
|
||||
"""Return the current value."""
|
||||
return self.capability.current
|
||||
|
||||
async def async_set_native_value(self, value: float):
|
||||
async def async_set_native_value(self, value: float) -> None:
|
||||
"""Set a new value."""
|
||||
await self.capability.set(value)
|
||||
|
Reference in New Issue
Block a user