Fix goalzero sensor not using SensorEntity class (#54773)

This commit is contained in:
Robert Hillis 2021-08-17 16:38:20 -04:00 committed by GitHub
parent 909af30c7c
commit 4ef04898e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,11 @@
"""Support for Goal Zero Yeti Sensors.""" """Support for Goal Zero Yeti Sensors."""
from __future__ import annotations from __future__ import annotations
from homeassistant.components.sensor import ATTR_LAST_RESET, ATTR_STATE_CLASS from homeassistant.components.sensor import (
ATTR_LAST_RESET,
ATTR_STATE_CLASS,
SensorEntity,
)
from homeassistant.const import ( from homeassistant.const import (
ATTR_DEVICE_CLASS, ATTR_DEVICE_CLASS,
ATTR_NAME, ATTR_NAME,
@ -36,7 +40,7 @@ async def async_setup_entry(hass, entry, async_add_entities):
async_add_entities(sensors, True) async_add_entities(sensors, True)
class YetiSensor(YetiEntity): class YetiSensor(YetiEntity, SensorEntity):
"""Representation of a Goal Zero Yeti sensor.""" """Representation of a Goal Zero Yeti sensor."""
def __init__(self, api, coordinator, name, sensor_name, server_unique_id): def __init__(self, api, coordinator, name, sensor_name, server_unique_id):