Commit Graph

8571 Commits (541707c3e70e476cc45fc9af4ac693491101bee0)

Author SHA1 Message Date
Greg Laabs d687bc073e Huge ISY994 platform cleanup, fixes support for 5.0.10 firmware (#11243)
* Huge ISY994 platform cleanup, fixes support for 5.0.10 firmware

# * No more globals - store on hass.data
# * Parent ISY994 component handles categorizing nodes in to Hass components, rather than each individual domain filtering all nodes themselves
# * Remove hidden string, replace with ignore string. Hidden should be done via the customize block; ignore fully prevents the node from getting a Hass entity
# * Removed a few unused methods in the ISYDevice class
# * Cleaned up the hostname parsing
# * Removed broken logic in the fan Program component. It was setting properties that have no setters
# * Added the missing SUPPORTED_FEATURES to the fan component to indicate that it can set speed
# * Added better error handling and a log warning when an ISY994 program entity fails to initialize
# * Cleaned up a few instances of unecessarily complicated logic paths, and other cases of unnecessary logic that is already handled by base classes

* Use `super()` instead of explicit base class calls

* Move `hass` argument to first position

* Use str.format instead of string addition

* Move program structure building and validation to component

Removes the need for a bunch of duplicate exception handling in each individual platform

* Fix climate nodes, fix climate names, add config to disable climate

Sensor platform was crashing when the ISY reported climate nodes. Logic has been fixed. Also added a config option to prevent climate sensors from getting imported from the ISY. Also replace the underscore from climate node names with spaces so they default to friendly names.

* Space missing in error message

* Fix string comparison to use `==`

* Explicitly check for attributes rather than catch AttributeError

Also removes two stray debug lines

* Remove null checks on hass.data, as they are always null at this point
2017-12-26 09:26:37 +01:00
Mike Megally a59b02b6b4 Removed error log used as debug (#11301)
An error was being logged to display debug info. Removed it
2017-12-25 20:49:02 +01:00
Frantz 14919082a3 Better error handling (#11297)
* Better error handling

* Fixed hound
2017-12-25 17:46:42 +01:00
Bob Anderson 802a95eac5 Fix unpredictable entity names in concord232 binary_sensor (#11292) 2017-12-25 13:26:22 +01:00
Michael Irigoyen a44181fd35 Add Chime status and control to Alarm Decoder component (#11271)
* Enable more alarm decoder attributes, including chime status and ready status

* Expose chime service in the alarm decoder component

* Fix line length linting issue

* Fix spacing lint issue

* Update PR based on reviewer requests

* Update based on linting catches

* Fix descriptions include from async to sync
2017-12-25 11:34:07 +01:00
PhracturedBlue b280a791a6 Store raw state of RF sensors from alarmdecoder (#10841)
* Store raw state of RF sensors from alarmdecoder

* Fix resync.  Fix issue with RFID not being truly optional

* Breakdown RF attributes per bit

* Preserve import style
2017-12-25 10:52:33 +01:00
Jordy 7269070d97 Added rainsensor (#11023)
* Added rainsensor

Added rainsensor

* Added to coverage ignore

* Fixed issues

* script\gen_requirements_all.py

script\gen_requirements_all.py

* Gen requirements

* requirements

* requirements

* Fix docstring

* Fix log message

* Revert change
2017-12-25 10:07:17 +01:00
Phil Kates 94ac0b5ed8 alexa: Add handling for covers (#11242)
* alexa: Add handling for covers

Covers don't support either cover.turn_on or homeassistant.turn_on so
use cover.[open|close]_cover.

* alexa: Add tests for covers
2017-12-24 15:05:56 -08:00
Derek Brooks 8ef8dbc868 pleasin the hound 2017-12-24 11:15:50 -07:00
Derek Brooks 7de3c62846 register nuheat_resume_program service 2017-12-24 11:10:22 -07:00
Derek Brooks fb90dab471 add ability to change the Nuheat thermostat hold mode 2017-12-24 10:09:27 -07:00
Derek Brooks 419ec7f7a7 bump to python-nuheat 0.3.0 2017-12-24 09:43:56 -07:00
Derek Brooks bdf64ccbbb Merge branch 'dev' into nuheat 2017-12-24 09:40:21 -07:00
Ryan McLean 3fa45375d9 Plex refactor (#11235)
* Cleaned up '_clear_media()'

* Moved media Type to new method

* renamed "clear_media()' to ' clear_media_details()'
reset 'app_name' (Library Name) in clear_media_details
moved thumbs to '_set_media_image()'

* Moved playback info into setmedia type as it was just used for the next anyway

* Moved library name & image download to only happen if session and player active as else no point anyway

* Fixed Linting issue

* Some tweaks to clean up unintended complexity

* Removed redundant declarations

* Fixed whitespace

* Revert "Fixed whitespace"

This reverts commit 0985445c47.

* Revert "Removed redundant declarations"

This reverts commit 6f9d5a85b0.
2017-12-24 11:18:31 -05:00
Aaron Bach 5566ea8c81 Adds support for disabled Tiles and automatic session renewal (#11172)
* Adds support for disabled Tiles and automatic session renewal

* Updated requirements

* Collaborator-requested changes

* Collaborator-requested changes
2017-12-24 01:19:04 +01:00
Andrea Campi 8c303bf48c Support multiple Hue bridges with lights of the same id (#11259)
* Improve support for multiple Hue bridges with lights that have the same id.

The old code pre-refactoring kept a per-bridge list of lights in a closure; my refactoring moved that to hass.data, which is convenient but caused them to conflict with each other.

Fixes #11183

* Update test_hue.py
2017-12-24 01:12:54 +01:00
David Fiel 8683d75aa1 Greenwave Reality (TCP Connected) Lighting Component (#11282)
* Create greenwave.py

* Update .coveragerc

* Update requirements_all.txt

* Update greenwave.py

Line too long

* Update greenwave.py

* Update requirements_all.txt

* Update greenwave.py

* Update greenwave.py

* fix style
2017-12-24 01:11:45 +01:00
Andrey Kupreychik 4f5d7cea11 Added password for GPS logger endpoint (#11245)
* Added password for GPS logger endpoint

* Fixed lint error

* Update gpslogger.py

* fix lint

* fix import
2017-12-24 00:15:06 +01:00
Andrey ab9ffc4f05 Report Sensibo as off when it is off (#11281) 2017-12-23 11:10:54 +01:00
Paulus Schoutsen 6e2bfcfe65 Update frontend to 20171223.0 2017-12-22 21:31:31 -08:00
Andrey 240098dd7e Change manifest path to /states as this is the path / actually sets. (#11274) 2017-12-22 21:05:15 -08:00
Daniel Watkins 353bb62687 Fix webostv select source (#11227)
* Fix reuse of variable name

This should fix #11224.

* Add tests for LgWebOSDevice.select_source
2017-12-22 18:38:00 +01:00
maxlaverse 46df91ff45 Fix allday events in custom_calendars (#11272) 2017-12-22 14:08:34 +01:00
Ben Randall 295caeb065 Fix async IO in Sesame lock component. (#11054)
* Call update on Sesame devices to cache initial state

* Switch to using async_add_devices

* Fix line length

* Fix Lint errors

* Fix more Lint errors

* Cache pysesame properties

* Updates from CR feedback
2017-12-22 10:28:51 +01:00
Egor Tsinko eeb309aea1 Functinality to save/restore snapshots for monoprice platform (#10296)
* added functionality to save/restore snapshots to monoprice platform

* renamed monoprice_snapshot, monoprice_restore to snapshot, restore

This is to simplify refactoring of snapshot/restore functionality for monoprice, snapcast and sonos in the future
2017-12-22 10:26:34 +01:00
schnoetz c94cc34a8f Adding MotionIP to BinarySensors for HMIP-SMI (#11268)
* Adding MotionIP to BinarySensors for HMIP-SMI

My HmIP-SMI (Homematic IP Motion Sensor) only shows "ILLUMINATION" and no MOTION, because the binary values are not recognized. The "old" homematic-motion detectors are working well showing motion, too. 
I found out that "MotionIP" was missing at the binary_sensors - after adding "Motion" and "Motion Detection Activated" are shown.

* Removed trailing blanks

removed trailing blanks from my previous change
2017-12-21 21:46:42 +01:00
Ryan McLean 901d4b5489 Bugfix: 10509 - http is hard coded in plex sensor (#11072)
* Fix for sensor no ssl

* Line length Fixes

* Removed unneeded schema extensions

* Removed unrequired variable

* Added defaults for SSL & SSL Verify

* Moved Defaults to Variables

Corrected SSL Defaults to match the other Defaults style

* Fixed Typo

* Removed option to disable verify ssl

* Removed unused import

* Removed unused CONST

* Fixed error handling

* Cleanup of unneeded vars & logging

* Fix for linting
2017-12-21 10:24:57 -05:00
Zio Tibia 2e4e3a42cc Fix handling zero values for state_on/state_off (#11264) 2017-12-21 14:24:19 +01:00
CTLS b866687cd7 Fix inverted sensors on the concord232 binary sensor component (#11261)
* Fix inverted sensors on the concord232 binary sensor component

* Changed from == Tripped to != Normal
2017-12-21 06:29:42 +01:00
Frank Wickström 7faa94046c Proper Steam game names and small fixes (#11182)
* Use constant for offline state

* Use constant for no game name

* Rename trade and play constant their proper names

Trade and Play are not the correct names for the states. For instance
Play might be seens as the user is actually is playing, which is not
correct as there is no such state is returned from the Steam API.
Just having "trade" does not say much about what is happening and
might be misintepreted that the user is currently trading, which is not
correct either.

We instead use the names from the underlying library for naming the
states [1]

[1] 2e518ad84f/steam/user.py (L109)

* Get the proper game name if no extra info is given from the api

The third `current_game` parameter that was used before hold
extra information about the game that is being played. This might
contain the game name, it might also be empty. The correct way to
get the game name is to fetch it from the API depending on the
game id that might be returned in the `current_game` attribute if
the user is playing a game.

To not break existing implementations we keep the functionality
to first go with the extra information and only then fetch the proper
game name.

* Refactor getting game name to its own function

This cleans up the code and removed "ugly" else statements
from the sensor and makes the game fetching easier to read.

* Let state constant values be lower snake case

* Return None instead of 'None' when no current game exists

* Initialize steam app list only once to benefit form caching

* Return None as state attributes if no current game is present
2017-12-20 22:32:33 -05:00
Pascal Vizeli 1d579587c1 Bugfix homematic available modus (#11256) 2017-12-20 23:59:11 +01:00
Greg Laabs b28bfad496 Fix detection of if a negative node is in use (#11255)
* Fix detection of if a negative node is in use

Fix a problem where every negative node gets detected as in-use. Code was not checking the correct property.

* Allow protected access
2017-12-20 23:58:22 +01:00
ChristianKuehnel 8efc4b5ba9 Upgrade to new miflora version 0.2.0 (#11250) 2017-12-20 11:35:03 +01:00
Janne Grunau b4e2537de3 homematic: add username and password to interface config schema (#11214)
Fixes #11191, the json-rpc name resolving method requires user account
and password.
2017-12-20 00:38:59 +01:00
Dan Chen 3d90855ca6 Bump python-miio version (#11232) 2017-12-19 08:22:13 +01:00
Dan Nixon 200c927087 Extend Threshold binary sensor to support ranges (#11110)
* Extend Threshold binary sensor to support ranges

- Adds support for ranges
- Threshold type (lower, upper, range) is defined by supplied
  thresholds (lower, upper)
- Adds verbose status/position relative to threshold as attribute
  (position)

* Minor changes (ordering, names, etc.)

* Update name

* Update name
2017-12-19 01:52:19 +01:00
markferry ef22a6e18d Fix statistics sensor mean and median when only one sample is available. (#11180)
* Fix statistics sensor mean and median when only one sample is available.

With only one data point stddev and variance throw an exception.
This would clear the (valid) mean and median calculations.

Separate the try..catch blocks for one-or-more and two-or-more stats so
that this doesn't happen.

Test this with a new sampling_size_1 test.

* test_statistics trivial whitespace fix
2017-12-18 21:21:27 +01:00
Thibault Maekelbergh 061395d2f8 Add Discogs Sensor platform (#10957)
* Add Discogs Sensor platform

* Add discogs module to requirements_all

* Fix wrong style var name

* PR Feedback (scan interval, mod. docstring)

* Added sensor.discogs to coveragerc

* Use SERVER_SOFTWARE helper for UA-String

* Don't setup platform if token is invalid

* Fix trailing whitespace for Hound CI

* Move client setup to setup()
2017-12-18 19:10:54 +01:00
Khole 05258ea4bf Hive Component Release Two (#11053)
* Add boost functionality to climate devices

* Update boost target temperature rounding

* Update with Colour Bulb Support

* colour bulb fix

* Requirements Update and colorsys import

* Add RGB Attribute - ATTR_RGB_COLOR

* Hive release-2

* add boost support for hive climate platform

* Colour Bulb - Varible update

* Boost - Tox error

* Convert colour to color

* Correct over indentation

* update version to 0.2.9 pyhiveapi

* Updated pyhiveapi to version 2.10 and altertered turn_n on fuction to 1 call

* Update climate doc string

* Update to is_aux_heat_on

* update to is_aux_heat_on
2017-12-18 18:15:41 +01:00
Thibault Cohen 8742ce035a Hydroquebec component use now asyncio (#10795)
* Hydroquebec component use now asyncio

* Add tests

* Improve coverage

* fix tests

* Remove useless try/except and associated tests
2017-12-17 22:11:48 +01:00
maxlaverse 0664bf31a2 Fix webdav calendar schema (#11185) 2017-12-17 20:53:40 +01:00
Brad Dixon dfb8b5a3c1 Revbump to SoCo 0.13 and add support for Night Sound and Speech Enhancement. (#10765)
Sonos Playbar and Playbase devices support Night Sound and Speech Enhancement
effects when playing from sources such as a TV. Adds a new service "sonos_set_option"
whichs accepts boolean options to control these audio features.
2017-12-17 13:08:35 +01:00
Przemek Więch 024f1d4882 Try multiple methods of getting data in asuswrt. (#11140)
* Try multiple methods of getting data in asuswrt.

Solves #11108 and potentially #8112.

* fix style

* fix lint
2017-12-17 12:46:47 +01:00
PhracturedBlue 3375261f51 convert alarmdecoder interface from async to sync (#11168)
* convert alarmdecoder interface from async to sync

* Convert he rest of alarmdecoder rom async to sync

* Update alarmdecoder.py

* Update alarmdecoder.py

* Update alarmdecoder.py

* Update alarmdecoder.py

* Update alarmdecoder.py

* Update alarmdecoder.py

* Update alarmdecoder.py

* Update alarmdecoder.py

* Update alarmdecoder.py

* Update alarmdecoder.py

* Update alarmdecoder.py

* Update alarmdecoder.py
2017-12-17 00:52:59 +01:00
Matthew Treinish 640d58f0a8 Fix X10 commands for mochad light turn on (#11146)
* Fix X10 commands for mochad light turn on

This commit attempts to address issues that a lot of people are having
with the x10 light component. Originally this was written to use the
xdim (extended dim) X10 command. However, not every X10 dimmer device
supports the xdim command. Additionally, it turns out the number of
dim/brighness levels the X10 device supports is device specific and
there is no way to detect this (given the mostly 1 way nature of X10)

To address these issues, this commit removes the usage of xdim and
instead relies on using the 'on' command and the 'dim' command. This
should work on all x10 light devices. In an attempt to address the
different dim/brightness levels supported by different devices this
commit also adds a new optional config value, 'brightness_levels', to
specify if it's either 32, 64, or 256. By default 32 levels are used
as this is the normal case and what is documented by mochad.

Fixes #8943

* make code more readable

* fix style

* fix lint

* fix tests
2017-12-17 00:52:40 +01:00
Mike Megally 793b8b8ad3 Remove logging (#11173)
An error was being log that seems more like debug info
2017-12-16 22:29:40 +01:00
Pascal Vizeli 39af43eb5c
Add install mode to homematic (#11164) 2017-12-16 14:22:23 +01:00
Paulus Schoutsen b56675a7bb
Don't connect to cloud if subscription expired (#11163)
* Final touch for cloud component

* Fix test
2017-12-16 00:42:25 -08:00
Adam Mills c4d71e934d Perform logbook filtering on the worker thread (#11161) 2017-12-16 00:04:27 -08:00
Paulus Schoutsen 3d5d90241f Update frontend 2017-12-15 23:35:37 -08:00
Pascal Vizeli a7c8e202aa
Resolve hostnames (#11160) 2017-12-15 22:54:54 +01:00
Pascal Vizeli a63658d583
Homematic next (#11156)
* Cleanup logic & New gen of HomeMatic

* fix lint

* cleanup

* fix coverage

* cleanup

* name consistenc

* fix lint

* Rename ip

* cleanup wrong property

* fix bug

* handle callback better

* fix lint

* Running now
2017-12-15 21:22:36 +01:00
Daniel Perna de4c8adca2
Upgrade Homematic (#11149)
* Update pyhomematic

* Update pyhomematic
2017-12-15 00:34:27 +01:00
Paulus Schoutsen 823e260c2a
Disable html5 notify dependency (#11135) 2017-12-14 00:15:25 -08:00
Greg Laabs 1c8b5838cd ISY994 sensor improvements (#10805)
* Fire events for ISY994 control events

This allows hass to react directly to Insteon button presses (on switches and remotes), including presses, double-presses, and long holds

* Move change event subscription to after entity is added to hass

The event handler method requires `self.hass` to exist, which doesn't have a value until the async_added_to_hass method is called. Should eliminate a race condition.

* Overhaul binary sensors in ISY994 to be functional "out of the box"

We now smash all of the subnodes from the ISY994 in to one Hass binary_sensor, and automatically support both paradigms of state reporting that Insteon sensors can do. Sometimes a single node's state represents the sensor's state, other times two nodes are used and only "ON" events are sent from each. The logic between the two forunately do not conflict so we can support both without knowing which mode the device is in.

This also allows us to handle the heartbeat functionality that certain sensors have - we simply store the timestamp of the heartbeat as an attribute on the sensor device. It defaults to Unknown on bootup if and only if the device supports heartbeats, due to the presence of subnode 4.

* Parse the binary sensor device class from the ISY's device "type"

Now we automatically know which sensors are moisture, motion, and openings! (We also reverse the moisture sensor state, because Insteon reports ON for dry on the primary node.)

* Code review tweaks

The one material change here is that the event subscribers were moved to the `async_added_to_hass` method, as the handlers depend on things that only exist after the entity has been added.

* Handle cases where a sensor's state is unknown

When the ISY first boots up, if a battery-powered sensor has not reported in yet (due to heartbeat or a change in state), the state is unknown until it does.

* Clean up from code review

Fix coroutine await, remove unnecessary exception check, and return None when state is unknown

* Unknown value from PyISY is now -inf rather than -1

* Move heartbeat handling to a separate sensor

Now all heartbeat-compatible sensors will have a separate `binary_sensor` device that represents the battery state (on = dead)

* Add support for Unknown state, which is being added in next PyISY 

PyISY will report unknown states as the number "-inf". This is implemented in the base ISY994 component, but subcomponents that override the `state` method needed some extra logic to handle it as well.

* Change a couple try blocks to explicit None checks

* Bump PyISY to 1.1.0, now that it has been published!

* Remove -inf checking from base component

The implementation of the -inf checking was improved in another branch which has been merged in to this branch already.

* Restrict negative-node and heartbeat support to known compatible types

Not all Insteon sensors use the same subnode IDs for the same things, so we need to use different logic depending on device type. Negative node and heartbeat support is now only used for leak sensors and open/close sensors.

* Use new style string formatting

* Add binary sensor detection for pre-5.x firmware

Meant to do this originally; writing documentation revealed that this requirement was missed!
2017-12-13 20:14:56 -08:00
BryanJacobs 3473ef63af Allow using more than one keyboard remote (#11061)
* Allow using more than one keyboard remote

This sets up one thread per keyboard remote, listening for events.

* Remove enclosing block in keyboard_remote

* Remove unnecessary semantic check for keyboard_remote
2017-12-13 20:07:23 -08:00
Michael Pollett 2cced1dac3 set default utc offset to 0 (#11114) 2017-12-13 20:03:41 -08:00
Adam Mills b5d3a4736b Add problem device class (#11130) 2017-12-13 20:02:24 -08:00
Andrea Campi d547345f90 Skip HASS emulated Hue bridges from detection. (#11128)
When refactoring the Hue support we lost a check for HASS bridges; restore that.
2017-12-13 20:00:30 -08:00
Nolan Gilley 4ec3289f9c update pyripple (#11122) 2017-12-13 21:21:14 +01:00
Philipp Schmitt 638dd25aff Add media position properties (#10076)
* Add media progress information

* Remove unnecessary comments

* Remove datetime import

* Remove pysonyavr dependency

* Fix doc syntax (D205)

* Lint fix: no-else-return

* Don't attempt to set media progress info if program is None

* Fix Python 3.4 compatibility

* Explicitely depend on pyteleloisirs

* Only update remaining play time when it changed

* Fix floot state table
2017-12-13 10:58:49 +01:00
Ryan McLean 37efd5a5cd Fixed typo in automation.py (#11116) 2017-12-13 10:17:12 +01:00
Paulus Schoutsen 168065b9bc
Update Warrant (#11101)
* Update Warrant

* Lint
2017-12-12 21:12:41 -08:00
Dan Nixon aeba81e193 Report availability for TP-Link smart bulbs (#10976) 2017-12-12 17:18:46 +01:00
Pierre Ståhl c7e327ea87 Bump pyatv to 0.3.9 (#11104) 2017-12-12 16:52:39 +01:00
Fabian Affolter ed06b8cead
Use luftdaten module (#10970)
* Use luftdaten module

* Refactoring

* Check meta data

* Make name consistent

* Remove try block
2017-12-12 08:09:47 +01:00
Jan Almeroth a79c7ee217 Bump pymusiccast to version 0.1.6 (#11091) 2017-12-11 22:29:52 +01:00
Pascal Vizeli 6bf23f9167 Update tellcore-net to 0.4 (#11087)
* Update tellcore-net to 0.4

* Update requirements_all.txt
2017-12-11 18:32:48 +01:00
Fabian Affolter 1b3963299d Upgrade shodan to 1.7.7 (#11084) 2017-12-11 16:44:14 +01:00
Fabian Affolter c461a7c7e2 Upgrade youtube_dl to 2017.12.10 (#11080) 2017-12-11 13:53:01 +01:00
Fabian Affolter 0cfff13be1 Upgrade psutil to 5.4.2 (#11083) 2017-12-11 13:52:43 +01:00
Pascal Vizeli 7259cc878e
Allow tradfri to read the available state of the device (#11056)
* Allow tradfri to read the available state of the device

* Update tradfri.py
2017-12-11 11:34:48 +01:00
Erik Eriksson a4214afddb Volvo on call: Optional use of Scandinavian miles. Also add average fuel consumption property (#11051) 2017-12-10 13:57:44 -08:00
uchagani b078f6c342 add custom bypass status to total connect (#11042)
* add custom bypass status to total connect

* remove logger line
2017-12-10 16:02:12 -05:00
Andrea Campi 81974885ee Refactor hue to split bridge support from light platform (#10691)
* Introduce a new Hue component that knows how to talk to a Hue bridge, but doesn't actually set up lights.

* Refactor the hue lights platform to use the HueBridge class from the hue component.

* Reimplement support for multiple bridges

* Auto discover bridges.

* Provide some migration support by showing a persistent notification.

* Address most feedback from code review.

* Call load_platform from inside HueBridge.setup passing the bridge id.

Not only this looks nicer, but it also nicely solves additional bridges being added after initial setup (e.g. pairing a second bridge should work now, I believe it required a restart before).

* Add a unit test for hue_activate_scene

* Address feedback from code review.

* After feedback from @andrey-git I was able to find a way to not import phue in tests, yay!

* Inject a mock phue in a couple of places
2017-12-10 10:15:01 -08:00
Adde Lovein b2c5a9f5fe Add GPS coords to meraki (#10998) 2017-12-10 09:47:14 -08:00
maxlaverse 04cb893d10 Add a caldav calendar component (#10842)
* Add caldav component

* Code review - 1

* Code review - 2

* Sort imports
2017-12-10 17:44:28 +01:00
perfalk 3b228c78c0 Added support for cover in tellstick (#10858)
* Added support for cover in tellstick

* Fixed comments from PR

* Fixed comments from PR

* Address comments
2017-12-10 17:35:10 +01:00
Paulus Schoutsen cb4e886a4f
Make notify.html5 depend on config (#11052) 2017-12-09 13:14:16 -08:00
GreenTurtwig bee80c5b79 Add support for Logitech UE Smart Radios. (#10077)
* Add support for Logitech UE Smart Radios.

* Removed full stops to please Hound's line limit.

* Updated with requested changes.

* Fix Pylint Flake8 problem.

* Updated with requested changes.
2017-12-09 20:01:23 +01:00
Andrey Kupreychik 4479761131 Added force_update for REST sensor (#11016)
* Added force_update for REST sensor

* Linting error
2017-12-09 08:18:45 +01:00
Andrey 20f1e1609f In dev mode expose only relevant sources (#11026) 2017-12-08 17:25:16 -08:00
Matthew Treinish 1f1115f631 Serialize mochad requests (#11029)
All mochad devices are sharing a single socket interface. When multiple
threads are issuing requests to the mochad daemon at the same time the
write read cycle might get crossed between the threads. This is normally
not an issue for 1-way X10 devices because as long as the request issued
successfully and data is read over the socket then we know as much as
mochad will tell us (since there is no ACK from the request for most
X10 devices). However, where it does matter is on the device __init__()
because we're relying on the mochad daemon's internal state to take an
educated guess at the device's state to intialize things with. When
there are multiple devices being initialized at the same time the wires
can get crossed between and the wrong device state may be read.

To address this potential issue this commit adds locking using a
semaphore around all pairs of send_cmd() and read_data() (which is what
pymochad.device.Device.get_status() does internally) calls to the mochad
controller to ensure we're only ever dealing with a single request at a
time.

Fixes mtreinish/pymochad#4
2017-12-08 09:18:52 -08:00
Andrey f7c2ec19ef Change default js version to auto (#10999) 2017-12-08 09:16:26 -08:00
tschmidty69 fed7bd9473 Update snips to listen on new mqtt topic and utilize rawValue (#11020)
* Updated snips to listen on new mqtt topic and use rawValue if value not present in slot

* Too late at night

* Trying to make minor changes via web

* Update test_snips.py

* Update __init__.py

* Updated wrong branch cause I'm a monkey
2017-12-08 09:16:08 -08:00
Anders Melchiorsen 4d6070e33a Support LIFX Mini products (#10996)
* Support new LIFX products

* Remove lint
2017-12-08 08:43:37 -08:00
Anders Melchiorsen 0a7e6ac222 Ignore Sonos players with unknown hostnames (#11013) 2017-12-08 12:01:10 +01:00
Joe Lu f892c3394b Add support for Canary component and platforms (#10306)
* Add Canary component

* Made some change to how canary data is updated and stored

* Updated to use py-canary:0.1.2

* Addressed flake8 warnings

* Import canary API locally

* Import canary API locally again

* Addressed pylint errors

* Updated requirements_all.txt

* Fixed incorrect unit of measurement for air quality sensor

* Added tests for Canary component and sensors

* Updated canary component to handle exception better when initializing

* Fixed tests

* Fixed tests again

* Addressed review comments

* Fixed houndci error

* Addressed comment about camera force update

* Addressed comment regarding timeout when fetching camera image

* Updated to use py-canary==0.2.2

* Increased update frequency to 30 seconds

* Added support for Canary alarm control panel

* Address review comments

* Fixed houndci error

* Fixed lint errors

* Updated test to only test setup component / platform

* Fixed flake error

* Fixed failing test

* Uptake py-canary:0.2.3

* canary.alarm_control_panel DISARM is now mapped to canary PRIVACY mode

* Fixed failing tests

* Removed unnecessary methods

* Removed polling in canary camera component and update camera info when getting camera image

* Added more tests to cover Canary sensors

* Address review comments

* Addressed review comment in tests

* Fixed pylint errors

* Excluded canary alarm_control_panel and camera from coverage calculation
2017-12-08 10:40:45 +01:00
Marcus Schmidt 929d49ed6f Shuffle support in Sonos (#10875)
* initial commit of shuffle option for sonos

* added test

* Small adjustments to adhere to review requests

* Removed unnessesary setting of variable. Use shuffle state from soco instead
2017-12-07 14:44:06 -05:00
Lewis Juggins 3c1f8cd882
Handle OSError when forcibly turning off media_player.samsungtv (#10997) 2017-12-07 16:30:51 +00:00
Jeroen ter Heerdt f21da7cfdc Fix Egardia alarm status shown as unknown after restart (#11010) 2017-12-07 12:39:34 +01:00
Alan Fischer 39d33c97ff Added Vera scenes (#10424)
* Added Vera scenes

* Fixed flake8 issues

* Fixed comments

* Moved vera to use hass.data

* Made requested changes
2017-12-07 07:47:19 +01:00
Derek Brooks 3193e825d5 remove nuheat away functionality. :( 2017-12-06 22:34:13 -06:00
Derek Brooks c262a387dc add supported_features functionality 2017-12-06 22:24:54 -06:00
Derek Brooks 36d5fff8e0 address feedback on log lines 2017-12-06 21:52:44 -06:00
Derek Brooks 72aa722c33 Merge branch 'dev' into nuheat 2017-12-06 21:49:13 -06:00
Daniel Watkins 0fc7f37185 webostv: Ensure source exists before use (#10959)
In a case where either (a) an incorrect source name is used, or (b) the
TV isn't currently queryable (e.g. it's off), we get tracebacks because
we assume the source that we are being asked to select exists in
self._source_list.

This makes the lookup code a little more rugged, and adds in a warning
message (in place of the current exception).
2017-12-06 14:48:17 +01:00
Pascal Vizeli 9cff6c7e6a
Update tradfri.py (#10991) 2017-12-06 12:44:41 +01:00
Mitko Masarliev e66268dffe Meraki AP Device tracker (#10971)
* Device tracker for meraki AP

* styles fix

* fix again

* again

* and again :)

* fix hide if away

* docs and optimization

* tests and fixes

* styles

* styles

* styles

* styles

* styles fix. Hope last

* clear track new

* changes

* fix accuracy error and requested changes

* remove meraki from .coveragerc

* tests and minor changes

* remove location
2017-12-06 09:24:20 +01:00
Paulus Schoutsen c13b510ba3 Update frontend to 20171206.0 2017-12-05 23:40:31 -08:00