mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 10:17:51 +00:00
Update Neato Library And Reduce Cloud Calls (#15072)
* Update Neato library to 0.0.6 and reduce the amount of calls to the cloud * Remove file commited in error * Lint
This commit is contained in:
parent
8d22754a06
commit
6cabbd2592
@ -45,7 +45,7 @@ class NeatoCleaningMap(Camera):
|
|||||||
self.update()
|
self.update()
|
||||||
return self._image
|
return self._image
|
||||||
|
|
||||||
@Throttle(timedelta(seconds=10))
|
@Throttle(timedelta(seconds=60))
|
||||||
def update(self):
|
def update(self):
|
||||||
"""Check the contents of the map list."""
|
"""Check the contents of the map list."""
|
||||||
self.neato.update_robots()
|
self.neato.update_robots()
|
||||||
|
@ -17,8 +17,8 @@ from homeassistant.util import Throttle
|
|||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
REQUIREMENTS = ['https://github.com/jabesq/pybotvac/archive/v0.0.5.zip'
|
REQUIREMENTS = ['https://github.com/jabesq/pybotvac/archive/v0.0.6.zip'
|
||||||
'#pybotvac==0.0.5']
|
'#pybotvac==0.0.6']
|
||||||
|
|
||||||
DOMAIN = 'neato'
|
DOMAIN = 'neato'
|
||||||
NEATO_ROBOTS = 'neato_robots'
|
NEATO_ROBOTS = 'neato_robots'
|
||||||
@ -122,7 +122,7 @@ class NeatoHub(object):
|
|||||||
_LOGGER.error("Unable to connect to Neato API")
|
_LOGGER.error("Unable to connect to Neato API")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@Throttle(timedelta(seconds=1))
|
@Throttle(timedelta(seconds=60))
|
||||||
def update_robots(self):
|
def update_robots(self):
|
||||||
"""Update the robot states."""
|
"""Update the robot states."""
|
||||||
_LOGGER.debug("Running HUB.update_robots %s",
|
_LOGGER.debug("Running HUB.update_robots %s",
|
||||||
|
@ -5,10 +5,12 @@ For more details about this platform, please refer to the documentation at
|
|||||||
https://home-assistant.io/components/switch.neato/
|
https://home-assistant.io/components/switch.neato/
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
|
from datetime import timedelta
|
||||||
import requests
|
import requests
|
||||||
from homeassistant.const import STATE_OFF, STATE_ON
|
from homeassistant.const import STATE_OFF, STATE_ON
|
||||||
from homeassistant.helpers.entity import ToggleEntity
|
from homeassistant.helpers.entity import ToggleEntity
|
||||||
from homeassistant.components.neato import NEATO_ROBOTS, NEATO_LOGIN
|
from homeassistant.components.neato import NEATO_ROBOTS, NEATO_LOGIN
|
||||||
|
from homeassistant.util import Throttle
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -50,6 +52,7 @@ class NeatoConnectedSwitch(ToggleEntity):
|
|||||||
self._schedule_state = None
|
self._schedule_state = None
|
||||||
self._clean_state = None
|
self._clean_state = None
|
||||||
|
|
||||||
|
@Throttle(timedelta(seconds=60))
|
||||||
def update(self):
|
def update(self):
|
||||||
"""Update the states of Neato switches."""
|
"""Update the states of Neato switches."""
|
||||||
_LOGGER.debug("Running switch update")
|
_LOGGER.debug("Running switch update")
|
||||||
|
@ -5,7 +5,7 @@ For more details about this platform, please refer to the documentation at
|
|||||||
https://home-assistant.io/components/vacuum.neato/
|
https://home-assistant.io/components/vacuum.neato/
|
||||||
"""
|
"""
|
||||||
import logging
|
import logging
|
||||||
|
from datetime import timedelta
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from homeassistant.const import STATE_OFF, STATE_ON
|
from homeassistant.const import STATE_OFF, STATE_ON
|
||||||
@ -15,6 +15,7 @@ from homeassistant.components.vacuum import (
|
|||||||
SUPPORT_MAP, ATTR_STATUS, ATTR_BATTERY_LEVEL, ATTR_BATTERY_ICON)
|
SUPPORT_MAP, ATTR_STATUS, ATTR_BATTERY_LEVEL, ATTR_BATTERY_ICON)
|
||||||
from homeassistant.components.neato import (
|
from homeassistant.components.neato import (
|
||||||
NEATO_ROBOTS, NEATO_LOGIN, NEATO_MAP_DATA, ACTION, ERRORS, MODE, ALERTS)
|
NEATO_ROBOTS, NEATO_LOGIN, NEATO_MAP_DATA, ACTION, ERRORS, MODE, ALERTS)
|
||||||
|
from homeassistant.util import Throttle
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -62,6 +63,7 @@ class NeatoConnectedVacuum(VacuumDevice):
|
|||||||
self.clean_suspension_charge_count = None
|
self.clean_suspension_charge_count = None
|
||||||
self.clean_suspension_time = None
|
self.clean_suspension_time = None
|
||||||
|
|
||||||
|
@Throttle(timedelta(seconds=60))
|
||||||
def update(self):
|
def update(self):
|
||||||
"""Update the states of Neato Vacuums."""
|
"""Update the states of Neato Vacuums."""
|
||||||
_LOGGER.debug("Running Neato Vacuums update")
|
_LOGGER.debug("Running Neato Vacuums update")
|
||||||
|
@ -430,7 +430,7 @@ http://github.com/tgaugry/suds-passworddigest-py3/archive/86fc50e39b4d2b89974819
|
|||||||
httplib2==0.10.3
|
httplib2==0.10.3
|
||||||
|
|
||||||
# homeassistant.components.neato
|
# homeassistant.components.neato
|
||||||
https://github.com/jabesq/pybotvac/archive/v0.0.5.zip#pybotvac==0.0.5
|
https://github.com/jabesq/pybotvac/archive/v0.0.6.zip#pybotvac==0.0.6
|
||||||
|
|
||||||
# homeassistant.components.sensor.gtfs
|
# homeassistant.components.sensor.gtfs
|
||||||
https://github.com/robbiet480/pygtfs/archive/00546724e4bbcb3053110d844ca44e2246267dd8.zip#pygtfs==0.1.3
|
https://github.com/robbiet480/pygtfs/archive/00546724e4bbcb3053110d844ca44e2246267dd8.zip#pygtfs==0.1.3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user