Migrate integrations t-v to extend SensorEntity (#48216)
This commit is contained in:
parent
c900e3030b
commit
783b453bbe
49 changed files with 112 additions and 120 deletions
|
@ -4,11 +4,10 @@ import re
|
|||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.http import HomeAssistantView
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
|
||||
from homeassistant.const import CONF_EMAIL, CONF_NAME, DEGREE
|
||||
from homeassistant.core import callback
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import Entity
|
||||
|
||||
API_PATH = "/api/torque"
|
||||
|
||||
|
@ -106,7 +105,7 @@ class TorqueReceiveDataView(HomeAssistantView):
|
|||
return "OK!"
|
||||
|
||||
|
||||
class TorqueSensor(Entity):
|
||||
class TorqueSensor(SensorEntity):
|
||||
"""Representation of a Torque sensor."""
|
||||
|
||||
def __init__(self, name, unit):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue