diff --git a/homeassistant/components/brother/sensor.py b/homeassistant/components/brother/sensor.py index 103e4b4ef08d..2768d0922fbf 100644 --- a/homeassistant/components/brother/sensor.py +++ b/homeassistant/components/brother/sensor.py @@ -45,35 +45,30 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( BrotherSensorEntityDescription( key="status", translation_key="status", - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.status, ), BrotherSensorEntityDescription( key="page_counter", translation_key="page_counter", state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.page_counter, ), BrotherSensorEntityDescription( key="bw_counter", translation_key="bw_pages", state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.bw_counter, ), BrotherSensorEntityDescription( key="color_counter", translation_key="color_pages", state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.color_counter, ), BrotherSensorEntityDescription( key="duplex_unit_pages_counter", translation_key="duplex_unit_page_counter", state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.duplex_unit_pages_counter, ), BrotherSensorEntityDescription( @@ -81,21 +76,18 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="drum_remaining_life", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.drum_remaining_life, ), BrotherSensorEntityDescription( key="drum_remaining_pages", translation_key="drum_remaining_pages", state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.drum_remaining_pages, ), BrotherSensorEntityDescription( key="drum_counter", translation_key="drum_page_counter", state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.drum_counter, ), BrotherSensorEntityDescription( @@ -103,21 +95,18 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="black_drum_remaining_life", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.black_drum_remaining_life, ), BrotherSensorEntityDescription( key="black_drum_remaining_pages", translation_key="black_drum_remaining_pages", state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.black_drum_remaining_pages, ), BrotherSensorEntityDescription( key="black_drum_counter", translation_key="black_drum_page_counter", state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.black_drum_counter, ), BrotherSensorEntityDescription( @@ -125,21 +114,18 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="cyan_drum_remaining_life", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.cyan_drum_remaining_life, ), BrotherSensorEntityDescription( key="cyan_drum_remaining_pages", translation_key="cyan_drum_remaining_pages", state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.cyan_drum_remaining_pages, ), BrotherSensorEntityDescription( key="cyan_drum_counter", translation_key="cyan_drum_page_counter", state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.cyan_drum_counter, ), BrotherSensorEntityDescription( @@ -147,21 +133,18 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="magenta_drum_remaining_life", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.magenta_drum_remaining_life, ), BrotherSensorEntityDescription( key="magenta_drum_remaining_pages", translation_key="magenta_drum_remaining_pages", state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.magenta_drum_remaining_pages, ), BrotherSensorEntityDescription( key="magenta_drum_counter", translation_key="magenta_drum_page_counter", state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.magenta_drum_counter, ), BrotherSensorEntityDescription( @@ -169,21 +152,18 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="yellow_drum_remaining_life", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.yellow_drum_remaining_life, ), BrotherSensorEntityDescription( key="yellow_drum_remaining_pages", translation_key="yellow_drum_remaining_pages", state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.yellow_drum_remaining_pages, ), BrotherSensorEntityDescription( key="yellow_drum_counter", translation_key="yellow_drum_page_counter", state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.yellow_drum_counter, ), BrotherSensorEntityDescription( @@ -191,7 +171,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="belt_unit_remaining_life", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.belt_unit_remaining_life, ), BrotherSensorEntityDescription( @@ -199,7 +178,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="fuser_remaining_life", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.fuser_remaining_life, ), BrotherSensorEntityDescription( @@ -207,7 +185,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="laser_remaining_life", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.laser_remaining_life, ), BrotherSensorEntityDescription( @@ -215,7 +192,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="pf_kit_1_remaining_life", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.pf_kit_1_remaining_life, ), BrotherSensorEntityDescription( @@ -223,7 +199,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="pf_kit_mp_remaining_life", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.pf_kit_mp_remaining_life, ), BrotherSensorEntityDescription( @@ -231,7 +206,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="black_toner_remaining", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.black_toner_remaining, ), BrotherSensorEntityDescription( @@ -239,7 +213,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="cyan_toner_remaining", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.cyan_toner_remaining, ), BrotherSensorEntityDescription( @@ -247,7 +220,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="magenta_toner_remaining", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.magenta_toner_remaining, ), BrotherSensorEntityDescription( @@ -255,7 +227,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="yellow_toner_remaining", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.yellow_toner_remaining, ), BrotherSensorEntityDescription( @@ -263,7 +234,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="black_ink_remaining", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.black_ink_remaining, ), BrotherSensorEntityDescription( @@ -271,7 +241,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="cyan_ink_remaining", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.cyan_ink_remaining, ), BrotherSensorEntityDescription( @@ -279,7 +248,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="magenta_ink_remaining", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.magenta_ink_remaining, ), BrotherSensorEntityDescription( @@ -287,7 +255,6 @@ SENSOR_TYPES: tuple[BrotherSensorEntityDescription, ...] = ( translation_key="yellow_ink_remaining", native_unit_of_measurement=PERCENTAGE, state_class=SensorStateClass.MEASUREMENT, - entity_category=EntityCategory.DIAGNOSTIC, value=lambda data: data.yellow_ink_remaining, ), BrotherSensorEntityDescription( diff --git a/tests/components/brother/snapshots/test_sensor.ambr b/tests/components/brother/snapshots/test_sensor.ambr index 5d703ca7524c..64b8a6cdcaec 100644 --- a/tests/components/brother/snapshots/test_sensor.ambr +++ b/tests/components/brother/snapshots/test_sensor.ambr @@ -14,7 +14,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_b_w_pages', 'has_entity_name': True, 'hidden_by': None, @@ -68,7 +68,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_belt_unit_remaining_lifetime', 'has_entity_name': True, 'hidden_by': None, @@ -122,7 +122,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_black_drum_page_counter', 'has_entity_name': True, 'hidden_by': None, @@ -176,7 +176,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_black_drum_remaining_lifetime', 'has_entity_name': True, 'hidden_by': None, @@ -230,7 +230,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_black_drum_remaining_pages', 'has_entity_name': True, 'hidden_by': None, @@ -284,7 +284,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_black_toner_remaining', 'has_entity_name': True, 'hidden_by': None, @@ -338,7 +338,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_color_pages', 'has_entity_name': True, 'hidden_by': None, @@ -392,7 +392,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_cyan_drum_page_counter', 'has_entity_name': True, 'hidden_by': None, @@ -446,7 +446,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_cyan_drum_remaining_lifetime', 'has_entity_name': True, 'hidden_by': None, @@ -500,7 +500,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_cyan_drum_remaining_pages', 'has_entity_name': True, 'hidden_by': None, @@ -554,7 +554,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_cyan_toner_remaining', 'has_entity_name': True, 'hidden_by': None, @@ -608,7 +608,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_drum_page_counter', 'has_entity_name': True, 'hidden_by': None, @@ -662,7 +662,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_drum_remaining_lifetime', 'has_entity_name': True, 'hidden_by': None, @@ -716,7 +716,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_drum_remaining_pages', 'has_entity_name': True, 'hidden_by': None, @@ -770,7 +770,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_duplex_unit_page_counter', 'has_entity_name': True, 'hidden_by': None, @@ -824,7 +824,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_fuser_remaining_lifetime', 'has_entity_name': True, 'hidden_by': None, @@ -878,7 +878,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_magenta_drum_page_counter', 'has_entity_name': True, 'hidden_by': None, @@ -932,7 +932,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_magenta_drum_remaining_lifetime', 'has_entity_name': True, 'hidden_by': None, @@ -986,7 +986,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_magenta_drum_remaining_pages', 'has_entity_name': True, 'hidden_by': None, @@ -1040,7 +1040,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_magenta_toner_remaining', 'has_entity_name': True, 'hidden_by': None, @@ -1094,7 +1094,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_page_counter', 'has_entity_name': True, 'hidden_by': None, @@ -1148,7 +1148,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_pf_kit_1_remaining_lifetime', 'has_entity_name': True, 'hidden_by': None, @@ -1200,7 +1200,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_status', 'has_entity_name': True, 'hidden_by': None, @@ -1303,7 +1303,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_yellow_drum_page_counter', 'has_entity_name': True, 'hidden_by': None, @@ -1357,7 +1357,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_yellow_drum_remaining_lifetime', 'has_entity_name': True, 'hidden_by': None, @@ -1411,7 +1411,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_yellow_drum_remaining_pages', 'has_entity_name': True, 'hidden_by': None, @@ -1465,7 +1465,7 @@ 'device_id': , 'disabled_by': None, 'domain': 'sensor', - 'entity_category': , + 'entity_category': None, 'entity_id': 'sensor.hl_l2340dw_yellow_toner_remaining', 'has_entity_name': True, 'hidden_by': None,