Improve type hints in yamaha_musiccast number (#76467)
This commit is contained in:
parent
46d3f2e14c
commit
0edf82fcb4
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue