From eb551a6d5afa5581d26ae739a79787cc363c87d1 Mon Sep 17 00:00:00 2001 From: David Broadfoot Date: Wed, 9 May 2018 01:42:18 +1000 Subject: [PATCH] Gogogate2 0.1.1 (#14294) * Gogogate2 - bump version Uses latest version of library which ensures commands to device are idempotent * Update requirements_all * Expose sensor temperature * update version * import attribute * Set temperature * Remove temperature attribute Removed temperature attribute until it can be re-implemented as a separate sensor. * Update ordering * Fix copy-&-paste issue --- homeassistant/components/cover/gogogate2.py | 13 +++++++------ requirements_all.txt | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/homeassistant/components/cover/gogogate2.py b/homeassistant/components/cover/gogogate2.py index 688df62ca6a..2b91591e71b 100644 --- a/homeassistant/components/cover/gogogate2.py +++ b/homeassistant/components/cover/gogogate2.py @@ -1,5 +1,5 @@ """ -Support for Gogogate2 Garage Doors. +Support for Gogogate2 garage Doors. For more details about this platform, please refer to the documentation https://home-assistant.io/components/cover.gogogate2/ @@ -15,7 +15,7 @@ from homeassistant.const import ( CONF_IP_ADDRESS, CONF_NAME) import homeassistant.helpers.config_validation as cv -REQUIREMENTS = ['pygogogate2==0.0.7'] +REQUIREMENTS = ['pygogogate2==0.1.1'] _LOGGER = logging.getLogger(__name__) @@ -25,9 +25,9 @@ NOTIFICATION_ID = 'gogogate2_notification' NOTIFICATION_TITLE = 'Gogogate2 Cover Setup' COVER_SCHEMA = vol.Schema({ - vol.Required(CONF_USERNAME): cv.string, - vol.Required(CONF_PASSWORD): cv.string, vol.Required(CONF_IP_ADDRESS): cv.string, + vol.Required(CONF_PASSWORD): cv.string, + vol.Required(CONF_USERNAME): cv.string, vol.Optional(CONF_NAME, default=DEFAULT_NAME): cv.string, }) @@ -36,10 +36,11 @@ def setup_platform(hass, config, add_devices, discovery_info=None): """Set up the Gogogate2 component.""" from pygogogate2 import Gogogate2API as pygogogate2 - username = config.get(CONF_USERNAME) - password = config.get(CONF_PASSWORD) ip_address = config.get(CONF_IP_ADDRESS) name = config.get(CONF_NAME) + password = config.get(CONF_PASSWORD) + username = config.get(CONF_USERNAME) + mygogogate2 = pygogogate2(username, password, ip_address) try: diff --git a/requirements_all.txt b/requirements_all.txt index 2db7a66d7b2..0dcfdbcce70 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -784,7 +784,7 @@ pyfritzhome==0.3.7 pyfttt==0.3 # homeassistant.components.cover.gogogate2 -pygogogate2==0.0.7 +pygogogate2==0.1.1 # homeassistant.components.remote.harmony pyharmony==1.0.20