Migrate integrations i-m to extend SensorEntity (#48213)

This commit is contained in:
Erik Montnemery 2021-03-22 19:59:03 +01:00 committed by GitHub
parent 64bc9a8196
commit fdf97eaca3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 152 additions and 157 deletions

View file

@ -4,6 +4,7 @@ from __future__ import annotations
from datetime import timedelta
from typing import Any, Callable
from homeassistant.components.sensor import SensorEntity
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_LOCATION, DEVICE_CLASS_TIMESTAMP, PERCENTAGE
from homeassistant.helpers.entity import Entity
@ -52,7 +53,7 @@ async def async_setup_entry(
async_add_entities(sensors, True)
class IPPSensor(IPPEntity):
class IPPSensor(IPPEntity, SensorEntity):
"""Defines an IPP sensor."""
def __init__(