mirror of
https://github.com/home-assistant/core.git
synced 2025-11-13 04:50:17 +00:00
Migrate integrations i-m to extend SensorEntity (#48213)
This commit is contained in:
@@ -7,11 +7,10 @@ import logging
|
||||
from pylaunches import PyLaunches, PyLaunchesException
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
|
||||
from homeassistant.const import ATTR_ATTRIBUTION, CONF_NAME
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
from .const import (
|
||||
ATTR_AGENCY,
|
||||
@@ -40,7 +39,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
||||
async_add_entities([LaunchLibrarySensor(launches, name)], True)
|
||||
|
||||
|
||||
class LaunchLibrarySensor(Entity):
|
||||
class LaunchLibrarySensor(SensorEntity):
|
||||
"""Representation of a launch_library Sensor."""
|
||||
|
||||
def __init__(self, launches: PyLaunches, name: str) -> None:
|
||||
|
||||
Reference in New Issue
Block a user