mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Linting
This commit is contained in:
parent
a4a175440b
commit
85c40d29ee
@ -133,7 +133,7 @@ class PerSecondIGDSensor(Entity):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def unit(self) -> str:
|
def unit(self) -> str:
|
||||||
"""Unit we are measuring in."""
|
"""Get unit we are measuring in."""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -196,11 +196,11 @@ class KBytePerSecondIGDSensor(PerSecondIGDSensor):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def unit(self) -> str:
|
def unit(self) -> str:
|
||||||
"""Unit we are measuring in."""
|
"""Get unit we are measuring in."""
|
||||||
return 'kbyte'
|
return 'kbyte'
|
||||||
|
|
||||||
async def _async_fetch_value(self) -> float:
|
async def _async_fetch_value(self) -> float:
|
||||||
""""""
|
"""Fetch value from device."""
|
||||||
if self._direction == IN:
|
if self._direction == IN:
|
||||||
return await self._device.async_get_total_bytes_received()
|
return await self._device.async_get_total_bytes_received()
|
||||||
|
|
||||||
@ -220,11 +220,11 @@ class PacketsPerSecondIGDSensor(PerSecondIGDSensor):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def unit(self) -> str:
|
def unit(self) -> str:
|
||||||
"""Unit we are measuring in."""
|
"""Get unit we are measuring in."""
|
||||||
return 'packets'
|
return 'packets'
|
||||||
|
|
||||||
async def _async_fetch_value(self) -> float:
|
async def _async_fetch_value(self) -> float:
|
||||||
""""""
|
"""Fetch value from device."""
|
||||||
if self._direction == IN:
|
if self._direction == IN:
|
||||||
return await self._device.async_get_total_packets_received()
|
return await self._device.async_get_total_packets_received()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user