Fix incorrect unit (#53274)

This commit is contained in:
Marc Mueller 2021-07-21 19:12:32 +02:00 committed by GitHub
parent 772cbd59d7
commit 2d48d273a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT, SensorEntit
from homeassistant.config_entries import ConfigEntry from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ( from homeassistant.const import (
DATA_GIGABYTES, DATA_GIGABYTES,
DATA_RATE_KILOBITS_PER_SECOND,
DATA_RATE_KILOBYTES_PER_SECOND, DATA_RATE_KILOBYTES_PER_SECOND,
DEVICE_CLASS_TIMESTAMP, DEVICE_CLASS_TIMESTAMP,
) )
@ -113,14 +114,14 @@ SENSOR_DATA = {
state_provider=_retrieve_kb_s_received_state, state_provider=_retrieve_kb_s_received_state,
), ),
"max_kb_s_sent": SensorData( "max_kb_s_sent": SensorData(
name="Max kB/s sent", name="Max kbit/s sent",
unit_of_measurement=DATA_RATE_KILOBYTES_PER_SECOND, unit_of_measurement=DATA_RATE_KILOBITS_PER_SECOND,
icon="mdi:upload", icon="mdi:upload",
state_provider=_retrieve_max_kb_s_sent_state, state_provider=_retrieve_max_kb_s_sent_state,
), ),
"max_kb_s_received": SensorData( "max_kb_s_received": SensorData(
name="Max kB/s received", name="Max kbit/s received",
unit_of_measurement=DATA_RATE_KILOBYTES_PER_SECOND, unit_of_measurement=DATA_RATE_KILOBITS_PER_SECOND,
icon="mdi:download", icon="mdi:download",
state_provider=_retrieve_max_kb_s_received_state, state_provider=_retrieve_max_kb_s_received_state,
), ),