Skip to content

Commit

Permalink
Update sensor.py
Browse files Browse the repository at this point in the history
fix LOGGER bug
  • Loading branch information
nelbs authored Oct 9, 2020
1 parent 50331a0 commit 0d32403
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/mindergas/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def update(self):
n = 0
while not URL_RESULT == URL_DASHBOARD :
if n == 10:
_LOGGER.error('Update of ' + str(self._name) + 'failed after ' + n + 'attempts')
_LOGGER.error('Update of ' + str(self._name) + 'failed after ' + str(n) + 'attempts')
break
session_requests = requests.session()

Expand Down Expand Up @@ -165,7 +165,7 @@ def update(self):
n = 0
while not URL_RESULT == URL_DASHBOARD :
if n == 10:
_LOGGER.error('Update of ' + str(self._name) + 'failed after ' + n + 'attempts')
_LOGGER.error('Update of ' + str(self._name) + 'failed after ' + str(n) + 'attempts')
break
session_requests = requests.session()

Expand Down Expand Up @@ -250,7 +250,7 @@ def update(self):
n = 0
while not URL_RESULT == URL_DASHBOARD :
if n == 10:
_LOGGER.error('Update of ' + str(self._name) + 'failed after ' + n + 'attempts')
_LOGGER.error('Update of ' + str(self._name) + 'failed after ' + str(n) + 'attempts')
break
session_requests = requests.session()

Expand Down Expand Up @@ -289,4 +289,4 @@ async def async_added_to_hass(self) -> None:
state = await self.async_get_last_state()
if not state:
return
self._state = state.state
self._state = state.state

0 comments on commit 0d32403

Please sign in to comment.