mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add the velbus sync clock service (#21308)
* Add the velbus sync clock service * Fixed houndci-bot commants * Fix lint and pylint * fixed all comments * Hound bot comments * Fix for flake8
This commit is contained in:
parent
1e60993aa7
commit
b985223603
@ -7,7 +7,7 @@ from homeassistant.const import EVENT_HOMEASSISTANT_STOP, CONF_PORT
|
|||||||
from homeassistant.helpers.discovery import load_platform
|
from homeassistant.helpers.discovery import load_platform
|
||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
|
|
||||||
REQUIREMENTS = ['python-velbus==2.0.21']
|
REQUIREMENTS = ['python-velbus==2.0.22']
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -62,7 +62,13 @@ async def async_setup(hass, config):
|
|||||||
load_platform(hass, 'sensor', DOMAIN,
|
load_platform(hass, 'sensor', DOMAIN,
|
||||||
discovery_info['sensor'], config)
|
discovery_info['sensor'], config)
|
||||||
|
|
||||||
|
def syn_clock(self, service=None):
|
||||||
|
controller.sync_clock()
|
||||||
|
|
||||||
controller.scan(callback)
|
controller.scan(callback)
|
||||||
|
hass.services.async_register(
|
||||||
|
DOMAIN, 'sync_clock', syn_clock,
|
||||||
|
schema=vol.Schema({}))
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
2
homeassistant/components/velbus/services.yaml
Normal file
2
homeassistant/components/velbus/services.yaml
Normal file
@ -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
|
@ -1385,7 +1385,7 @@ python-telegram-bot==11.1.0
|
|||||||
python-twitch-client==0.6.0
|
python-twitch-client==0.6.0
|
||||||
|
|
||||||
# homeassistant.components.velbus
|
# homeassistant.components.velbus
|
||||||
python-velbus==2.0.21
|
python-velbus==2.0.22
|
||||||
|
|
||||||
# homeassistant.components.media_player.vlc
|
# homeassistant.components.media_player.vlc
|
||||||
python-vlc==1.1.2
|
python-vlc==1.1.2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user