diff --git a/Pipfile b/Pipfile index 24b4e06..0799bdc 100644 --- a/Pipfile +++ b/Pipfile @@ -6,7 +6,7 @@ verify_ssl = true [dev-packages] wheel = ">=0.34" pygithub = ">=1.47" -homeassistant = ">=0.108.4" +homeassistant = ">=0.110.0" sqlalchemy = "==1.3.16" codecov = "==2.0.15" mock-open = "==1.3.1" diff --git a/custom_components/mikrotik_router/binary_sensor.py b/custom_components/mikrotik_router/binary_sensor.py index c2086f3..849aa0b 100644 --- a/custom_components/mikrotik_router/binary_sensor.py +++ b/custom_components/mikrotik_router/binary_sensor.py @@ -2,7 +2,7 @@ import logging -from homeassistant.components.binary_sensor import BinarySensorDevice +from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.const import ( CONF_NAME, ATTR_ATTRIBUTION, @@ -80,7 +80,7 @@ def update_items(inst, mikrotik_controller, async_add_entities, sensors): async_add_entities(new_sensors, True) -class MikrotikControllerBinarySensor(BinarySensorDevice): +class MikrotikControllerBinarySensor(BinarySensorEntity): """Define an Mikrotik Controller Binary Sensor.""" def __init__(self, mikrotik_controller, inst, sensor): diff --git a/custom_components/mikrotik_router/switch.py b/custom_components/mikrotik_router/switch.py index 6fb1dde..b07fbcc 100644 --- a/custom_components/mikrotik_router/switch.py +++ b/custom_components/mikrotik_router/switch.py @@ -1,7 +1,7 @@ """Support for the Mikrotik Router switches.""" import logging -from homeassistant.components.switch import SwitchDevice +from homeassistant.components.switch import SwitchEntity from homeassistant.const import CONF_NAME, ATTR_ATTRIBUTION from homeassistant.core import callback from homeassistant.helpers.device_registry import CONNECTION_NETWORK_MAC @@ -156,7 +156,7 @@ def update_items(inst, mikrotik_controller, async_add_entities, switches): # --------------------------- # MikrotikControllerSwitch # --------------------------- -class MikrotikControllerSwitch(SwitchDevice, RestoreEntity): +class MikrotikControllerSwitch(SwitchEntity, RestoreEntity): """Representation of a switch.""" def __init__(self, inst, uid, mikrotik_controller, sid_data): diff --git a/hacs.json b/hacs.json index 0600dac..2c8e40b 100644 --- a/hacs.json +++ b/hacs.json @@ -1,6 +1,6 @@ { "name": "Mikrotik Router", - "homeassistant": "0.109.0", + "homeassistant": "0.110.0", "iot_class": "local_poll", "domains": ["device_tracker", "switch", "sensor", "binary_sensor"], "render_readme": false,