diff --git a/homeassistant/components/homekit_controller/sensor.py b/homeassistant/components/homekit_controller/sensor.py index eb408834bca..0cec354e1ab 100644 --- a/homeassistant/components/homekit_controller/sensor.py +++ b/homeassistant/components/homekit_controller/sensor.py @@ -44,21 +44,21 @@ class HomeKitSensorEntityDescription(SensorEntityDescription): SIMPLE_SENSOR: dict[str, HomeKitSensorEntityDescription] = { CharacteristicsTypes.Vendor.CONNECTSENSE_ENERGY_WATT: HomeKitSensorEntityDescription( key=CharacteristicsTypes.Vendor.CONNECTSENSE_ENERGY_WATT, - name="Real Time Energy", + name="Power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=POWER_WATT, ), CharacteristicsTypes.Vendor.CONNECTSENSE_ENERGY_AMPS: HomeKitSensorEntityDescription( key=CharacteristicsTypes.Vendor.CONNECTSENSE_ENERGY_AMPS, - name="Real Time Current", + name="Current", device_class=SensorDeviceClass.CURRENT, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE, ), CharacteristicsTypes.Vendor.CONNECTSENSE_ENERGY_AMPS_20: HomeKitSensorEntityDescription( key=CharacteristicsTypes.Vendor.CONNECTSENSE_ENERGY_AMPS_20, - name="Real Time Current", + name="Current", device_class=SensorDeviceClass.CURRENT, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=ELECTRIC_CURRENT_AMPERE, @@ -72,7 +72,7 @@ SIMPLE_SENSOR: dict[str, HomeKitSensorEntityDescription] = { ), CharacteristicsTypes.Vendor.EVE_ENERGY_WATT: HomeKitSensorEntityDescription( key=CharacteristicsTypes.Vendor.EVE_ENERGY_WATT, - name="Real Time Energy", + name="Power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=POWER_WATT, @@ -100,14 +100,14 @@ SIMPLE_SENSOR: dict[str, HomeKitSensorEntityDescription] = { ), CharacteristicsTypes.Vendor.KOOGEEK_REALTIME_ENERGY: HomeKitSensorEntityDescription( key=CharacteristicsTypes.Vendor.KOOGEEK_REALTIME_ENERGY, - name="Real Time Energy", + name="Power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=POWER_WATT, ), CharacteristicsTypes.Vendor.KOOGEEK_REALTIME_ENERGY_2: HomeKitSensorEntityDescription( key=CharacteristicsTypes.Vendor.KOOGEEK_REALTIME_ENERGY_2, - name="Real Time Energy", + name="Power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=POWER_WATT, @@ -121,7 +121,7 @@ SIMPLE_SENSOR: dict[str, HomeKitSensorEntityDescription] = { ), CharacteristicsTypes.Vendor.VOCOLINC_OUTLET_ENERGY: HomeKitSensorEntityDescription( key=CharacteristicsTypes.Vendor.VOCOLINC_OUTLET_ENERGY, - name="Real Time Energy", + name="Power", device_class=SensorDeviceClass.POWER, state_class=SensorStateClass.MEASUREMENT, native_unit_of_measurement=POWER_WATT, diff --git a/tests/components/homekit_controller/specific_devices/test_connectsense.py b/tests/components/homekit_controller/specific_devices/test_connectsense.py index 371ee360adc..2cbdf924319 100644 --- a/tests/components/homekit_controller/specific_devices/test_connectsense.py +++ b/tests/components/homekit_controller/specific_devices/test_connectsense.py @@ -35,16 +35,16 @@ async def test_connectsense_setup(hass): devices=[], entities=[ EntityTestInfo( - entity_id="sensor.inwall_outlet_0394de_real_time_current", - friendly_name="InWall Outlet-0394DE Real Time Current", + entity_id="sensor.inwall_outlet_0394de_current", + friendly_name="InWall Outlet-0394DE Current", unique_id="homekit-1020301376-aid:1-sid:13-cid:18", capabilities={"state_class": SensorStateClass.MEASUREMENT}, unit_of_measurement=ELECTRIC_CURRENT_AMPERE, state="0.03", ), EntityTestInfo( - entity_id="sensor.inwall_outlet_0394de_real_time_energy", - friendly_name="InWall Outlet-0394DE Real Time Energy", + entity_id="sensor.inwall_outlet_0394de_power", + friendly_name="InWall Outlet-0394DE Power", unique_id="homekit-1020301376-aid:1-sid:13-cid:19", capabilities={"state_class": SensorStateClass.MEASUREMENT}, unit_of_measurement=POWER_WATT, @@ -65,16 +65,16 @@ async def test_connectsense_setup(hass): state="on", ), EntityTestInfo( - entity_id="sensor.inwall_outlet_0394de_real_time_current_2", - friendly_name="InWall Outlet-0394DE Real Time Current", + entity_id="sensor.inwall_outlet_0394de_current_2", + friendly_name="InWall Outlet-0394DE Current", unique_id="homekit-1020301376-aid:1-sid:25-cid:30", capabilities={"state_class": SensorStateClass.MEASUREMENT}, unit_of_measurement=ELECTRIC_CURRENT_AMPERE, state="0.05", ), EntityTestInfo( - entity_id="sensor.inwall_outlet_0394de_real_time_energy_2", - friendly_name="InWall Outlet-0394DE Real Time Energy", + entity_id="sensor.inwall_outlet_0394de_power_2", + friendly_name="InWall Outlet-0394DE Power", unique_id="homekit-1020301376-aid:1-sid:25-cid:31", capabilities={"state_class": SensorStateClass.MEASUREMENT}, unit_of_measurement=POWER_WATT, diff --git a/tests/components/homekit_controller/specific_devices/test_eve_energy.py b/tests/components/homekit_controller/specific_devices/test_eve_energy.py index e6cfa1eaa5e..0ba9b0bee25 100644 --- a/tests/components/homekit_controller/specific_devices/test_eve_energy.py +++ b/tests/components/homekit_controller/specific_devices/test_eve_energy.py @@ -59,9 +59,9 @@ async def test_eve_degree_setup(hass): state="0.400000005960464", ), EntityTestInfo( - entity_id="sensor.eve_energy_50ff_real_time_energy", + entity_id="sensor.eve_energy_50ff_power", unique_id="homekit-AA00A0A00000-aid:1-sid:28-cid:34", - friendly_name="Eve Energy 50FF Real Time Energy", + friendly_name="Eve Energy 50FF Power", unit_of_measurement=POWER_WATT, capabilities={"state_class": SensorStateClass.MEASUREMENT}, state="0", diff --git a/tests/components/homekit_controller/specific_devices/test_koogeek_p1eu.py b/tests/components/homekit_controller/specific_devices/test_koogeek_p1eu.py index 78d3efb64bb..f93adc732ba 100644 --- a/tests/components/homekit_controller/specific_devices/test_koogeek_p1eu.py +++ b/tests/components/homekit_controller/specific_devices/test_koogeek_p1eu.py @@ -37,8 +37,8 @@ async def test_koogeek_p1eu_setup(hass): state="off", ), EntityTestInfo( - entity_id="sensor.koogeek_p1_a00aa0_real_time_energy", - friendly_name="Koogeek-P1-A00AA0 Real Time Energy", + entity_id="sensor.koogeek_p1_a00aa0_power", + friendly_name="Koogeek-P1-A00AA0 Power", unique_id="homekit-EUCP03190xxxxx48-aid:1-sid:21-cid:22", unit_of_measurement=POWER_WATT, capabilities={"state_class": SensorStateClass.MEASUREMENT}, diff --git a/tests/components/homekit_controller/specific_devices/test_koogeek_sw2.py b/tests/components/homekit_controller/specific_devices/test_koogeek_sw2.py index 7c7688be4ee..ed940cb6376 100644 --- a/tests/components/homekit_controller/specific_devices/test_koogeek_sw2.py +++ b/tests/components/homekit_controller/specific_devices/test_koogeek_sw2.py @@ -43,8 +43,8 @@ async def test_koogeek_sw2_setup(hass): state="off", ), EntityTestInfo( - entity_id="sensor.koogeek_sw2_187a91_real_time_energy", - friendly_name="Koogeek-SW2-187A91 Real Time Energy", + entity_id="sensor.koogeek_sw2_187a91_power", + friendly_name="Koogeek-SW2-187A91 Power", unique_id="homekit-CNNT061751001372-aid:1-sid:14-cid:18", unit_of_measurement=POWER_WATT, capabilities={"state_class": SensorStateClass.MEASUREMENT}, diff --git a/tests/components/homekit_controller/specific_devices/test_vocolinc_vp3.py b/tests/components/homekit_controller/specific_devices/test_vocolinc_vp3.py index a082683cf21..da69b7fe309 100644 --- a/tests/components/homekit_controller/specific_devices/test_vocolinc_vp3.py +++ b/tests/components/homekit_controller/specific_devices/test_vocolinc_vp3.py @@ -37,8 +37,8 @@ async def test_vocolinc_vp3_setup(hass): state="on", ), EntityTestInfo( - entity_id="sensor.vocolinc_vp3_123456_real_time_energy", - friendly_name="VOCOlinc-VP3-123456 Real Time Energy", + entity_id="sensor.vocolinc_vp3_123456_power", + friendly_name="VOCOlinc-VP3-123456 Power", unique_id="homekit-EU0121203xxxxx07-aid:1-sid:48-cid:97", unit_of_measurement=POWER_WATT, capabilities={"state_class": SensorStateClass.MEASUREMENT}, diff --git a/tests/components/homekit_controller/test_sensor.py b/tests/components/homekit_controller/test_sensor.py index c50e23bac13..4c57d94b2b8 100644 --- a/tests/components/homekit_controller/test_sensor.py +++ b/tests/components/homekit_controller/test_sensor.py @@ -218,7 +218,7 @@ async def test_switch_with_sensor(hass, utcnow): # Helper will be for the primary entity, which is the outlet. Make a helper for the sensor. energy_helper = Helper( hass, - "sensor.testdevice_real_time_energy", + "sensor.testdevice_power", helper.pairing, helper.accessory, helper.config_entry, @@ -248,7 +248,7 @@ async def test_sensor_unavailable(hass, utcnow): # Helper will be for the primary entity, which is the outlet. Make a helper for the sensor. energy_helper = Helper( hass, - "sensor.testdevice_real_time_energy", + "sensor.testdevice_power", helper.pairing, helper.accessory, helper.config_entry,