Skip to content
This repository has been archived by the owner on Jul 23, 2018. It is now read-only.

Commit

Permalink
Fixes an issue with time interval
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Jul 21, 2018
1 parent f3afd22 commit 50e8283
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions custom_components/custom_components.py
Expand Up @@ -13,7 +13,7 @@
from homeassistant.helpers.event import track_time_interval


__version__ = '1.0.0'
__version__ = '1.0.1'

DOMAIN = 'custom_components'
DATA_CC = 'custom_components_data'
Expand Down Expand Up @@ -59,17 +59,16 @@ def download_single_service(call):
DOMAIN, 'check_all', controller.cache_versions)
return True


class CustomComponents:
"""Custom components controller."""
def __init__(self, hass, conf_dir):
self.hass = hass
self.conf_dir = conf_dir
self.components = None
self.hass.data[DATA_CC] = {}
self.cache_versions() # Force a cache update on startup
self.cache_versions('now') # Force a cache update on startup

def cache_versions(self):
def cache_versions(self, call):
"""Cache"""
self.components = self.get_components()
self.hass.data[DATA_CC] = {} # Empty list to start from scratch
Expand Down

0 comments on commit 50e8283

Please sign in to comment.