diff --git a/custom_components/rbfa/API.py b/custom_components/rbfa/API.py index b339553..bc472ed 100644 --- a/custom_components/rbfa/API.py +++ b/custom_components/rbfa/API.py @@ -153,7 +153,7 @@ async def update(self): # matchdata['awayteamposition'] = rankpos['away'] upcoming = True - self.matchdata = {'upcoming': previous, 'lastmatch': previous} + self.matchdata = {'upcoming': matchdata, 'lastmatch': previous} summary = '[' + item['state'] + '] ' + item['homeTeam']['name'] + ' - ' + item['awayTeam']['name'] @@ -179,4 +179,4 @@ async def update(self): if not upcoming: _LOGGER.debug('previous=last') - self.matchdata['lastmatch'] = previous \ No newline at end of file + self.matchdata['lastmatch'] = previous diff --git a/custom_components/rbfa/__init__.py b/custom_components/rbfa/__init__.py index 73ce472..2248d7b 100644 --- a/custom_components/rbfa/__init__.py +++ b/custom_components/rbfa/__init__.py @@ -14,15 +14,14 @@ from homeassistant.const import Platform from homeassistant.core import HomeAssistant -from homeassistant.helpers.typing import ConfigType +#from homeassistant.helpers.typing import ConfigType from homeassistant.components import persistent_notification -from .const import DOMAIN, PLATFORM_SCHEMA, CONF_TEAM, CONF_UPDATE_INTERVAL +from .const import DOMAIN, CONF_TEAM, CONF_UPDATE_INTERVAL from .API import TeamApp from .coordinator import MyCoordinator -from homeassistant.config_entries import ConfigEntry __version__ = "0.1" diff --git a/custom_components/rbfa/const.py b/custom_components/rbfa/const.py index 3442978..82e745c 100644 --- a/custom_components/rbfa/const.py +++ b/custom_components/rbfa/const.py @@ -23,17 +23,6 @@ CONF_UPDATE_INTERVAL = 'updateinterval' TZ = 'Europe/Brussels' -START = time( 8, 30) -END = time(22, 30) - -PLATFORM_SCHEMA = vol.Schema( - { - vol.Required(CONF_TEAM, default=""): cv.string, - vol.Optional(CONF_RESULT, default='true'): cv.boolean, - vol.Optional(CONF_UPDATE_INTERVAL, default=0): cv.positive_int, - }, extra=vol.ALLOW_EXTRA # Allow extra required due when validating config as sensor (platform key is added to config) -) -# vol.Required(CONF_RESOURCES, default=[]): cv.ensure_list, VARIABLES = { 'GetTeam': 'teamId',