Update typing 10 (#48071)

This commit is contained in:
Marc Mueller 2021-03-18 13:07:04 +01:00 committed by GitHub
parent 00dca88024
commit 25a13d1554
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 412 additions and 333 deletions

View file

@ -1,7 +1,8 @@
"""Support for MQTT sensors."""
from __future__ import annotations
from datetime import timedelta
import functools
from typing import Optional
import voluptuous as vol
@ -166,7 +167,7 @@ class MqttSensor(MqttEntity, Entity):
return self._state
@property
def device_class(self) -> Optional[str]:
def device_class(self) -> str | None:
"""Return the device class of the sensor."""
return self._config.get(CONF_DEVICE_CLASS)