Commit Graph

4295 Commits (d0320a9099b68895deca7c31c56e03dcc6ce662a)

Author SHA1 Message Date
Greg Dowling 5b0ab5c118 Merge pull request #1842 from home-assistant/add_imperial_meter
Add support for imperial gas meter and user specified gas calorific value.
2016-04-18 12:10:07 +01:00
Dan 276c2070be Do not setup or configure a hue bridge twice (#1848)
Tracks previously configured bridges by IP and prevents duplicates
from being configured
2016-04-17 22:41:31 -07:00
Paulus Schoutsen c89e9d87e8 Catch platform setup error (#1847) 2016-04-17 22:07:53 -07:00
Brad Johnson 09693bf16c Upgrading to python-wink 0.7.4 and improving RGB color support in HA (#1832) 2016-04-17 19:07:21 -07:00
Jan Harkes bb439129e6 Bump pywemo version to 0.4.2 2016-04-17 21:02:31 -04:00
Jan-Preben Mossin 5931bac695 Only add visible sonos devices
Some Sonos devices (e.g SUB) does not have
a upnp media renderer, but are discovered as sonos
devices. Creating a SonosDevice object from such a
device will fail.
2016-04-17 16:45:16 -07:00
John Arild Berentsen b45c0cd735 Zwave import fixes for stability (#1845) 2016-04-17 14:46:51 -07:00
Flavio Castelli b5f1c1332a Sonos: better handling of offline players (#1829)
When a sonos player goes offline an endless stream of
exceptions is raised. That happens because homeassistant keeps trying
to refresh its status.

This can happen even when a sonos player has gone offline **before**
homeassistant is started. The sonos players take some time before
realizing one of their mates is no longer online, leading to the same
stream of exceptions inside of homeassistant.

Three types of exceptions of can be raised:

  - `requests.packages.urllib3.exceptions.MaxRetryError`
  - `requests.packages.urllib3.exceptions.NewConnectionError`
  - `TimeoutError`

It's not possible to handle all of them with a single `except` block
because they are raised in a random order and after some delays. That
means a 2nd or 3rd exception can take place while handling the 1st one.

The only solution is to check whether a a player is actually reachable
by attempting to connect to a service that must be running on it.

Also all the players in a 'unknown' state should not be polled by
homeassistant (despite of their brand).

I'm going to upstream the `_is_reachable` method I added to the
`sonos.py` file into `SoCo`. In the meantime we must ship this piece
of code with homeassistant.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
2016-04-17 13:17:13 -07:00
Dan Cinnamon a482c4b2a1 Allow mpd to handle the play_media service. (#1831)
Even though there's not really a place in the UI for it, it will now be possible to set a playlist as part of a script, and ultimately a scene.
2016-04-17 12:34:33 -07:00
deisi e8bf47ff59 Fix for the issue #1323 (#1835) 2016-04-17 12:32:04 -07:00
Paulus Schoutsen ecf411c4c5 Merge pull request #1838 from MartinHjelmare/fix-influxdb
Fix field type conflict in influxdb
2016-04-17 10:43:47 -07:00
pavoni 31f061f4d3 Add support for imperial meter and user soecified calorific value. 2016-04-17 18:34:40 +01:00
icovada b29dedaecf SCSGATE: Actually cycle through all devices to register (#1841)
* SCSGATE: Actually cycle through all devices to register

Modify _activate_next_device function to actually cycle through self-devices_to_register instead of simply checking whether there are any and onl registering one

* Deleted extra white lines
2016-04-17 10:17:42 -07:00
MartinHjelmare ca2d969198 Fix field type conflict in influxdb
* Add STATE_UNAVAILABLE to states that are ignored when writing to the
  database. This will avoid a field type error for string if the field
  already contains a different type, eg integer.
* Add test for ignored states for influxdb.
* Clean up influxdb tests.
2016-04-16 20:25:39 +02:00
Paulus Schoutsen 1cfbeabaec Update frontend 2016-04-16 10:05:29 -07:00
Paulus Schoutsen 68d92c3196 Use standardised datetime format 2016-04-16 01:46:50 -07:00
Justyn Shull d5ca97b1f6 Add tests for purging old states and events 2016-04-15 21:02:17 -05:00
Justyn Shull fd48fc5f83 Add CONFIG_SCHEMA to verify config. Move purge_days key name to
CONF_PURGE_DAYS so it can be changed easier later.

Use 'recorder' domain instead of 'history' domain.

Pass purge_days config directly into Recorder object instead of passing
the config object around.
2016-04-15 19:54:30 -05:00
Justyn Shull c89cd6a68c Add 'purge_days' option to the history/recorder component
Issue https://github.com/balloob/home-assistant/issues/1337

When purge_days is set under the history component, recorder.py will
delete all events and states that are older than purge_days days ago.

Currently, this is only done once at start up.   A vacuum command is
also run to free up the disk space sqlite would still use after deleting
records.
2016-04-15 19:54:30 -05:00
Paulus Schoutsen e7520ef401 Update frontend + mdi 2016-04-14 22:57:41 -07:00
Paulus Schoutsen f5ee3e6e13 Merge pull request #1821 from home-assistant/service-validations
Service validations
2016-04-13 22:38:14 -07:00
Alex Harvey 0abedd8b46 fix for plex not detecting plex players after power up (#1824) 2016-04-13 22:33:30 -07:00
Paulus Schoutsen abd376cbba Merge pull request #1816 from JshWright/feature/accurate-away-temps-nest
Improve Nest target temp display
2016-04-13 22:01:01 -07:00
Øystein Hansen 8b986b0b97 mysensors.py Prevent sensor name mixup (#1802)
Change the sensor name schema so nodes are not mixed up. The dot that was pressent before was ignored by home-assistant.
Before name:  <skeatchname> <node_id><child_id>  eg. wall 107
New name   :  <skeatchname> <node_id> <child_id>  eg. wall 10 7
This will result in a Home Assistant Entity ID of: sensor.wall_10_7
2016-04-13 21:22:40 -07:00
Dennis Karpienski f1d8667d7e Yamaha AVR Input Select (#1796)
* added select input for yamaha

* set source_list to none on init
2016-04-13 21:13:12 -07:00
Jan Harkes 298a1c2af7 Service validation for alarm_control_panel component. 2016-04-13 13:45:11 -04:00
Jan Harkes 5cdaee7ebb Service validation for browser component. 2016-04-13 12:57:47 -04:00
Jan Harkes 7c9729b9c1 Service validation for conversation component. 2016-04-13 12:48:39 -04:00
Jan Harkes 003bd24976 Service validation for downloader component. 2016-04-13 12:35:08 -04:00
Jan Harkes 652fe7e0f2 Service validation for garage_door component. 2016-04-13 12:35:08 -04:00
Jan Harkes 49b002dc53 Service validation for ifttt component. 2016-04-13 12:35:07 -04:00
Jan Harkes 7e0d9bc709 Service validation for input_boolean component. 2016-04-13 12:35:07 -04:00
Jan Harkes bfdbbbddac Service validation for input_select component. 2016-04-13 12:35:07 -04:00
Jan Harkes 620d7a92f0 Service validation for input_slider component. 2016-04-13 12:35:07 -04:00
Jan Harkes 8b40346db3 Service validation for keyboard component. 2016-04-13 12:35:07 -04:00
Jan Harkes 5c520b0d35 Service validation for lock component. 2016-04-13 12:35:07 -04:00
Jan Harkes d6f3123937 Service validation for logbook component. 2016-04-13 12:35:07 -04:00
Jan Harkes 7ffc254a87 Service validation for notify component. 2016-04-13 12:35:07 -04:00
Jan Harkes 40e36126bc Service validation for rollershutter component. 2016-04-13 12:35:07 -04:00
Jan Harkes ad6f5d3b1d Service validation for scene component. 2016-04-13 12:35:07 -04:00
Jan Harkes 567d1065b2 Service validation for script component. 2016-04-13 12:35:07 -04:00
Jan Harkes d90f31bf6e Config and service validation for shell_command component. 2016-04-13 12:35:07 -04:00
Jan Harkes 1deaf2fe8f Service validation for switch component. 2016-04-13 12:35:07 -04:00
Jan Harkes 730514cea8 Service validation for the thermostat component. 2016-04-13 12:35:07 -04:00
Fabian Affolter 85901d60c4 Update file header and fix typos 2016-04-13 13:50:28 +02:00
Robbie Trencheny 05469e6d9b Update pyGTFS version 2016-04-13 00:40:12 -07:00
Paulus Schoutsen 1f96c4ad88 Update submodule 2016-04-12 23:57:07 -07:00
Josh Wright 1685bbe1f7 Fix copy/paste logic error 2016-04-12 18:45:57 -04:00
Josh Wright 942d722dcf Improve target temperature selection logic
When picking which of the high/low temperatures to display as the
"target", it makes more sense to take the outside temperature into
consideration, rather than the current temperature of the thermostat.

If the temperature outside is less than the temperature of the
thermostat, then we are far more likely to end up in "heating" mode
eventually, and vice versa, regardless of where the current inside
temp falls in the range between high and low.
2016-04-12 18:25:24 -04:00
Josh Wright c4a71fbfa7 Include away temps in target temps
The target temperature methods were not taking the 'away' status
into account. leading to misleading target temps being reported.
2016-04-12 18:15:24 -04:00
Daniel Høyer Iversen cd80e41b32 Allow negative elevation in yr config 2016-04-12 07:54:03 -07:00
Paulus Schoutsen 5b8a2b00df Update frontend 2016-04-12 00:24:19 -07:00
Alexander Fortin 24569e6169 Make owntracks.py pylint clean (#1808)
* refactor validation logic into validate_payload function
* add debugging messages to validation
2016-04-11 22:02:47 -07:00
Fabian Affolter 4a16d8064d Enable certificate verification and allow non-encrypted communication (#1763) 2016-04-11 21:55:17 -07:00
Jan Harkes 9d848731d9 Nest config validation (#1810)
* Config validation for Nest platforms.
2016-04-11 21:52:19 -07:00
Jan Harkes 656e187729 Some fixes for yr config validation. (#1809)
The setup_platform function is trying to get CONF_LATITUDE and CONF_LONGITUDE,
but the validation schema was not accepting these.

Also moved CONF_MONITORED_CONDITIONS and CONF_ELEVATION to homeassistant.const
because they are used in other places.
2016-04-11 21:44:39 -07:00
Jan Harkes 241735c924 Change local library path from {config_dir}/lib to {config_dir}/deps. (#1799)
Just on the off chance that someone who happens to run as root and also
doesn't correctly parse "just remove config /lib and restart".
2016-04-11 20:07:50 -07:00
Paulus Schoutsen 4023021b21 Version bump to 0.17.3 2016-04-11 19:48:37 -07:00
Jan Harkes 2c665ca3e4 Do not propagate api password (#1797)
* Do not propagate API password in service requests.

It makes service validation fail. The choice is to either handle it as an
optional key in every service handler and make sure it doesn't end up in event
stream and notifications, or to strip it as early as possible.

* Some places still need a forwarded api password.

- Event forwarding/remote api uses the local api password to
  authenticate against the remote instance.
- The generated index.html at '/' embeds the api password.
2016-04-11 19:48:16 -07:00
Jan Harkes 4857117dda Do not propagate api password (#1797)
* Do not propagate API password in service requests.

It makes service validation fail. The choice is to either handle it as an
optional key in every service handler and make sure it doesn't end up in event
stream and notifications, or to strip it as early as possible.

* Some places still need a forwarded api password.

- Event forwarding/remote api uses the local api password to
  authenticate against the remote instance.
- The generated index.html at '/' embeds the api password.
2016-04-11 19:37:15 -07:00
Josh Wright 80d6e9f08f Use constant time comparison for http authentication (#1804)
In order to prevent a potential timing attack, it's important to make
sure the password check takes the same amount of time, regardless of
how many characters in the candidate password match the real password.

This commit does increase the verbosity of the authentication check.
Generally it is a good idea for authentication logic to be very clear,
even if that requires some extra verbosity.
2016-04-11 19:36:25 -07:00
Robbie Trencheny 0018d2b3f5 Fix flake8 error on zeroconf.py 2016-04-10 18:55:54 -07:00
Robbie Trencheny 5d8cd6d49d Merge pull request #1790 from robbiet480/upnp
UPnP port mapping component
2016-04-10 18:47:47 -07:00
Robbie Trencheny ed6958f477 Change needs_auth ZeroConf key 2016-04-10 18:46:57 -07:00
Robbie Trencheny 27d624fc4a Merge remote-tracking branch 'upstream/dev' into upnp 2016-04-10 18:24:04 -07:00
Paulus Schoutsen 948aa6838d Remove stale print 2016-04-10 18:22:25 -07:00
Robbie Trencheny 6f149d414a Disable import-error on upnp 2016-04-10 18:19:32 -07:00
Robbie Trencheny f1e46e63c0 Merge pull request #1733 from robbiet480/http-zeroconf
ZeroConf component
2016-04-10 18:17:06 -07:00
Robbie Trencheny a3959d5e01 Update netdisco dependency to 0.6.4 (deja vu all over again!) 2016-04-10 18:10:31 -07:00
Robbie Trencheny eca1631f1b Update netdisco dependency to 0.6.3 2016-04-10 18:05:30 -07:00
Robbie Trencheny f30b406334 Merge remote-tracking branch 'upstream/dev' into http-zeroconf 2016-04-10 18:04:56 -07:00
Robbie Trencheny 1de45ebe8b Fix api_password conditional and close zeroconf when we shut down 2016-04-10 17:59:21 -07:00
Robbie Trencheny 5b51f682ca Remove unnecessary disable=no-name-in-module 2016-04-10 17:49:07 -07:00
Robbie Trencheny 41c3f695b4 UPnP port mapping component 2016-04-10 17:44:57 -07:00
Paulus Schoutsen 197388a9b2 Prevent device tracker error 2016-04-10 17:35:33 -07:00
Dennis Karpienski a862e994c7 Thinkingcleaner support (#1784)
* added first implementation of thinking cleaner

* fix lock release

* fixed tox flaws

* updated coveragerc

* fixed lock

* changed update lock

* fixed codestyle
2016-04-10 16:59:53 -07:00
Markus Peter fec45033bc Expanded homematic component with MAX! support via homegear (#1783)
* Expanded homematic component with MAX! support via homegear
Also multithreading fixes

* fixed tox errors

* incorporate changes suggested by balloob

* replaced HomematicConfig Container Class with namedtuple

* fixed lint errors
2016-04-10 16:26:08 -07:00
Robbie Trencheny e1ffdcc5f1 Use hass.config.api instead of hass.http 2016-04-10 16:09:52 -07:00
Robbie Trencheny 085d90ed67 Revert all http.py changes 2016-04-10 16:08:00 -07:00
Daniel Høyer Iversen 769d958464 Config validation for rfxtrx sensor (#1780) 2016-04-10 16:05:32 -07:00
Robbie Trencheny beac69ad17 Final clean up, flake8, pylint, change a variable name, remove unnecessary imports 2016-04-10 16:02:07 -07:00
Robbie Trencheny c33c2c01d2 Break Zeroconf into its own component 2016-04-10 15:34:04 -07:00
Paulus Schoutsen 4f834ba3f1 Make all entity_ids lowercase (#1786) 2016-04-10 15:20:20 -07:00
Paulus Schoutsen 6d65b0bbd7 Update frontend 2016-04-10 15:18:44 -07:00
Daniel Høyer Iversen d3493c7e5a Config validation of yr sensor (#1767) 2016-04-10 10:43:05 -07:00
Josh Wright 24257fe4a3 Don't round values in Thermostat internal state (#1782)
Since all values coming out of the Thermostat component pass though the
_convert_for_display() method (which handles any necessary rounding),
there is no need to round values that only exist in the internal state
of the thermostat device. It serves no purpose and risks rounding
errors/precision loss.
2016-04-10 10:41:13 -07:00
Paulus Schoutsen 3d98b8b5b3 Update frontend 2016-04-10 01:43:40 -07:00
Paulus Schoutsen 988dd2ca83 Update frontend 2016-04-10 01:33:01 -07:00
Joel Asher Friedman 9808c0e3fd mqtt garage door component (#1742) 2016-04-09 20:31:53 -07:00
OpenDave15 91b1ebaeb7 Allow use of pynetgear 3.3 port parameter. (#1777)
* Allow use of pynetgear 3.3 port parameter.

* Fix lint problem
2016-04-09 20:29:06 -07:00
Paulus Schoutsen 1e86044590 Update netdisco to 0.6.2 2016-04-09 20:24:34 -07:00
Paulus Schoutsen fa0be21342 Version bump to 0.17.2 2016-04-09 16:16:05 -07:00
Jan Harkes 7be29468d5 Make yaml config parser errors look less like bugs. (#1776)
Instead of nested tracebacks, show a simpler error message.

    Config directory: /home/user/.homeassistant
    ERROR:homeassistant.util.yaml:duplicate key: "script"
      in "/home/user/.homeassistant/configuration.yaml", line 95, column 0
      in "/home/user/.homeassistant/configuration.yaml", line 108, column 0
2016-04-09 16:15:49 -07:00
Paulus Schoutsen 9924351a42 Prevent device tracker from creating invalid YAML (#1774) 2016-04-09 16:15:49 -07:00
Jan Harkes 73859f59f0 Make yaml config parser errors look less like bugs. (#1776)
Instead of nested tracebacks, show a simpler error message.

    Config directory: /home/user/.homeassistant
    ERROR:homeassistant.util.yaml:duplicate key: "script"
      in "/home/user/.homeassistant/configuration.yaml", line 95, column 0
      in "/home/user/.homeassistant/configuration.yaml", line 108, column 0
2016-04-09 15:25:01 -07:00
Paulus Schoutsen b87e2437aa Prevent device tracker from creating invalid YAML (#1774) 2016-04-09 13:38:51 -07:00
Paulus Schoutsen a41514ca50 0.17.1 (#1771)
* We need to allow extra keys on top level componenet config

fixes #1756

* Add comment about location of hass (fixes #1723)

* Fix for MQTT config validation on the protocol field. (#1765)

* Update frontend with weblink fix

* Fix for light service validation. (#1770)

Incorrect validation tested if passed value was a list instead of
a member of the list.

* Accept group without entities in configuration. (#1768)

* Accept group without entities in configuration.

People seem to use these as placeholders for future expansion of their
home automation dreams, and we used to accept them.  We still have to
specify at least one of 'name', 'view' or 'icon' so that the group is
parsed as a dictionary.

* Also accept empty entities: key in a group.

* Additional fix for empty entities value in a group config.

* Version bump to 0.17.1
2016-04-09 09:55:52 -07:00
Jan Harkes 446d367aeb Accept group without entities in configuration. (#1768)
* Accept group without entities in configuration.

People seem to use these as placeholders for future expansion of their
home automation dreams, and we used to accept them.  We still have to
specify at least one of 'name', 'view' or 'icon' so that the group is
parsed as a dictionary.

* Also accept empty entities: key in a group.

* Additional fix for empty entities value in a group config.
2016-04-09 09:24:18 -07:00
Paulus Schoutsen 982f8f41ae Update frontend with weblink fix 2016-04-09 09:09:17 -07:00
Jan Harkes 7a25ae3e2c Fix for light service validation. (#1770)
Incorrect validation tested if passed value was a list instead of
a member of the list.
2016-04-09 09:07:13 -07:00
Jan Harkes 3aa4727b18 Fix for MQTT config validation on the protocol field. (#1765) 2016-04-09 09:03:41 -07:00
John Arild Berentsen f36cfcdbd9 We need to allow extra keys on top level componenet config
fixes #1756
2016-04-09 10:50:46 +02:00
Paulus Schoutsen ff47cffe8a Version bump to 0.18.0.dev0 2016-04-08 21:43:29 -07:00
Paulus Schoutsen 66bf8df768 Version bump to 0.17 2016-04-08 21:32:26 -07:00
Paulus Schoutsen db3f848905 Correct frontend version 2016-04-08 21:32:18 -07:00
Paulus Schoutsen 2ec9cc15f4 Build frontend 2016-04-08 21:28:59 -07:00
Daniel Høyer Iversen cac555fc69 Rfxtrx config validating (#1747)
* config validation

* Config validation of rfxtrx switch

* Config validation of rfxtrx light

* Config validation of rfxtrx

* Config validation of rfxtrx
2016-04-08 20:55:31 -07:00
Jan Harkes d6abdc0d4e Add line numbers when we find duplicate keys. (#1750) 2016-04-08 20:53:27 -07:00
Jan Harkes db2783c2d1 Upgrade astral (#1754)
* Upgrade astral to 1.0

* Pass timezone as string, not object, to astral.Location.
2016-04-08 20:51:48 -07:00
Jan Harkes c481cbce7e Make tox run faster by using in-memory sqlite db. (#1752)
Two tests were invariably grinding my system to a halt as it was
applying migrations to an empty sqlite database. This patch reduces
the time of a pytest run from 50 to about 16 seconds on my desktop.

The difference is even more noticable on a slower laptop drive, but
is probably insignificant for all you fancy SSD users.
2016-04-08 18:28:19 -07:00
Greg Dowling f5227e1de0 Fix vera breaking component loading order. (#1749) 2016-04-08 11:38:02 -07:00
Fabian Affolter f6331da000 Remove print 2016-04-08 08:03:14 -07:00
Paulus Schoutsen 3dc874dcf5 Update frontend (embed Roboto) 2016-04-08 00:15:02 -07:00
Greg Dowling a7f80608c6 Handle Share off for events in OwnTracks app (#1737) 2016-04-07 12:21:25 -07:00
Jan Harkes 29c30861bf Be flexible in what we accept for script.delay configuration. (#1738)
Accept delay configuration even when someone forgets to indent the time

specification.



Also removed 'weeks' and 'microseconds' from acceptable delay values.

There is a new homeassistant release every 2 weeks and running scripts

are not persisting across restarts. And there is still the option of

using (weeks*7) days if the long delay is really necessary.



And if someone really depends on microsecond delay precision we are

unlikely to be able to provide this accuracy, even milliseconds is

suspect for that matter but will at least allow us to specify some

subsecond delay.
2016-04-07 12:19:28 -07:00
Jan Harkes 5b17f629ad Test function for mqtt topic validators and IsFile() linting fix (#1740)
* Add test function for mqtt topic validators.
* Fix for linting error on vol.IsFile()
2016-04-07 13:52:25 -04:00
Josh Wright 3539193bae vol.IsFile() needs to be called
vol.IsFile results in an instance of the IsFile method being returned by
the schema validation process. It needs to be called in order to do the
right thing.
2016-04-07 12:39:27 -04:00
Paulus Schoutsen 5ff9479f0b Merge pull request #1703 from jaharkes/config-validation-mqtt
Config validation for MQTT
2016-04-07 08:43:01 -07:00
Hernán 7b80ed8135 Add Kodi play media
* Added media_player/play_media service to Kodi

* revert

* fixes

* lint fixed, base class fixed
2016-04-07 08:41:41 -07:00
Daniel Høyer Iversen a1a2e456ad Add test for fire event in rfxtrx component 2016-04-07 08:40:15 -07:00
pavoni 54aa7b80ea Bump pywemo to 0.4.1 - fix non native light issue. 2016-04-07 10:00:25 +01:00
Jan Harkes 3bc06ac79e We need to allow extra keys on the top-level component config. 2016-04-07 00:42:56 -04:00
Jan Harkes 94835235a4 Config validation for mqtt_eventstream component. 2016-04-06 23:25:28 -04:00
Jan Harkes a7016e4b32 Move CONF_STATE_TOPIC, CONF_COMMAND_TOPIC and CONF_RETAIN to mqtt component. 2016-04-06 22:51:39 -04:00
Jan Harkes 0ef0d4bac7 Config validation for automation MQTT trigger 2016-04-06 22:51:39 -04:00
Jan Harkes fca08b095a Config validation for MQTT rollershutter platform. 2016-04-06 22:51:39 -04:00
Jan Harkes deecec5e4e Config validation for MQTT switch platform. 2016-04-06 22:51:39 -04:00
Jan Harkes eb3f812e38 Config validation for MQTT sensor platform. 2016-04-06 22:51:39 -04:00
Jan Harkes 3383854506 Move CONF_OPTIMISTIC to homeassistant.const. 2016-04-06 22:51:39 -04:00
Jan Harkes c8df06bb9f Config validation for MQTT lock platform. 2016-04-06 22:51:38 -04:00
Jan Harkes 4e864b5caa Rename _mqtt_topic to valid_subscribe_topic. 2016-04-06 22:51:38 -04:00
Jan Harkes 29a8403741 Config validation for MQTT light platform. 2016-04-06 22:51:38 -04:00
Jan Harkes 88da42fe62 Config validation for MQTT device_tracker platform. 2016-04-06 22:51:38 -04:00
Jan Harkes 287f0f4f68 Config validation for MQTT binary_sensor platform. 2016-04-06 22:51:38 -04:00
Jan Harkes 0bd4e15fcb Config validation for MQTT alarm_control_panel platform. 2016-04-06 22:51:38 -04:00
Jan Harkes 2c119091dc Add MQTT schema validation functions for platform schemas. 2016-04-06 22:51:38 -04:00
Jan Harkes 8cca2bb344 Config validation for MQTT 2016-04-06 22:51:38 -04:00
Josh Wright 2e9bf42688 Disable updater.updater on dev versions
The Updater component doesn't make much sense on dev versions. If you

want to run a production config with the updater enabled, you end up

with an 'Update Available' badge pointing you to the last release

version. This change disables the Updater component on dev and updates

the tests to use a faked version number.



A warning is emitted if the Updater component is disabled to ensure

there is no confusion.
2016-04-06 18:46:48 -07:00
Andrew McClure c99617d6e5 Ensure server_host is respected in configuration.yaml 2016-04-06 18:45:40 -07:00
Will Hughes 5a32ddbe6f Update Orvibo platform to the switch component, add 'mac' option
This adds an optional 'mac' configuration option to the platform which

is passed to the underlying Orvibo library. The 'mac' option is required

when the switch is connected to a different subnet to the Home Assistant

host
2016-04-06 14:52:21 -07:00
Robbie Trencheny 27aabd961c Remove unnecessary variable 2016-04-06 13:51:43 -07:00
Robbie Trencheny 86dad0c045 Add ZeroConf support to http.py 2016-04-06 13:51:26 -07:00
Josh Wright 29fb6faa40 Use whole degrees fahrenheit for thermostats
Users of fahrenheit generally expect to see whole degrees. The fahreneit

scale is suffiently precise that decimals aren't really useful in terms

of temperatures humans care about.



This change rounds fahrenheit values to whole degrees and celsius values

to one decimal place. It also renames the ThermostatDevice._convert()

method to _convert_for_display(), making its purpose more clear. It is

not useful for the min_temp() and max_temp() methods, as those relate to

the internal state of the ThermostatDevice object, and may use different

units. Adding optional source and target units to _convert() would have

added needless complexity, it's cleaner to just use convert() in those

methods.
2016-04-06 11:54:50 -07:00
Alexander Fortin e8efcd21df Increase sonos volume increment from 1 to 5 2016-04-06 11:32:27 -07:00
Daniel Høyer Iversen cfb318287d Refactor rfxtrx component 2016-04-06 10:34:51 -07:00
Fabian Affolter 2e44166854 Change to freegeoip.io and add a second service as fall-back 2016-04-06 10:25:40 -07:00
Paulus Schoutsen b4ddc86304 Fix speedtest with external installed package 2016-04-06 07:38:35 -07:00
Florian Holzapfel ecc440f459 add panasonic viera tv media player device 2016-04-05 22:51:55 -07:00
Jan Harkes dbbbed404c Detect duplicate keys in configuration.yaml. 2016-04-05 21:21:16 -07:00
Jan Harkes 3bb571b578 Bump rxv to 0.1.11.
Fixes socket read/write timeout issues.
2016-04-05 14:17:42 -04:00
Paulus Schoutsen 8ef542927f Add automation config validation
* Add automation config validation

* Remove unnecessary dict validator

* Downgrade voluptuous to 0.8.9

* Fix linting

* Address issues
2016-04-04 12:18:58 -07:00
Jan Harkes cbe9a7d2a3 Add case insensitive testing to boolean string validation. 2016-04-03 21:38:58 -07:00
Robbie Trencheny eb415d7b96 Allow passing in a dictionary of provider specific data 2016-04-03 17:54:58 -07:00
Justyn Shull c232242af0 Add support for monitoring nzbget
Calculate average download rate the same way as downloadrate



Add config option for choosing which nzbget variables to monitor, and provide a default



Pep8 fixes



Refactoring and changes based on @balloob's comments



Add nzbget.py to .coveragerc omit list.  Check if there are any http

errors (like bad auth) when creating the nzbgetapi class.   If there

are, the setup_platform() function will return false.  Exceptions are

logged as well.

When a new sensor is created, assign the initial value from the api

instead of simply using None until the first update call.
2016-04-03 15:57:50 -07:00
Robbie Trencheny d00e63486a This code never properly worked because the incorrect variable was used 2016-04-03 15:45:44 -07:00
Paulus Schoutsen e140e9b8ab Add script + extra config validators
* Add config validation and extra validators

* Address PR comments
2016-04-03 10:19:09 -07:00
Paulus Schoutsen 7ed5055fa2 Fix MQTT linting 2016-04-03 02:25:02 -07:00
Jan Harkes 9ce2081110 Coerce ascii flags in MQTT publish service call.
Also fixes a bug where the test when no payload is given succeeds only

because we run the jinja templating out of memory. Sending an empty

payload instead of trying to fix it through validation for now.
2016-04-03 00:54:05 -07:00
Fabian Affolter 24b7a7b964 Add source ip to log entry 2016-04-03 00:46:05 -07:00
Paulus Schoutsen f6d584af09 Allow platforms to specify PLATFORM_SCHEMA 2016-04-02 20:10:57 -07:00
Kai 4fba89b789 Add Z-Wave thermostat
based on @coteyr work and with a help from @turbokongen
2016-04-02 20:01:03 -07:00
Greg Dowling 61a9562811 Reconnect loopenergy
* Bump pyloopenergy version to handle disconnects. Round floats.

* Bump pyloopenergy version - to support reconnect.
2016-04-02 08:47:21 -07:00
Jan Harkes 5c753f8ffd Service validation for MQTT component.
* Service validation for MQTT component.

* Fixes for failing mqtt tests.

- Changed behaviour when both 'payload' and 'payload_template' are provided
  instead of silently ignoring the payload_template value.
- Have validation accept any type of payload and leave encoding to paho-mqtt.
2016-04-02 08:46:09 -07:00
sander76 ebd053824d changed scene name to unique powerview id's 2016-04-02 08:41:57 -07:00
Jan Harkes afd1e6a5cc Service validation for media_player component 2016-04-02 03:51:03 -04:00
Paulus Schoutsen 5c262753d4 Merge pull request #1677 from jaharkes/config-validation-nest
Config validation for Nest component
2016-04-01 08:07:31 -07:00
Paulus Schoutsen a0df7d9ff3 Merge pull request #1674 from jaharkes/group-order
Maintain group ordering across validation.
2016-04-01 08:06:01 -07:00
pavoni 6ee086c0bb Fix thread termination on exit. 2016-04-01 15:36:33 +01:00
Jan Harkes faebc9e2c4 Config validation for nest component 2016-04-01 10:31:39 -04:00
Jan Harkes d0b7f6cfb0 Bump pywemo version 2016-04-01 10:02:55 -04:00
Jan Harkes e5eb3b13c4 Maintain group ordering across validation. 2016-04-01 09:45:27 -04:00
Paulus Schoutsen deffbeb922 Update frontend 2016-04-01 00:37:30 -07:00
Paulus Schoutsen 7df8e010f3 Merge pull request #1665 from balloob/update-netdisco
Update netdisco dependency
2016-03-31 23:35:32 -07:00
Paulus Schoutsen ee91bcc601 Update netdisco dependency 2016-03-31 23:30:08 -07:00
Paulus Schoutsen c8e88d923a Merge pull request #1648 from balloob/yr_default_config
Add yr weather component to default config
2016-03-31 23:28:14 -07:00
Paulus Schoutsen 423d8be83f Merge pull request #1658 from balloob/add_loop_energy
Add loop Energy sensors.
2016-03-31 23:16:23 -07:00
Paulus Schoutsen b063fa3165 Merge pull request #1646 from balloob/rfxtrx
Fixed bug in rfxtrx sensor
2016-03-31 22:12:04 -07:00
Paulus Schoutsen 489c5b8188 bootstrap platform components: adjust instead of replace config 2016-03-31 21:11:14 -07:00
Jan Harkes b45bbbcecf Merge pull request #1661 from jaharkes/service-call-validation
Service call validation
2016-03-31 23:36:11 -04:00
Jan Harkes 6d914126fa Validate data read from light_profiles.csv 2016-03-31 23:29:07 -04:00
Jan Harkes 4f3dc2ce8b Coerce RGB and XY color values to tuples instead of lists. 2016-03-31 22:59:18 -04:00
Jan Harkes 017f47dd2c Service validation for light.turn_on/.turn_off/.toggle 2016-03-31 22:03:38 -04:00
Jan Harkes 5bd58351c7 Move service scheme validation into Service.__call__
Keeps where the schema is stored and validated close.
2016-03-31 21:13:40 -04:00
Alexander Fortin b304b77005 FIX enable volume commands for non-coordinators too 2016-03-31 21:36:58 +02:00
Jan Harkes 64030b9d48 Add validation schema as optional argument to service registration. 2016-03-31 14:59:36 -04:00
pavoni c41e63806c Add loop Energy sensors. 2016-03-31 17:00:43 +01:00
root 7b1ec418f2 Fix crash of Rfxtrx component when using config option fire_event 2016-03-30 16:20:19 +02:00
Daniel 00eda74c7e Add yr weather component to default config 2016-03-30 11:33:35 +02:00
Daniel c4062bf6ea Fixed bug in rfxtrx sensor 2016-03-30 10:57:26 +02:00
Charles Spirakis b8ea743843 Enable zwave test_network command.
Allows for testing the zwave network by sending
a no-op command to all the nodes. In theory,
this will also bring back nodes which have been
put in the "presumed dead" state.
2016-03-30 01:29:11 -07:00
Paulus Schoutsen 5b00919bed Merge branch 'pr/1643' into dev
Conflicts:
	requirements_all.txt
2016-03-29 23:23:45 -07:00
Paulus Schoutsen a4ffec341b Merge pull request #1633 from balloob/config-validation
Add initial config validation
2016-03-29 23:01:36 -07:00
Paulus Schoutsen ac28228e6b Either validate component config or platform config 2016-03-29 22:51:33 -07:00
Paulus Schoutsen d0e613194e Merge pull request #1644 from robbiet480/uber-fixes
Uber sensor breaking fix
2016-03-29 22:20:21 -07:00
Robbie Trencheny 56e64d477a Little fixes 2016-03-29 21:02:17 -07:00
Robbie Trencheny 55daf51108 Dont set default value for price_details to empty dict since we want to check price_details for is None 2016-03-29 20:42:15 -07:00
Robbie Trencheny 60b427accc Flake8 and Pylint fixes 2016-03-29 20:36:04 -07:00
Robbie Trencheny 0ac34aaa52 Fix for when you have an Uber product that doesnt give a price estimate 2016-03-29 20:14:27 -07:00
Daniel J. Kemp 86199c8277 Add onkyo receiver, and source select support
Added onkyo receiver component

Added support for input source selection to media players,
and do the onkyo receiver component.
2016-03-29 22:17:36 -04:00
Robbie Trencheny 9f5e192761 Uber Rides SDK has been updated upstream to support Python3. No need for this fork anymore! 2016-03-29 18:44:36 -07:00
Paulus Schoutsen 25269cdb6b Add tests for bootstrap config validation 2016-03-29 00:17:53 -07:00
Paulus Schoutsen a35173a5ff Surpress silly warnings 2016-03-28 23:46:19 -07:00
Paulus Schoutsen 5baa98b79f Add initial config validation 2016-03-28 23:46:12 -07:00
Paulus Schoutsen 0549bc0290 Merge pull request #1636 from srcLurker/zwave_polling
Zwave cleanup for startup and poll_intensity.
2016-03-28 14:12:10 -07:00
Charles Spirakis f28aa030e6 Zwave cleanup for startup and poll_intensity.
If the polling intensity is zero, specifically
disable polling for that device/sub device.

Have zwave startup wait until the zwave
nework is ready (defined by python openzwave docs):

https://python-openzwave.googlecode.com

SIGNAL_NETWORK_AWAKED : all awake nodes are queried. Some sleeping nodes may be missing.

and

You can safely ask node informations when state >= STATE_AWAKED

This appears to make the polling of nodes a bit more deterministic.
2016-03-28 10:49:58 -07:00
Paulus Schoutsen 69fd927656 Update frontend 2016-03-28 00:15:26 -07:00
Paulus Schoutsen e989c8a24a Merge pull request #1624 from balloob/http-11
Use HTTP 1.1
2016-03-27 23:21:52 -07:00
Paulus Schoutsen 9089f19165 Merge pull request #1627 from balloob/python-check
Fix broken Python check for Python 2
2016-03-27 22:41:24 -07:00
Paulus Schoutsen f30376443f Merge pull request #1623 from robbiet480/gtfs-sensor
GTFS sensor
2016-03-27 22:40:20 -07:00
Paulus Schoutsen fe73cbbcb6 Revert pyicloud upgrade 2016-03-27 22:14:51 -07:00
Paulus Schoutsen 79a2d40f4d Merge pull request #1590 from LucaSoldi/some-feature
Added Raspberry Pi Camera Component
2016-03-27 14:00:28 -07:00
Paulus Schoutsen 7cb69ae9d9 Make sure we always sent content-length header 2016-03-27 12:15:41 -07:00
Luca Soldi d0503cc021 Add feature
√ add file_path config
√ changed subprocess call
2016-03-27 20:49:04 +02:00
Paulus Schoutsen c63a3311f4 Fix broken Python check for Python 2 2016-03-27 08:44:15 -07:00
Fabian Affolter 2db49ebca5 Add connectivity to sensor classes 2016-03-27 11:48:48 +02:00
Paulus Schoutsen 4cbd49921f Use HTTP 1.1 2016-03-26 19:03:16 -07:00
Robbie Trencheny 2a194d8861 Use named string formatting for safety 2016-03-26 18:55:49 -07:00
Paulus Schoutsen d8121ed8b2 Merge pull request #1621 from balloob/fix-owntracks-acc-bug
Cast acc to float before comparison.
2016-03-26 18:55:11 -07:00
Robbie Trencheny dac3c9d1b5 Pylint and flake8 2016-03-26 18:53:21 -07:00
Robbie Trencheny 5a35e4a9ba Data source validation 2016-03-26 18:52:03 -07:00
Robbie Trencheny 1fd96296f7 Use parameterized queries when possible 2016-03-26 18:47:54 -07:00
Robbie Trencheny 116b83b53f Fix PyGTFS import errors 2016-03-26 18:25:49 -07:00
Robbie Trencheny f31ba11861 Lock SQLAlchemy 2016-03-26 18:05:34 -07:00
Robbie Trencheny 982baaba22 Annoying missing period 2016-03-26 17:59:38 -07:00
Robbie Trencheny 8fe1a9f008 Pylint and flake8 2016-03-26 17:53:46 -07:00
Robbie Trencheny 90f1b57ed8 Initial GTFS sensor 2016-03-26 17:41:09 -07:00
Fabian Affolter ee36c36783 Add support for sensor classes 2016-03-26 23:39:56 +01:00
pavoni c7e49f20d3 Cast acc to float before comparison. 2016-03-26 22:38:24 +00:00
Flyte ada561df30 Remove unused import and unnecessary DOMAIN constant from TCP components. 2016-03-26 17:33:18 +00:00
Ellis Percival 15303fd32d Remove unnecessary dependency from TCP binary sensor for #1617 2016-03-26 16:42:53 +00:00
Fabian Affolter 2c45d1f27d Upgrade pyowm to 2.3.1 2016-03-26 12:50:12 +01:00
Paulus Schoutsen 9d0b15421c Version bump to 0.17.0.dev0 2016-03-26 01:02:30 -07:00
Paulus Schoutsen e53adf003c Version bump to 0.16 2016-03-26 01:01:46 -07:00
Paulus Schoutsen 3df946aa9e Merge pull request #1598 from aoakeson/dev
Yamaha Receiver Support
2016-03-26 00:05:05 -07:00
Andrew 2285a6761c Initial Yamaha Receiver Implementation
Text Update

Additional additions and better support for volume, and mute.  Cleanup

Added rxv to requirements_all

Added yamaha.py to .coveragerc

Made uppercase, and removed tabs

Added requirements variable

Added doc string for lint

Removed global variable, and simplified state as per balloobs suggestion

Refactored the component with balloobs suggestions

-Added import in the method
- Only get receiver information on init
- A bit of cleanup

Remove up and down volume

Uneeded as this is handled by set volume instead

Fixed a lint build error

More lint fixes

Removed unused imports

Lint Fixes

Simplified if statement

Minor refactoring since the init calls update.

Fixed lint error

Just variable naming change

Added support for an optional name for the receiver.

Better error handling, a bit of refactoring based on balloobs suggestions

Fixed lint error.

Another lint error fix

Changed raise to return

Disable pylint error handling

Pylint broad exception

Made exception handling in the setup platform instead of the constructor.

Lint error fix

Refactored the way devices are found.  This allows for multiple receivers
2016-03-26 00:47:00 -06:00
Robbie Trencheny ce4933d637 Fill out services.yaml for media_player 2016-03-25 23:38:10 -07:00
Paulus Schoutsen de6fc771cb Merge pull request #1607 from fabaff/sensor-class-rest
Add support for sensor classes
2016-03-25 23:27:21 -07:00
Robbie Trencheny de68be06dd Misspelling fix 2016-03-25 22:57:28 -07:00
Robbie Trencheny 950cc9e618 Add play_media support to Sonos 2016-03-25 22:57:14 -07:00
Paulus Schoutsen a3d505f45e Merge pull request #1610 from robbiet480/gntp
Add GNTP notifier
2016-03-25 22:09:13 -07:00
Paulus Schoutsen befdecc3b0 Merge pull request #1602 from robbiet480/uber-sensor
Uber sensor
2016-03-25 21:51:03 -07:00
Paulus Schoutsen b92a51c1c3 Merge pull request #1603 from balloob/chore/template-race-condition
Clean up template platforms
2016-03-25 21:48:36 -07:00
Robbie Trencheny 20f8935b86 Clean up a lot of pep8 and syntax errors. 2016-03-25 19:32:49 -07:00
Robbie Trencheny 652c666d14 Add GNTP notifier 2016-03-25 18:39:08 -07:00
Fabian Affolter 9157bd38e8 Update docstrings 2016-03-25 20:35:38 +01:00
Fabian Affolter f0970f4104 Add support for sensor classes 2016-03-25 18:34:58 +01:00
Paulus Schoutsen 41f205e09d Clean up template platforms 2016-03-24 23:22:17 -07:00
Robbie Trencheny 5b18ea4237 Fix all pylint, flake8 and pydocstyle issues 2016-03-24 22:30:10 -07:00
Paulus Schoutsen 70ce179224 Merge pull request #1551 from w1ll1am23/command_line_assumed
Added assumed state to command_line switch
2016-03-24 21:54:36 -07:00
Robbie Trencheny 0b9699fd4b Uber sensor 2016-03-24 19:48:10 -07:00