mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-22 11:44:23 +02:00
Update to SensorEntity
This commit is contained in:
parent
95bf989f44
commit
59ce0618b0
2 changed files with 3 additions and 3 deletions
2
Pipfile
2
Pipfile
|
@ -6,7 +6,7 @@ verify_ssl = true
|
||||||
[dev-packages]
|
[dev-packages]
|
||||||
wheel = ">=0.34"
|
wheel = ">=0.34"
|
||||||
pygithub = ">=1.47"
|
pygithub = ">=1.47"
|
||||||
homeassistant = ">=0.110.0"
|
homeassistant = ">=2021.4.6"
|
||||||
sqlalchemy = "==1.3.16"
|
sqlalchemy = "==1.3.16"
|
||||||
codecov = "==2.0.15"
|
codecov = "==2.0.15"
|
||||||
mock-open = "==1.3.1"
|
mock-open = "==1.3.1"
|
||||||
|
|
|
@ -16,9 +16,9 @@ from .const import (
|
||||||
)
|
)
|
||||||
|
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
|
from homeassistant.components.sensor import SensorEntity
|
||||||
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
|
from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC
|
||||||
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
from homeassistant.helpers.dispatcher import async_dispatcher_connect
|
||||||
from homeassistant.helpers.entity import Entity
|
|
||||||
|
|
||||||
from .const import DOMAIN, DATA_CLIENT, ATTRIBUTION
|
from .const import DOMAIN, DATA_CLIENT, ATTRIBUTION
|
||||||
|
|
||||||
|
@ -343,7 +343,7 @@ def update_items(inst, config_entry, mikrotik_controller, async_add_entities, se
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
# MikrotikControllerSensor
|
# MikrotikControllerSensor
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
class MikrotikControllerSensor(Entity):
|
class MikrotikControllerSensor(SensorEntity):
|
||||||
"""Define an Mikrotik Controller sensor."""
|
"""Define an Mikrotik Controller sensor."""
|
||||||
|
|
||||||
def __init__(self, mikrotik_controller, inst, sid_data):
|
def __init__(self, mikrotik_controller, inst, sid_data):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue