Commit Graph
114143 Commits
Author SHA1 Message Date
Jason HuandPaulus Schoutsen 4d5338a1b0 Fix google assistant request sync service call (#17415)
* Update __init__.py

* Add optional agent_user_id field to request_sync service

* Update services.yaml
2018-11-27 14:57:42 +01:00
kennedysheadandCharles Garwood 87507c4b6f fix aioasuswrt sometimes return empty lists (#18742)
* aioasuswrt sometimes return empty lists

* Bumping aioasuswrt to 1.1.12
2018-11-27 08:20:25 -05:00
Luis Martinez de Bartolome IzquierdoandPaulus Schoutsen 9d1b94c24a Supports the new Netatmo Home Coach (#18308)
* Supports the new Netatmo Home Coach

* unused import

* Missing docstring

* Fixed pylint

* pydocs

* doc style
2018-11-27 14:01:34 +01:00
emontnemeryandPaulus Schoutsen 16e3ff2fec Mqtt light refactor (#18227)
* Rename mqtt light files

* Refactor mqtt light

* Remove outdated testcase

* Add backwards compatibility for MQTT discovered MQTT lights.
Refactor according to review comments.
2018-11-27 14:00:05 +01:00
Robert Dunmire IIIandPaulus Schoutsen c1ed2f17ac Update librouteros and re-connect to api if connection is lost (#18421)
* Reconnect when connection is lost

* Fix tabs

* add librouteros.exceptions

* add logger

* fix line too long

* added import librouteros

* Update librouteros version

* Update mikrotik.py

* Update mikrotik.py

* Fix trailing whitespace

* Update mikrotik.py

* Update mikrotik.py
2018-11-27 13:26:52 +01:00
Fabian AffolterandPaulus Schoutsen 1cbe080df9 Fix remaining issues (#18416) 2018-11-27 13:21:42 +01:00
Malte FrankenandPaulus Schoutsen 61e0e11156 Geo Location platform code clean up (#18717)
* code cleanup to make use of new externalised feed manager

* fixed lint

* revert change, keep asynctest

* using asynctest

* changed unit test from mocking to inspecting dispatcher signals

* code clean-up
2018-11-27 13:12:29 +01:00
Malte FrankenandMartin Hjelmare 013e181497 U.S. Geological Survey Earthquake Hazards Program Feed platform (#18207)
* new platform for usgs earthquake hazards program feed

* lint and pylint issues

* fixed config access

* shortened names of platform, classes, etc.

* refactored tests

* fixed hound

* regenerated requirements

* refactored tests

* fixed hound
2018-11-27 12:55:15 +01:00
David BonnesandMartin Hjelmare 9a25054a0d Add zones to evohome component (#18428)
* Added Zones, and removed available() logic

flesh out Zones

tidy up init

some more tidying up

Nearly there - full functionality

passed txo - ready to send PR

Ready to PR, except to remove logging

Add Zones and associated functionality to evohome component

Add Zones to evohome (some more tidying up)

Add Zones to evohome (Nearly there - full functionality)

Add Zones to evohome (passed tox)

Add Zones to evohome (except to remove logging)

Add Zones and associated functionality to evohome component

Revert _LOGGER.warn to .debug, as it should be

Cleanup stupid REBASE

* removed a duplicate/unwanted code block

* tidy up comment

* use async_added_to_hass instead of bus.listen

* Pass evo_data instead of hass when instntiating

* switch to async version of setup_platform/add_entities

* Remove workaround for bug in client library
 - using github version for now, as awaiting new PyPi package

* Avoid invalid-name lint - use 'zone_idx' instead of 'z'

* Fix line too long error

* remove commented-out line of code

* fix a logic error, improve REDACTION of potentially-sensitive infomation

* restore use of EVENT_HOMEASSISTANT_START to improve HA startup time

* added a docstring to _flatten_json

* Switch instantiation from component to platform

* Use v0.2.8 of client api (resolves logging bug)

* import rather than duplicate, and de-lint

* We use evohomeclient v0.2.8 now

* remove all the api logging

* Changed scan_interal to Throttle

* added a configurable scan_interval

* small code tidy-up, removed sub-function

* tidy up update() code

* minimize use of self.hass.data[]

* remove lint

* remove unwanted logging

* remove debug code

* correct a small coding error

* small tidyup of code

* remove flatten_json

* add @callback to _first_update()

* switch back to load_platform

* adhere to standards fro logging

* use new format string formatting

* minor change to comments

* convert scan_interval to timedelta from int

* restore rounding up of scan_interval

* code tidy up

* sync when in sync context

* fix typo

* remove raises not needed

* tidy up typos, etc.

* remove invalid-name lint

* tidy up exception handling

* de-lint/pretty-fy

* move 'status' to a JSON node, so theirs room for 'config', 'schedule' in the future
2018-11-27 12:17:22 +01:00
emontnemeryandPaulus Schoutsen a03cb12c61 Reconfigure MQTT sensor component if discovery info is changed (#18178)
* Reconfigure MQTT sensor component if discovery info is changed

* Do not pass hass to MqttSensor constructor

* Remove duplicated line
2018-11-27 11:23:47 +01:00
emontnemeryandPaulus Schoutsen 4a4ed128db Reconfigure MQTT fan component if discovery info is changed (#18177) 2018-11-27 11:22:55 +01:00
emontnemeryandPaulus Schoutsen 6170065a2c Reconfigure MQTT cover component if discovery info is changed (#18175)
* Reconfigure MQTT cover component if discovery info is changed

* Do not pass hass to MqttCover constructor
2018-11-27 11:22:26 +01:00
Matt HamiltonandPaulus Schoutsen 4f2e7fc912 remove pbkdf2 upgrade path (#18736) 2018-11-27 10:42:56 +01:00
Paulus SchoutsenandGitHub c2f8dfcb9f Legacy api fix (#18733)
* Set user for API password requests

* Fix tests

* Fix typing
2018-11-27 10:41:44 +01:00
Paulus SchoutsenandGitHub 9d7b1fc3a7 Enforce permissions for Websocket API (#18719)
* Handle unauth exceptions in websocket

* Enforce permissions in websocket API
2018-11-27 10:12:31 +01:00
Ville SkyttäandPaulus Schoutsen 7248c9cb0e Remove some unused imports (#18732) 2018-11-27 09:35:35 +01:00
Ville SkyttäandPaulus Schoutsen b4e2f2a6ef Upgrade pytest and -timeout (#18722)
* Upgrade pytest to 4.0.1

* Upgrade pytest-timeout to 1.3.3
2018-11-26 22:43:14 +01:00
Paulus SchoutsenandGitHub 9894eff732 Fix logbook filtering entities (#18721)
* Fix logbook filtering entities

* Fix flaky test
2018-11-26 19:53:24 +01:00
Paulus Schoutsen 1f123ebcc1 Updated frontend to 20181126.0 2018-11-26 14:40:43 +01:00
Paulus Schoutsen 3c92aa9ecb Update translations 2018-11-26 14:30:21 +01:00
Paulus Schoutsen f9f71c4a6d Bumped version to 0.83.0b1 0.83.0b1 2018-11-26 14:20:56 +01:00
Joakim SørensenandPaulus Schoutsen c3b76b40f6 Set correct default offset (#18678) 2018-11-26 14:20:49 +01:00
Bram KragtenandPaulus Schoutsen 56c7c8ccc5 Fix vol Dict -> dict (#18637) 2018-11-26 14:20:49 +01:00
Fredrik ErlandssonandPaulus Schoutsen bb75a39cf1 Updated webhook_register, version bump pypoint (#18635)
* Updated webhook_register, version bump pypoint

* A binary_sensor should be a BinarySensorDevice
2018-11-26 14:20:48 +01:00
Eliseo MartelliandPaulus Schoutsen 2f581b1a1e fixed wording that may confuse user (#18628) 2018-11-26 14:20:48 +01:00
pbalogh77andPaulus Schoutsen cf22060c5e Use asyncio Lock for fibaro light (#18622)
* Use asyncio Lock for fibaro light

* line length and empty line at end

* async turn_off

Turned the turn_off into async as well

* bless you, blank lines...

My local flake8 lies to me. Not cool.
2018-11-26 14:20:47 +01:00
Paulus Schoutsen 6bcedb3ac5 Updated frontend to 20181121.1 2018-11-26 14:16:30 +01:00
Paulus SchoutsenandGitHub 7848381f43 Allow managing cloud webhook (#18672)
* Add cloud webhook support

* Simplify payload

* Add cloud http api tests

* Fix tests

* Lint

* Handle cloud webhooks

* Fix things

* Fix name

* Rename it to cloudhook

* Final rename

* Final final rename?

* Fix docstring

* More tests

* Lint

* Add types

* Fix things
2018-11-26 14:10:18 +01:00
pbalogh77andMartin Hjelmare 4a661e351f Use asyncio Lock for fibaro light (#18622)
* Use asyncio Lock for fibaro light

* line length and empty line at end

* async turn_off

Turned the turn_off into async as well

* bless you, blank lines...

My local flake8 lies to me. Not cool.
2018-11-26 13:17:56 +01:00
Ian RichardsonandPaulus Schoutsen b5b5bc2de8 Convert shopping-list update to WebSockets (#18713)
* Convert shopping-list update to WebSockets

* Update shopping_list.py

* Update test_shopping_list.py
2018-11-26 09:59:53 +01:00
emontnemeryandPaulus Schoutsen d290ce3c9e Small refactoring of MQTT binary_sensor (#18674) 2018-11-25 20:53:03 +01:00
Franck NijhofandPaulus Schoutsen 2cbe083460 ⬆️ Upgrades InfluxDB dependency to 5.2.0 (#18668) 2018-11-25 20:52:09 +01:00
Paulus SchoutsenandPascal Vizeli 8b8629a5f4 Add permission checks to Rest API (#18639)
* Add permission checks to Rest API

* Clean up unnecessary method

* Remove all the tuple stuff from entity check

* Simplify perms

* Correct param name for owner permission

* Hass.io make/update user to be admin

* Types
2018-11-25 18:04:48 +01:00
Fabian AffolterandDaniel Høyer Iversen f387cdec59 Upgrade pysnmp to 4.4.6 (#18695) 2018-11-25 17:59:14 +01:00
Adam MillsandGitHub 78b90be116 Async cover template tests (#18690) 2018-11-25 11:39:35 -05:00
Adam MillsandGitHub 91c526d9fe Async device sun light trigger tests (#18689) 2018-11-25 11:39:18 -05:00
JensandFabian Affolter f3ce463862 Adds SomfyContactIOSystemSensor to TaHoma (#18560)
* Sorts all TAHOME_TYPES and adds SomfyContactIOSystemSensor as it wasn't added with https://github.com/home-assistant/home-assistant/commit/558b659f7caad4027e5d696dfa4d581cf5240a41

* Fixes syntax errors related to sorting of entries.
2018-11-25 13:47:16 +01:00
Joakim SørensenandFabian Affolter 23f5d785c4 Set correct default offset (#18678) 2018-11-25 12:30:38 +01:00
Soós PéterandFabian Affolter cd773455f0 Fix false log message on CAPsMAN only devices (#18687)
* Fix false log message on CAPsMAN only devices 

False debug log message appeared on CAPsMAN only devices without physichal wireless interfaces. This fix eliminates them.

* Fixed indentation to pass flake8 test
2018-11-25 12:21:26 +01:00
Fabian AffolterandDaniel Høyer Iversen 5a5cbe4e72 Upgrade youtube_dl to 2018.11.23 (#18694) 2018-11-25 11:41:49 +01:00
Daniel Høyer IversenandGitHub ad2e8b3174 update mill lib, handle bad data from mill server (#18693) 2018-11-25 09:39:06 +01:00
Andrew HayworthandMartin Hjelmare eb6b6ed87d Add Awair sensor platform (#18570)
* Awair Sensor Platform

This commit adds a sensor platform for Awair devices, by accessing
their beta API. Awair heavily rate-limits this API, so we throttle
updates based on the number of devices found. We also allow for the
user to bypass API device listing entirely, because the device list
endpoint is limited to only 6 calls per day. A crashing or restarting
server would quickly hit that limit.

This sensor platform uses the python_awair library (also written
as part of this PR), which is available for async usage.

* Disable pylint warning for broad try/catch

It's true that this is generally not a great idea, but we really don't
want to crash here. If we can't set up the platform, logging it and
continuing is the right answer.

* Add space to satisfy the linter

* Awair platform PR feedback

- Bump python_awair to 0.0.2, which has support for more granular exceptions
- Ensure we have python_awair available in test
- Raise PlatformNotReady if we can't set up Awair
- Make the 'Awair score' its own sensor, rather than exposing it other ways
- Set the platform up as polling, and set a sensible default
- Pass in throttling parameters to the underlying data class, rather
than use hacky global variable access to dynamically set the interval
- Switch to dict access for required variables
- Use pytest coroutines, set up components via async_setup_component,
  and test/modify/assert in generally better ways
- Commit test data as fixtures

* Awair PR feedback, volume 2

- Don't force updates in test, instead modify time itself and let
  homeassistant update things "normally".
- Remove unneeded polling attribute
- Rename timestamp attribute to 'last_api_update', to better reflect
  that it is the timestamp of the last time the Awair API servers
  received data from this device.
- Use that attribute to flag the component as unavailable when data
  is stale. My own Awair device periodically goes offline and it really
  hardly indicates that at all.
- Dynamically set fixture timestamps to the test run utcnow() value,
  so that we don't have to worry about ancient timestamps in tests
  blowing up down the line.
- Don't assert on entities directly, for the most part. Find desired
  attributes in ... the attributes dict.

* Patch an instance of utcnow I overlooked

* Switch to using a context manager for timestream modification

Honestly, it's just a lot easier to keep track of patches. Moreover,
the ones I seem to have missed are now caught, and tests seem to
consistently pass.

Also, switch test_throttle_async_update to manipulating time more
explicitly.

* Missing blank line, thank you hound

* Fix pydocstyle error

I very much need to set up a script to do this quickly w/o tox, because
running flake8 is not enough!

* PR feedback

* PR feedback
2018-11-25 09:01:19 +01:00
Adam MillsandGitHub 00c9ca64c8 Async tests for mqtt switch (#18685) 2018-11-24 17:08:28 -05:00
Adam MillsandGitHub 6f0a3b4b22 Async tests for counter (#18684) 2018-11-24 16:12:29 -05:00
Adam MillsandGitHub 66f1643de5 Async timer tests (#18683) 2018-11-24 16:12:19 -05:00
Adam MillsandGitHub 50a30d4dc9 Async tests for remaining device trackers (#18682) 2018-11-24 15:10:57 -05:00
Adam MillsandGitHub 6ebdc7dabc Async tests for owntracks device tracker (#18681) 2018-11-24 14:34:36 -05:00
Adam MillsandGitHub d24ea7da90 Async tests for device tracker mqtt (#18680) 2018-11-24 13:24:06 -05:00
emontnemeryandPaulus Schoutsen 5e18d52302 Reconfigure MQTT alarm component if discovery info is changed (#18173) 2018-11-24 10:48:01 +01:00
emontnemeryandPaulus Schoutsen e41af133fc Reconfigure MQTT climate component if discovery info is changed (#18174) 2018-11-24 10:40:07 +01:00