From c5d89499fa5801dd89812b9f5b71a1e31680f87c Mon Sep 17 00:00:00 2001 From: Marcelo Moreira de Mello Date: Sat, 8 Apr 2017 17:52:10 -0400 Subject: [PATCH] Bump Amcrest module to 1.1.8 (#6990) Fixed traceback when calculating SD card percent storage self._state = self._camera.percent(sd_used[0], sd_total[0]) AttributeError: 'Http' object has no attribute 'percent' --- homeassistant/components/camera/amcrest.py | 2 +- homeassistant/components/sensor/amcrest.py | 4 ++-- requirements_all.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/camera/amcrest.py b/homeassistant/components/camera/amcrest.py index 294a63bcff9..a50cdc859a7 100644 --- a/homeassistant/components/camera/amcrest.py +++ b/homeassistant/components/camera/amcrest.py @@ -18,7 +18,7 @@ from homeassistant.helpers import config_validation as cv from homeassistant.helpers.aiohttp_client import ( async_get_clientsession, async_aiohttp_proxy_web) -REQUIREMENTS = ['amcrest==1.1.5'] +REQUIREMENTS = ['amcrest==1.1.8'] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/sensor/amcrest.py b/homeassistant/components/sensor/amcrest.py index 5a349d28b7c..2d05372220b 100644 --- a/homeassistant/components/sensor/amcrest.py +++ b/homeassistant/components/sensor/amcrest.py @@ -19,7 +19,7 @@ import homeassistant.loader as loader from requests.exceptions import HTTPError, ConnectTimeout -REQUIREMENTS = ['amcrest==1.1.5'] +REQUIREMENTS = ['amcrest==1.1.8'] _LOGGER = logging.getLogger(__name__) @@ -146,4 +146,4 @@ class AmcrestSensor(Entity): sd_total = self._camera.storage_total self._attrs['Total'] = '{0} {1}'.format(*sd_total) self._attrs['Used'] = '{0} {1}'.format(*sd_used) - self._state = self._camera.percent(sd_used[0], sd_total[0]) + self._state = self._camera.storage_used_percent diff --git a/requirements_all.txt b/requirements_all.txt index 43c0240452c..7e800d62548 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -48,7 +48,7 @@ aiolifx==0.4.2 # homeassistant.components.camera.amcrest # homeassistant.components.sensor.amcrest -amcrest==1.1.5 +amcrest==1.1.8 # homeassistant.components.media_player.anthemav anthemav==1.1.8