Updated own integrations for new HA version
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import voluptuous as vol
|
||||
import logging
|
||||
|
||||
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorDevice, \
|
||||
from homeassistant.components.binary_sensor import PLATFORM_SCHEMA, BinarySensorEntity, \
|
||||
DEVICE_CLASS_MOTION, DEVICE_CLASS_OPENING, DEVICE_CLASS_BATTERY
|
||||
from homeassistant.const import CONF_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
@@ -35,7 +35,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
||||
async_add_entities([sensor])
|
||||
|
||||
|
||||
class FhemBinarySensor(BinarySensorDevice):
|
||||
class FhemBinarySensor(BinarySensorEntity):
|
||||
|
||||
def __init__(self, connection, name, ids, sensor_type):
|
||||
self._on = None
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import voluptuous as vol
|
||||
import logging
|
||||
|
||||
from homeassistant.components.cover import PLATFORM_SCHEMA, CoverDevice, SUPPORT_OPEN, SUPPORT_CLOSE, \
|
||||
from homeassistant.components.cover import PLATFORM_SCHEMA, CoverEntity, SUPPORT_OPEN, SUPPORT_CLOSE, \
|
||||
SUPPORT_SET_POSITION, SUPPORT_STOP, ATTR_POSITION
|
||||
from homeassistant.const import CONF_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
@@ -27,7 +27,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
||||
async_add_entities([cover])
|
||||
|
||||
|
||||
class FhemCover(CoverDevice):
|
||||
class FhemCover(CoverEntity):
|
||||
|
||||
def __init__(self, connection, name, ids):
|
||||
self._position = None
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import voluptuous as vol
|
||||
import logging
|
||||
|
||||
from homeassistant.components.light import ATTR_BRIGHTNESS, PLATFORM_SCHEMA, SUPPORT_BRIGHTNESS, Light, ATTR_TRANSITION
|
||||
from homeassistant.components.light import ATTR_BRIGHTNESS, PLATFORM_SCHEMA, SUPPORT_BRIGHTNESS, LightEntity, ATTR_TRANSITION
|
||||
from homeassistant.const import CONF_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from . import DATA_FHEM, device_error_reporting, CONF_FHEM_IDS
|
||||
@@ -29,7 +29,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
||||
async_add_entities([light])
|
||||
|
||||
|
||||
class FhemLight(Light):
|
||||
class FhemLight(LightEntity):
|
||||
|
||||
def __init__(self, connection, name, ids, dimmer=False):
|
||||
self._brightness = None
|
||||
|
||||
@@ -5,5 +5,6 @@
|
||||
"documentation": "",
|
||||
"dependencies": [],
|
||||
"codeowners": ["@mabau"],
|
||||
"requirements": []
|
||||
"requirements": [],
|
||||
"version": "0.1"
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
import voluptuous as vol
|
||||
import logging
|
||||
|
||||
from homeassistant.components.switch import SwitchDevice, PLATFORM_SCHEMA
|
||||
from homeassistant.components.switch import SwitchEntity, PLATFORM_SCHEMA
|
||||
from homeassistant.const import CONF_NAME
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from . import DATA_FHEM, device_error_reporting, CONF_FHEM_IDS
|
||||
@@ -24,7 +24,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
||||
async_add_entities([switch])
|
||||
|
||||
|
||||
class FhemSwitch(SwitchDevice):
|
||||
class FhemSwitch(SwitchEntity):
|
||||
|
||||
def __init__(self, connection, name, ids):
|
||||
self._on = None
|
||||
|
||||
Reference in New Issue
Block a user