mirror of
https://github.com/home-assistant/core.git
synced 2025-07-31 17:18:23 +00:00
pydocstyle fixes
pydocstyle fixes
This commit is contained in:
parent
7aff588bf0
commit
4feea9d7ec
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
Module for interacting with WiFi LNK module of the Rainbird Irrigation system
|
Module for interacting with WiFi LNK module of the Rainbird Irrigation system.
|
||||||
|
|
||||||
This project has no affiliation with Rainbird. This module works with the
|
This project has no affiliation with Rainbird. This module works with the
|
||||||
Rainbird LNK WiFi Module. For more information see:
|
Rainbird LNK WiFi Module. For more information see:
|
||||||
@ -29,11 +29,11 @@ _LOGGER = logging.getLogger(__name__)
|
|||||||
|
|
||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
"""
|
"""
|
||||||
Standard setup function Home Assistant
|
Call from Home Assistant.
|
||||||
|
|
||||||
@param hass: default homeassistant hass class
|
@param hass: default homeassistant hass class
|
||||||
@param config: default homeassistant config class
|
@param config: default homeassistant config class
|
||||||
"""
|
"""
|
||||||
|
|
||||||
server = config[DOMAIN].get('stickip')
|
server = config[DOMAIN].get('stickip')
|
||||||
password = config[DOMAIN].get('password')
|
password = config[DOMAIN].get('password')
|
||||||
|
|
||||||
@ -46,11 +46,11 @@ def setup(hass, config):
|
|||||||
|
|
||||||
def startirrigation(call):
|
def startirrigation(call):
|
||||||
"""
|
"""
|
||||||
Start Irrigation command towards Rainbird WiFi LNK stick
|
Start Irrigation command towards Rainbird WiFi LNK stick.
|
||||||
|
|
||||||
@param call: should be a home assistant call object with data
|
@param call: should be a home assistant call object with data
|
||||||
station for Zone to sprinkle and duration for the time
|
station for Zone to sprinkle and duration for the time
|
||||||
"""
|
"""
|
||||||
|
|
||||||
station_id = call.data.get('station')
|
station_id = call.data.get('station')
|
||||||
duration = call.data.get('duration')
|
duration = call.data.get('duration')
|
||||||
_LOGGER.info("Requesting irrigation for " +
|
_LOGGER.info("Requesting irrigation for " +
|
||||||
@ -65,10 +65,7 @@ def setup(hass, config):
|
|||||||
_LOGGER.error("Request was not acknowledged!")
|
_LOGGER.error("Request was not acknowledged!")
|
||||||
|
|
||||||
def stopirrigation():
|
def stopirrigation():
|
||||||
"""
|
"""Stop the irrigation (if one is running)."""
|
||||||
Stops the irrigation (if one is running)
|
|
||||||
"""
|
|
||||||
|
|
||||||
_LOGGER.info("Stop request irrigation")
|
_LOGGER.info("Stop request irrigation")
|
||||||
result = controller.stopIrrigation()
|
result = controller.stopIrrigation()
|
||||||
if result == 1:
|
if result == 1:
|
||||||
@ -81,10 +78,10 @@ def setup(hass, config):
|
|||||||
|
|
||||||
def getirrigation():
|
def getirrigation():
|
||||||
"""
|
"""
|
||||||
Get current active station
|
Get current active station.
|
||||||
|
|
||||||
@return: integer which station is active
|
@return: integer which station is active
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_LOGGER.info("Request irrigation state")
|
_LOGGER.info("Request irrigation state")
|
||||||
result = controller.currentIrrigation()
|
result = controller.currentIrrigation()
|
||||||
if result < 0:
|
if result < 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user