diff --git a/homeassistant/components/uptime/sensor.py b/homeassistant/components/uptime/sensor.py index 488682a79c69..9aa6c4082ed9 100644 --- a/homeassistant/components/uptime/sensor.py +++ b/homeassistant/components/uptime/sensor.py @@ -24,7 +24,7 @@ async def async_setup_entry( class UptimeSensor(SensorEntity): """Representation of an uptime sensor.""" - _attr_device_class = SensorDeviceClass.TIMESTAMP + _attr_device_class = SensorDeviceClass.UPTIME _attr_has_entity_name = True _attr_name = None _attr_should_poll = False diff --git a/tests/components/uptime/snapshots/test_sensor.ambr b/tests/components/uptime/snapshots/test_sensor.ambr index f7dd0bc61a67..f554e3862228 100644 --- a/tests/components/uptime/snapshots/test_sensor.ambr +++ b/tests/components/uptime/snapshots/test_sensor.ambr @@ -2,7 +2,7 @@ # name: test_uptime_sensor StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'timestamp', + 'device_class': 'uptime', 'friendly_name': 'Uptime', }), 'context': , @@ -38,7 +38,7 @@ 'object_id_base': None, 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, 'original_name': None, 'platform': 'uptime',