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
62 changed files with 152 additions and 157 deletions

View File

@@ -3,8 +3,8 @@ import logging
import hdate
from homeassistant.components.sensor import SensorEntity
from homeassistant.const import DEVICE_CLASS_TIMESTAMP, SUN_EVENT_SUNSET
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.sun import get_astral_event_date
import homeassistant.util.dt as dt_util
@@ -30,7 +30,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
async_add_entities(sensors)
class JewishCalendarSensor(Entity):
class JewishCalendarSensor(SensorEntity):
"""Representation of an Jewish calendar sensor."""
def __init__(self, data, sensor, sensor_info):