diff --git a/homeassistant/components/shelly/sensor.py b/homeassistant/components/shelly/sensor.py index 9e24034bf8336d..b6d3bc2dbff3e8 100644 --- a/homeassistant/components/shelly/sensor.py +++ b/homeassistant/components/shelly/sensor.py @@ -128,10 +128,7 @@ ("sensor", "concentration"): BlockAttributeDescription( name="Gas Concentration", unit=CONCENTRATION_PARTS_PER_MILLION, - value=lambda value: value, icon="mdi:gauge", - # "sensorOp" is "normal" when the Shelly Gas is working properly and taking measurements. - available=lambda block: block.sensorOp == "normal", ), ("sensor", "extTemp"): BlockAttributeDescription( name="Temperature", @@ -170,6 +167,12 @@ value=lambda value: round(value, 1), device_class=sensor.DEVICE_CLASS_VOLTAGE, ), + ("sensor", "sensorOp"): BlockAttributeDescription( + name="Operation", + icon="mdi:cog-transfer", + value=lambda value: value, + extra_state_attributes=lambda block: {"self_test": block.selfTest}, + ), } REST_SENSORS = {