diff --git a/homeassistant/components/velbus/__init__.py b/homeassistant/components/velbus/__init__.py index 38d8b6c3f1c..4e808dc21ca 100644 --- a/homeassistant/components/velbus/__init__.py +++ b/homeassistant/components/velbus/__init__.py @@ -7,7 +7,7 @@ from homeassistant.const import EVENT_HOMEASSISTANT_STOP, CONF_PORT from homeassistant.helpers.discovery import load_platform from homeassistant.helpers.entity import Entity -REQUIREMENTS = ['python-velbus==2.0.21'] +REQUIREMENTS = ['python-velbus==2.0.22'] _LOGGER = logging.getLogger(__name__) @@ -62,7 +62,13 @@ async def async_setup(hass, config): load_platform(hass, 'sensor', DOMAIN, discovery_info['sensor'], config) + def syn_clock(self, service=None): + controller.sync_clock() + controller.scan(callback) + hass.services.async_register( + DOMAIN, 'sync_clock', syn_clock, + schema=vol.Schema({})) return True diff --git a/homeassistant/components/velbus/services.yaml b/homeassistant/components/velbus/services.yaml new file mode 100644 index 00000000000..40916a08418 --- /dev/null +++ b/homeassistant/components/velbus/services.yaml @@ -0,0 +1,2 @@ +sync_clock: + description: Sync the velbus modules clock to the HASS clock, this is the same as the 'sync clock' from VelbusLink diff --git a/requirements_all.txt b/requirements_all.txt index e04c995e4f5..a2cd5936eae 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1385,7 +1385,7 @@ python-telegram-bot==11.1.0 python-twitch-client==0.6.0 # homeassistant.components.velbus -python-velbus==2.0.21 +python-velbus==2.0.22 # homeassistant.components.media_player.vlc python-vlc==1.1.2