Commit Graph

11204 Commits (81324806d53adf004fa1db6dff8c70341ec86180)

Author SHA1 Message Date
Eric Hagan ed3f7d1581 OwnTracks work. Beacon logic and testcases (#10183)
* OwnTracks work. Beacon logic and testcases

The existing test cases don't really make clear what is being
tested and the iBeacon / Region / Zone / Tracker thing is all
a bit confused.

I'm distinguishing a fixed-place beacon used to trigger entrance
into an HA zone (as a Region Beacon) from a beacon affixed to a
portable or mobile object (as a Mobile Beacon). The behaviors
and test cases for those usages should be different. A Region Beacon
will be named the same as a Home Assistant Zone and seeing an event
from that beacon should trigger a device tracker update related
to that zone. It would be appropriate, though unnecessary, to
configure the Region Beacon with the GPS coordinates of its static
physical location.

A Mobile Beacon is not named after any HA Zone and seeing the beacon
triggers an update in HA setting the location of the beacon to the
current device_tracker location. In this way, when my_phone sees
the beacon on my_keys, the location of my_keys is set to where
my_phone is. And when my_phone stops seeing my_keys, my_keys location
is the location of my_phone the last time it saw them.

A Mobile Beacon's GPS information should be ignored because it's
almost certain to be incorrect because the beacon moves. In fact,
beacons typcially come configured with lat/lon as 0.0/0.0 so using
the location of the beacon in an update has a nasty habit of
setting you and your keys on the bottom of the Atlantic Ocean.

Leave message handling is changed to treat mobile beacons
differently from region beacons and gps regions.

active beacons should be a set. you shouldn't end up
with multiple "active" entries for the same beacon. Let's
enforce that with the correct data structure.

Added test for real-world bug that is fixed.
A series of mobile beacon and region beacon
enter and leave events could cause a mobile
beacon to stick to the tracking device even
though it had tracked through a "leave" event.

Changed two tests to look at the size
of the 'mobile_beacons_active' structure rather
than at the object which will allow this test
to work with any sort of list, set, etc.

* Removing excess logging and unnecessary try catch.

From review on PR #10183 I've removed some info logging
that was unnecessary and I've made the suggested changes
to an if block and a try/catch.
2017-10-31 00:18:45 -07:00
Mark Jozefiak 062fb7ac4c Add priority attribute for hyperion (#10102)
* light.hyperion: Add priority attribute

Allows to set the priority of the hyperion remote instance.

* fix lint errors

* Remove whitespace
2017-10-30 21:48:42 +01:00
Fabian Affolter cc293db5ab
Update services.yaml files (#10229)
* Add period to the description

* Update abbreviation
2017-10-30 21:39:12 +01:00
Sean Dague c9c102815a Clarify yamaha play_media parameters (#10228)
The play_media parameters are a little bit black magic for the yamaha
platform, this explains what they are in a code comment instead of
having to go look at the yamaha platform itself.

Fixes Bug #10180
2017-10-30 21:38:52 +01:00
Jan Almeroth 5d23afdc9e Introducing multi-zone support for yamaha_musiccast devices (#9968)
* Introduce zones to yamaha_musiccast
* Introducing new config 'interval_seconds'
* Version bump pymusiccast
* Removing name parameter
2017-10-30 13:50:20 -04:00
Sebastian Muszynski e95b48ca44 Xiaomi Aqara: Remove/Add device service added (#10150)
* First draft of a remove device service. Fixes https://github.com/home-assistant/home-assistant/issues/9571.

* Add device service introduced. Enables the join permission of the gateway to pair a new sub device within the next 30 seconds.

* Schema validation added and some refactoring.

* A more precise validation of the gw_mac (ffffffffffff vs. ff:ff:ff:ff:ff:ff).

* Persistent notification added to provide some feedback.

* Pylint warning disabled. The methods are used indirectly.

* CODEOWNERS reference updated.
2017-10-30 17:33:16 +01:00
Aaron Bach 646c03eea1 Add entity_picture_template options to Template Cover, Template Light, Template Sensor, and Template Switch (#9854)
* Re-adding cover

* Re-adding light

* Re-adding sensor

* Re-adding switch

* Re-added tests

* Fixing missing imports in rebased test

* Fixing broken tests

* Owner-requested changes

* Owner-requested changes

* Fixed exception
2017-10-30 09:28:37 -07:00
Nicolae Vlădescu 05ece53ec2 Librouteros capsman fix (#10217)
* Catch MultiTrapError exceptions also

* Expect librouteros api exceptions on every call and also set fallbacks

* Do not re raise

* Fix lint issue
2017-10-30 08:41:37 +01:00
David Grant b5214af762 Add gc100 platforms and component (#10159)
* Initial commit of gc100 platforms and component

* Fixed removed temporary code to set import path

* Fixed removed unused import

* Implementing changes requested by @fabaff

* Fixed linter errors

* Remove reference to binary sensor

* Move const

* Add const

* Fix pylint
2017-10-30 08:40:14 +01:00
Marcelo Moreira de Mello 3630dc7ff3 Raincloudy version bump (#10225) 2017-10-30 08:36:38 +01:00
Peter Epley e7fc8a1890 Google Assistant Script Support (#10148)
* Add script support as scene

* Add script support as scene

* Corrected missing script definition
2017-10-30 00:11:23 -07:00
Fabian Affolter 2891b0cb2e Upgrade restrictedpython to 4.0b2 (#10179)
* Upgrade restrictedpython to 4.0b2

* Update test
2017-10-30 00:02:15 -07:00
Paulus Schoutsen fc44a4ed99 Update frontend 2017-10-29 23:29:49 -07:00
Pascal Vizeli 444b7c5ee7
Add new service 'snapshot' for camera (#10207)
* Add new service 'snapshot' for camera

* Fix lint

* fix arguments

* Add test and fix bugs

* Fix lint

* Fix typo
2017-10-29 23:14:26 +01:00
Fabian Affolter 690760404b
Move constant to 'const.py' and use already defined ones (#10211) 2017-10-29 17:28:07 +01:00
Greg Dowling 6a9968ccb9 Bump pyvera to 0.2.38. (#10206) 2017-10-29 13:50:21 +01:00
Fabian Affolter e91ed1f2a4 Upgrade youtube_dl to 2017.10.29 (#10202) 2017-10-29 12:32:33 +01:00
Fabian Affolter 115c59d88c Move constant to 'const.py' and use already definied ones (#10204) 2017-10-29 12:32:02 +01:00
Fabian Affolter 97bb252d23
Upgrade pylast to 2.0.0 (#10200) 2017-10-29 11:54:11 +01:00
cgtobi 20a1a52bd5 Add unit test for hddtemp sensor. (#10154)
* Add unit test for hddtemp sensor.

* Remove sample fixture and include it in the code.

* Add test to raise coverage.

* Fix bug when host is not reachable.

* Minor code cleanups.

* More code cleanups.
2017-10-29 11:53:53 +01:00
Patrik 9e27e05a84 Update CODEOWNERS (#10198)
Adding myself to monitor tradfri
2017-10-29 11:19:34 +01:00
Fabian Affolter 67c48736a2
Add clickatell (#10199) 2017-10-29 11:19:04 +01:00
Fabian Affolter 35805e51a3
Add Random binary sensor (#10164) 2017-10-29 11:15:57 +01:00
TopdRob 6057b41151 update boto3 to 1.4.7 and botocore to 1.7.34 (#10121) 2017-10-29 10:24:56 +01:00
David Lloyd 2374659984 Added new Clickatell SMS messaging Notify Platform (#9775)
* Added new Clickatell SMS messaging Notify Platform

* Added new Clickatell SMS platform with layout corrections

* Added new Clickatell platform with additional  layout corrections

* Added new Clickatell platform with exception handling removed

* Added new Clickatell platform with poor reference removed

* Reversed changes to dev_docker file

* Minor changes
2017-10-29 09:14:40 +01:00
Egor Tsinko 2c3195522f media_title property now returns current source (#10120) 2017-10-29 02:26:55 +02:00
Greg. A b3e88d1f8f Add Sytadin Traffic component (#9524)
* Add Sytadin Traffic component

* Add Sytadin Traffic component, update

* Add Sytadin Traffic component, update

* Add Sytadin Traffic component, update

* Add Sytadin Traffic component, update

* Add Sytadin Traffic component, update

* implements @fabaff comments

* Formatting

* formatting

* formatting

* split monitored condition to be independent

* formatting

* add version

* fix requirements part based on gen_requirements_all.py result

* formatting

* requirements stuff file

* formatting

* add missing file into .coveragerc

* add me for code review

* configuration management updated

* implements @fabaff and @pvizeli comments

* indentation

* indentation

* indentation

* indentation

* add const DEFAULT_UPDATE_INTERVAL

* use const DEFAULT_UPDATE_INTERVAL

* remove blank line

* fixes debug call

* clean for loop

* use BeautifulSoup for html parsing

* Update requirements

* Add throttle and fix remaining issues

* Don't add const
2017-10-29 01:34:55 +02:00
Florian Klien dd7d8d56bb added Yesss SMS platform (#10177)
* added Yesss SMS component

requires YesssSMS==0.1.1b

* requirements_all

* coveragerc

* fix

* docstring fix

* added Exception handling

* requirements_all

* fixing lint error, version bump for YesssSMS
2017-10-29 01:05:56 +02:00
Sebastian Muszynski df19172e56 Limits of the favorite level updated. Values between 0 and 16 will be accepted. (#10186) 2017-10-28 10:54:11 +02:00
Marcelo Moreira de Mello f060dcc0aa Added capability to pass a filename to the downloader component (#10059)
* Added capability to pass the filename to the downloader component

* Simplified filename conditions
2017-10-27 22:50:02 +02:00
Menno Blom 5c168ab551 Nederlandse spoorwegen (#10136)
* Add Nederlandse Spoorwegen sensor

* Remove unused 'delay' option.

* Apply requested code reviewed changes

- use constants from const.py
- ensure the configuration is a list
- verify credentials upon platform setup
- verify station input
- add True as second param to add_device
- only call add_device if at least 1 sensor was setup
2017-10-27 22:19:12 +02:00
Sebastian Muszynski fe9b45c964 Xiaomi MiIO Light: Philips Eyecare Lamp 2 support (#10007)
* Xiaomi Philips Eyecare Lamp 2 support introduced.

* Code clean-up.

* Make hound happy again (idents).

* Revert "Code clean-up."

This reverts commit ea637602ff.

* Unused platform constant removed.

* Nice compromise of the code clean-up implemented.
2017-10-27 22:04:48 +02:00
Fabian Affolter 38c189ecf4
Revert "Upgrade restrictedpython to 4.0b2"
This reverts commit 8e4f0ea5ae.
2017-10-27 21:52:44 +02:00
Fabian Affolter 8e4f0ea5ae
Upgrade restrictedpython to 4.0b2 2017-10-27 21:50:22 +02:00
Lukas Barth 248d974ded Cast attribute values to string before publishing to MQTT (#9872)
* Cast attribute values to string before publishing to MQTT

* Simplify

* Use JSON serialization, add test
2017-10-27 08:55:04 -07:00
Ryan McLean 2d93285689 Linode (#9936)
* Fix: Last Played Media Title in plex would stay even when player was idle/off
     Primary Fix is in the "if self._device" portion.
     code in "if self._session" is a catch all but i'm not 100% if it is needed.

* Fixed lint issues with previous commit

* 1st Pass at refactoring plex refresh
Moved _media** into clearMedia() which is called in _init_ and
at start of refresh.

Removed redunant _media_* = None entries

Grouped TV Show and Music under single if rather than testing
seperately for now.

* Fixed invalid name for _clearMedia()
Removed another media_* = None entry

* Removed print() statements used for debug

* Removed unneeded "if" statement

* Added Base Support for Linode

* Removed unused Attr

* Corrected some Typos

* updated requirements & coveragerc

* added import to prevent var not declared errors in linter

* Fixed Typo

* Added Switch Component for Linode and corrected some errors if data was blank

* Updated api lib to hopefully remove dependancy on enum34

* Fixed Reference error

* fix pylint errors

* Update linode.py

* Update linode.py

* Update linode.py

* Update linode.py
2017-10-27 16:19:47 +02:00
bastshoes 68390373e5 Fix for issue #9240 (#10173)
Changes for respecting mqtt fan config. If fan speed and oscillation is not configured they wouldn't be displayed in UI.
2017-10-27 16:04:18 +02:00
randellhodges c0f8e6c5c5 Updated denon component to play nice with the 3808CI that doesn't support NSFRN command (#10157) 2017-10-27 14:22:23 +02:00
Casper Weiss Bang 85d7377beb MPD now uses the filename if song doesn't have metadata (#10085)
* added support for filename

* used the getter instead - minor mistake

* changed how the filename is generated
2017-10-27 11:21:47 +02:00
Anders Melchiorsen f17cf1d26b Avoid Sonos errors for tracks with no artist information (#10160)
Rather than adding guards to the string formatting, just remove this
unused attribute.
2017-10-27 10:50:03 +02:00
Anders Melchiorsen e50b59a56c Reduce album art flickering in media player UI (#10163)
* Add HTTP cache header to proxied media player images

With the resource actually being cacheable, preemptively extend the cache
buster key to prevent hash collisions.

While at it, change the hash from md5 to sha256 for consistency with the
access_token method.

* Remove lint
2017-10-27 10:49:20 +02:00
Fabian Affolter e43fefa8f6 Support for NO-IP (#10155)
* Support for NO-IP

* Update URL
2017-10-27 10:15:47 +02:00
Yannick POLLART e819678e27 Rfxtrx binary sensor rewrite (#10152)
* Refactored Lighting4-specific code (issue #8907)

* Fixed lint problem and removed unneeded function call.

* fixed malformed if

* removed backslash

* fixed code for pylint

* removed useless assignment

* using hasattr() instead of try/catch
2017-10-27 10:01:46 +02:00
Florian Klien 9df7302603 New DTLSSocket version that fixes Cython dependency for Trådfri (#10123) 2017-10-27 07:53:36 +01:00
Fabian Affolter afe88dfa0f Upgrade libnacl to 1.6.1 (#10161) 2017-10-27 08:01:32 +02:00
Fabian Affolter 027ce2f555 Upgrade python_opendata_transport to 0.0.3 (#10162) 2017-10-27 08:01:12 +02:00
Fabian Affolter 63a10233c5 Upgrade sendgrid to 5.3.0 (#10166) 2017-10-27 08:00:53 +02:00
Egor Tsinko acbf45d5f8 added platform discovery code back into device_tracker (#10169) 2017-10-27 07:57:31 +02:00
Paulus Schoutsen d13f3eca92 Update frontend to 20171027.1 2017-10-26 22:29:59 -07:00
Andrey fc291dd5ab Don't use pypi package in dev mode. Allow non-fingerprinted mdi. (#10144) 2017-10-26 22:28:07 -07:00