Address late review for Fritz entity_category (#58141)

This commit is contained in:
Simone Chemelli
2021-10-21 08:36:52 +02:00
committed by GitHub
parent 50686bd06d
commit c7ff6eb5ee
2 changed files with 3 additions and 3 deletions

View File

@@ -27,7 +27,6 @@ from homeassistant.const import (
DATA_RATE_KILOBITS_PER_SECOND,
DATA_RATE_KILOBYTES_PER_SECOND,
DEVICE_CLASS_TIMESTAMP,
ENTITY_CATEGORY_CONFIG,
ENTITY_CATEGORY_DIAGNOSTIC,
SIGNAL_STRENGTH_DECIBELS,
)
@@ -198,7 +197,7 @@ SENSOR_TYPES: tuple[FritzSensorEntityDescription, ...] = (
name="Max Connection Upload Throughput",
native_unit_of_measurement=DATA_RATE_KILOBITS_PER_SECOND,
icon="mdi:upload",
entity_category=ENTITY_CATEGORY_CONFIG,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
value_fn=_retrieve_max_kb_s_sent_state,
),
FritzSensorEntityDescription(
@@ -206,7 +205,7 @@ SENSOR_TYPES: tuple[FritzSensorEntityDescription, ...] = (
name="Max Connection Download Throughput",
native_unit_of_measurement=DATA_RATE_KILOBITS_PER_SECOND,
icon="mdi:download",
entity_category=ENTITY_CATEGORY_CONFIG,
entity_category=ENTITY_CATEGORY_DIAGNOSTIC,
value_fn=_retrieve_max_kb_s_received_state,
),
FritzSensorEntityDescription(

View File

@@ -652,6 +652,7 @@ class FritzBoxWifiSwitch(FritzBoxBaseSwitch, SwitchEntity):
self._fritzbox_tools = fritzbox_tools
self._attributes = {}
self._attr_entity_category = ENTITY_CATEGORY_CONFIG
self._network_num = network_num
switch_info = SwitchInfo(