Remove the use of StateType from Demo (#97111)

pull/97119/head^2
Franck Nijhof 2023-07-24 01:20:23 +02:00 committed by GitHub
parent 34dcd98440
commit f8c3aa7bec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -25,7 +25,6 @@ from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.event import async_track_time_interval
from homeassistant.helpers.typing import StateType
from . import DOMAIN
@ -149,11 +148,11 @@ class DemoSensor(SensorEntity):
self,
unique_id: str,
device_name: str | None,
state: StateType,
state: float | int | str | None,
device_class: SensorDeviceClass,
state_class: SensorStateClass | None,
unit_of_measurement: str | None,
battery: StateType,
battery: int | None,
options: list[str] | None = None,
translation_key: str | None = None,
) -> None:
@ -189,7 +188,7 @@ class DemoSumSensor(RestoreSensor):
device_class: SensorDeviceClass,
state_class: SensorStateClass | None,
unit_of_measurement: str | None,
battery: StateType,
battery: int | None,
suggested_entity_id: str,
) -> None:
"""Initialize the sensor."""