Skip to content
Closed
Changes from 17 commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
2d78019
Rachio platform started
Klikini May 13, 2017
461b8a5
Rachio tests
Klikini May 15, 2017
8bd8590
detect bad api token
Klikini May 16, 2017
f5040cf
Documentation, Code cleanup
May 18, 2017
c398b66
Docstrings end with a period, log uses %
May 18, 2017
d2f7370
Merge remote-tracking branch 'refs/remotes/home-assistant/dev' into dev
May 18, 2017
0e443bd
Fix arguments, default run time is now 10 minutes
May 18, 2017
78540d3
Fix typo, remove todo (GH issue exists)
May 18, 2017
8a9be6e
Revert polymer submodule commit
May 23, 2017
f3e4b69
Use a RachioPy version with SSL cert validation
May 24, 2017
0777cb3
Update requirements
May 25, 2017
f001724
Don't double-convert manual run time
Jun 1, 2017
e2708b8
Merge remote-tracking branch 'refs/remotes/home-assistant/dev' into dev
Jun 1, 2017
a33bcdf
Version bump to 0.46
balloob Jun 2, 2017
a79f1d4
Fix telegram_bot (#7877)
balloob Jun 3, 2017
4dc4a98
[light.lifx] Update aiolifx (#7882)
amelchio Jun 3, 2017
7ebf36b
Fix MQTT camera test (#7878)
balloob Jun 4, 2017
e9f273e
Merge pull request #7866 from home-assistant/release-0-46
balloob Jun 4, 2017
b12b7b4
use manual_run_secs instead of the now-missing seconds in turn_on
Jun 4, 2017
a19d838
ignore unused kwargs
Jun 4, 2017
85fbec6
use upstream RachioPy, fix manual run switches
Jun 5, 2017
68eafc3
merge dev
Jun 5, 2017
cbbb15f
Fix changes introduced with #7917 (#7930)
fabaff Jun 6, 2017
5c96936
Do not call update() in constructor (#7931)
fabaff Jun 6, 2017
5504a51
Add service_url config option to volvooncall (#7919)
mpstephana Jun 7, 2017
bb6fe82
Added 'change' field to statistics sensor (#7820)
jminn Jun 7, 2017
b87e316
add ripple sensor (#7935)
nkgilley Jun 7, 2017
d38acfb
Add Yahoo! weather platform (#7939)
fabaff Jun 7, 2017
36eb0ce
[media_player.sonos] Send media_stop on turn_off (#7940)
bjw-s Jun 7, 2017
4dbf7be
Updated dependency
danielperna84 Jun 7, 2017
7e668ef
Merge pull request #7948 from danielperna84/HomeMatic
danielperna84 Jun 7, 2017
7906105
update to 006 (#7945)
joopert Jun 8, 2017
8a4e993
Update ping.py (#7944)
vrs01 Jun 8, 2017
482db94
Add option to display all input sources / Add support for favourite c…
scarface-4711 Jun 8, 2017
97f62cf
[WIP] Fix opencv (#7864)
Teagan42 Jun 8, 2017
9bea7d7
Upgrade coinmarketcap to 3.0.1 (#7951)
fabaff Jun 8, 2017
727a22f
test connection without needing admin rights (#7947)
heinemml Jun 8, 2017
620197b
Fix the negative values bug in history_stats (#7934)
bokub Jun 8, 2017
1e352d3
Vera colored light support (#7942)
alanfischer Jun 8, 2017
0863d50
Fix typos (#7957)
fabaff Jun 8, 2017
055db05
Osram lightify, removed double set to the lightify bridge in case of …
commento Jun 8, 2017
aaaf963
Add configuration check and use default var names (#7963)
fabaff Jun 8, 2017
c52b18d
lock.sesame: Update pysesame, add state attributes (#7953)
trisk Jun 8, 2017
4b767b0
Version bump to 0.46.1
balloob Jun 9, 2017
a8709a6
Support for renaming ZWave values (#7780)
emlove Jun 3, 2017
533bb55
Dsmr5 revert (#7900)
aequitas Jun 5, 2017
3464454
Fix typos in Wunderground component (Percipitation -> Precipitation) …
mje-nz Jun 5, 2017
bfd9623
Mqtt cover modifications (#7841)
cribbstechnologies Jun 5, 2017
e4d100d
Fixed metadata issue (#7932)
Jun 9, 2017
372169a
Fixed metadata issue (#7932)
Jun 9, 2017
24a1721
Create metoffice.py (#7965)
girlpunk Jun 9, 2017
c328078
Create metoffice.py (#7965)
girlpunk Jun 9, 2017
a223efb
Prevent Roku doing I/O in event loop (#7969)
balloob Jun 9, 2017
8cc759e
Prevent Roku doing I/O in event loop (#7969)
balloob Jun 9, 2017
c2b7c93
Merge pull request #7968 from home-assistant/release-0-46-1
balloob Jun 9, 2017
4aef0b6
Merge branch 'master' into dev
balloob Jun 9, 2017
640c692
Fix platforms being able to block startup (#7970)
balloob Jun 9, 2017
db0efc6
New component: Python Script (#7950)
balloob Jun 9, 2017
49d6427
Nadtcp component (#7955)
Jun 9, 2017
a19e7ba
HomeMatic optimizations and code cleanup (#7986)
danielperna84 Jun 10, 2017
f2feabc
Update eliqonline.py (#7977)
molobrakos Jun 10, 2017
ba80d5e
test that all lights turn off when no entity id is given (#7981)
chilicheech Jun 10, 2017
b9ee5fb
make `last_name` field optional (#7988)
azogue Jun 10, 2017
1f226cf
Bugfixing with version 0.4.4 of denonavr (#7995)
scarface-4711 Jun 11, 2017
1b1619f
Upgrade py-cpuinfo to 3.3.0 (#7992)
fabaff Jun 11, 2017
9e16be3
LIFX: clean up internal color conversions (#7964)
amelchio Jun 11, 2017
314bce1
LIFX: add support for setting infrared level (#8000)
amelchio Jun 11, 2017
de0f6b7
dismiss service for persistent notifications (#7996)
tedstriker Jun 11, 2017
e7de1fb
Add Gitter.im sensor (#7998)
fabaff Jun 12, 2017
1c06b51
Fixing Client connection error (#7991)
sander76 Jun 12, 2017
401309c
Additional demo fan with only speed support (#7985)
emlove Jun 12, 2017
6e33c12
Update mailgun (#7984)
happyleavesaoc Jun 12, 2017
03f916e
Fixed bug in spotify component. (#7976)
soldag Jun 12, 2017
dc45ed3
fixing potential null issue with optional param being parsed as a scr…
cribbstechnologies Jun 12, 2017
bde711a
Make it more flexible (fixes #7954) (#8001)
fabaff Jun 12, 2017
1e1d4c2
Add Flexit AC climate platform (#7871)
Sabesto Jun 13, 2017
2bf7811
update pyripple (#8015)
nkgilley Jun 13, 2017
843f8ce
Allow put as method (#8004)
fabaff Jun 13, 2017
7fae8cd
Configure conversation for custom actions with keywords (#7734)
mjsir911 Jun 13, 2017
9189cbd
Remove globally disabled pylint issues (#8005)
fabaff Jun 13, 2017
09fec29
entity_id for service fan.turn_off is optional (#7982)
chilicheech Jun 13, 2017
bfe7490
Remove PyCharm linter comments
Jun 13, 2017
2cf770c
update requirements to use pip version of RachioPy
Jun 13, 2017
ddf5f52
use rachiopy from pip
Jun 13, 2017
781d9a1
Rachio platform started
Klikini May 13, 2017
fb6230c
Rachio tests
Klikini May 15, 2017
e979bbd
update requirements to use pip version of RachioPy
Jun 13, 2017
ea0b5e8
use rachiopy from pip
Jun 13, 2017
72454ef
fix merge conflict in Rachio rebase
Jun 13, 2017
86ce002
add newline to end of file
Jun 13, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions homeassistant/components/switch/rachio.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from homeassistant.components.switch import SwitchDevice, PLATFORM_SCHEMA
from homeassistant.const import CONF_ACCESS_TOKEN

REQUIREMENTS = ['https://github.com/Klikini/rachiopy'
'/archive/2c8996fcfa97a9f361a789e0c998797ed2805281.zip'
REQUIREMENTS = ['https://github.com/rfverbruggen/rachiopy'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Klikini I saw that you created this beautiful rachio component for home-assistant. If you need changes or help with the rachiopy library you can always send me a message! I saw some messages to make the rachiopy component a pypi package, I'll look into that for you! Rachiopy is now a pypi package: https://pypi.python.org/pypi/RachioPy/0.1.1

I use Home-Assistant myself for my home automation so I'm happy to see this implemented with my own API wrapper I once wrote.

'/archive/989bd28ef5353be62e0eabb93b3339f74bc7ee44.zip'
'#rachiopy==0.1.1']

_LOGGER = logging.getLogger(__name__)
Expand All @@ -19,7 +19,7 @@
CONF_MANUAL_RUN_MINS = 'manual_run_mins'
DEFAULT_MANUAL_RUN_MINS = 10

MIN_UPDATE_INTERVAL = timedelta(minutes=5)
MIN_UPDATE_INTERVAL = timedelta(seconds=5)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rachio offers an API for free but hitting it every 5 seconds is going to get us banned.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@balloob, I've been running mine with a 30 second interval and it seems to have the same desired effect, in that regardless of 5 or 30 seconds it updates the correct state on the frontend after about 30 seconds have passed. Do you think leaving timedelta at 30 seconds would be acceptable to not overload the API?

MIN_FORCED_UPDATE_INTERVAL = timedelta(seconds=1)

PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
Expand All @@ -30,6 +30,7 @@


# noinspection PyUnusedLocal
# noinspection PyUnresolvedLocal

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove these warnings. They are not part of linters that the project uses.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this comment.

def setup_platform(hass, config, add_devices, discovery_info=None):
"""Set up the component."""
# Get options
Expand Down Expand Up @@ -143,6 +144,7 @@ def list_zones(self, include_disabled=False):
self.update(no_throttle=True)
return [z for z in self._zones if z.is_enabled]

# noinspection PyUnusedLocal
@util.Throttle(MIN_UPDATE_INTERVAL, MIN_FORCED_UPDATE_INTERVAL)
def update(self, **kwargs):
"""Pull updated device info from the Rachio API."""
Expand Down Expand Up @@ -217,14 +219,11 @@ def update(self):

def turn_on(self):
"""Start the zone."""
# Convert minutes to seconds
seconds = self._manual_run_secs * 60

# Stop other zones first
self.turn_off()

_LOGGER.info("Watering %s for %d sec", self.name, seconds)
self.rachio.zone.start(self.zone_id, seconds)
_LOGGER.info("Watering %s for %d s", self.name, self._manual_run_secs)
self.rachio.zone.start(self.zone_id, self._manual_run_secs)

def turn_off(self):
"""Stop all zones."""
Expand Down