Updated own integrations for new HA version

This commit is contained in:
Martin Bauer
2021-05-01 11:54:54 +00:00
parent 6ee8c9c348
commit f6379fe687
25 changed files with 286 additions and 51 deletions

View File

@@ -0,0 +1,10 @@
{
"domain": "httpsispmctl",
"name": "sispmctl integration",
"documentation": "",
"dependencies": [],
"codeowners": ["@mabau"],
"requirements": [],
"version": "0.1"
}

View File

@@ -4,7 +4,7 @@ from collections import defaultdict
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers import aiohttp_client
from homeassistant.const import CONF_HOST, CONF_PORT, CONF_NAME
from homeassistant.components.switch import SwitchDevice, PLATFORM_SCHEMA
from homeassistant.components.switch import SwitchEntity, PLATFORM_SCHEMA
from aiohttp import ClientConnectionError
@@ -75,7 +75,7 @@ class SispmctlHost:
await switch.set_state(on=None, reachable=False)
class HttpSispmctlSwitch(SwitchDevice):
class HttpSispmctlSwitch(SwitchEntity):
def __init__(self, basename, number):
self._basename = basename
self._number = number