diff --git a/homeassistant/components/shelly/binary_sensor.py b/homeassistant/components/shelly/binary_sensor.py index 99f8373ad3b..716303b7bda 100644 --- a/homeassistant/components/shelly/binary_sensor.py +++ b/homeassistant/components/shelly/binary_sensor.py @@ -126,7 +126,7 @@ SENSORS: Final = { ), ("sensor", "extInput"): BlockBinarySensorDescription( key="sensor|extInput", - name="External Input", + name="External input", device_class=BinarySensorDeviceClass.POWER, entity_registry_enabled_default=False, ), diff --git a/homeassistant/components/shelly/button.py b/homeassistant/components/shelly/button.py index 01c1b06cb6e..077fea16b6c 100644 --- a/homeassistant/components/shelly/button.py +++ b/homeassistant/components/shelly/button.py @@ -53,7 +53,7 @@ BUTTONS: Final[list[ShellyButtonDescription[Any]]] = [ ), ShellyButtonDescription[ShellyBlockCoordinator]( key="self_test", - name="Self Test", + name="Self test", icon="mdi:progress-wrench", entity_category=EntityCategory.DIAGNOSTIC, press_action=lambda coordinator: coordinator.device.trigger_shelly_gas_self_test(), diff --git a/homeassistant/components/shelly/number.py b/homeassistant/components/shelly/number.py index d13c891e13a..b7b8c3300d3 100644 --- a/homeassistant/components/shelly/number.py +++ b/homeassistant/components/shelly/number.py @@ -40,7 +40,7 @@ NUMBERS: Final = { ("device", "valvePos"): BlockNumberDescription( key="device|valvepos", icon="mdi:pipe-valve", - name="Valve Position", + name="Valve position", native_unit_of_measurement=PERCENTAGE, available=lambda block: cast(int, block.valveError) != 1, entity_category=EntityCategory.CONFIG, diff --git a/homeassistant/components/shelly/sensor.py b/homeassistant/components/shelly/sensor.py index 1e09c4b8e8f..c344e522716 100644 --- a/homeassistant/components/shelly/sensor.py +++ b/homeassistant/components/shelly/sensor.py @@ -79,7 +79,7 @@ SENSORS: Final = { ), ("device", "deviceTemp"): BlockSensorDescription( key="device|deviceTemp", - name="Device Temperature", + name="Device temperature", native_unit_of_measurement=UnitOfTemperature.CELSIUS, value=lambda value: round(value, 1), device_class=SensorDeviceClass.TEMPERATURE, @@ -139,7 +139,7 @@ SENSORS: Final = { ), ("emeter", "powerFactor"): BlockSensorDescription( key="emeter|powerFactor", - name="Power Factor", + name="Power factor", native_unit_of_measurement=PERCENTAGE, value=lambda value: round(value * 100, 1), device_class=SensorDeviceClass.POWER_FACTOR, @@ -180,7 +180,7 @@ SENSORS: Final = { ), ("emeter", "energyReturned"): BlockSensorDescription( key="emeter|energyReturned", - name="Energy Returned", + name="Energy returned", native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR, value=lambda value: round(value / 1000, 2), device_class=SensorDeviceClass.ENERGY, @@ -214,7 +214,7 @@ SENSORS: Final = { ), ("sensor", "concentration"): BlockSensorDescription( key="sensor|concentration", - name="Gas Concentration", + name="Gas concentration", native_unit_of_measurement=CONCENTRATION_PARTS_PER_MILLION, icon="mdi:gauge", state_class=SensorStateClass.MEASUREMENT, @@ -265,7 +265,7 @@ SENSORS: Final = { ), ("relay", "totalWorkTime"): BlockSensorDescription( key="relay|totalWorkTime", - name="Lamp Life", + name="Lamp life", native_unit_of_measurement=PERCENTAGE, icon="mdi:progress-wrench", value=lambda value: round(100 - (value / 3600 / SHAIR_MAX_WORK_HOURS), 1), @@ -467,7 +467,7 @@ RPC_SENSORS: Final = { "temperature": RpcSensorDescription( key="switch", sub_key="temperature", - name="Device Temperature", + name="Device temperature", native_unit_of_measurement=UnitOfTemperature.CELSIUS, value=lambda status, _: round(status["tC"], 1), device_class=SensorDeviceClass.TEMPERATURE, @@ -538,7 +538,7 @@ RPC_SENSORS: Final = { "analoginput": RpcSensorDescription( key="input", sub_key="percent", - name="Analog Input", + name="Analog input", native_unit_of_measurement=PERCENTAGE, device_class=SensorDeviceClass.BATTERY, state_class=SensorStateClass.MEASUREMENT, diff --git a/homeassistant/components/shelly/update.py b/homeassistant/components/shelly/update.py index 58bd3b4b8b1..20b3833443c 100644 --- a/homeassistant/components/shelly/update.py +++ b/homeassistant/components/shelly/update.py @@ -73,7 +73,7 @@ class RestUpdateDescription( REST_UPDATES: Final = { "fwupdate": RestUpdateDescription( - name="Firmware Update", + name="Firmware update", key="fwupdate", latest_version=lambda status: status["update"]["new_version"], beta=False, @@ -82,7 +82,7 @@ REST_UPDATES: Final = { entity_registry_enabled_default=False, ), "fwupdate_beta": RestUpdateDescription( - name="Beta Firmware Update", + name="Beta firmware update", key="fwupdate", latest_version=lambda status: status["update"].get("beta_version"), beta=True, @@ -94,7 +94,7 @@ REST_UPDATES: Final = { RPC_UPDATES: Final = { "fwupdate": RpcUpdateDescription( - name="Firmware Update", + name="Firmware update", key="sys", sub_key="available_updates", latest_version=lambda status: status.get("stable", {"version": ""})["version"], @@ -104,7 +104,7 @@ RPC_UPDATES: Final = { entity_registry_enabled_default=False, ), "fwupdate_beta": RpcUpdateDescription( - name="Beta Firmware Update", + name="Beta firmware update", key="sys", sub_key="available_updates", latest_version=lambda status: status.get("beta", {"version": ""})["version"], diff --git a/homeassistant/components/shelly/utils.py b/homeassistant/components/shelly/utils.py index 889e06cfe38..ea95bb930c7 100644 --- a/homeassistant/components/shelly/utils.py +++ b/homeassistant/components/shelly/utils.py @@ -98,7 +98,7 @@ def get_block_entity_name( channel_name = get_block_channel_name(device, block) if description: - return f"{channel_name} {description}" + return f"{channel_name} {description.lower()}" return channel_name @@ -326,7 +326,7 @@ def get_rpc_entity_name( channel_name = get_rpc_channel_name(device, key) if description: - return f"{channel_name} {description}" + return f"{channel_name} {description.lower()}" return channel_name