Commit Graph

16149 Commits (7b6893c9d3495c2cf8e638e56126132746c00133)

Author SHA1 Message Date
Fabian Affolter 7b6893c9d3
Fix change 2018-12-01 22:08:15 +01:00
Fabian Affolter fc1a4543d3
Fix lint issue 2018-12-01 20:57:39 +01:00
Fabian Affolter 54904fb6c0
Use string formatting 2018-12-01 19:27:21 +01:00
Michael Nosthoff bd09e96681 Reintroduce unique_id for Netatmo sensor (#18774)
* netatmo: make module type identification more consistent

For the interpretation of voltage values the different types of netatmo
modules need to be distinguished. This is currently done by selecting
the second character of the modules '_id'. The _id-field actually
contains a mac address. This is an undocumented way of identifying the
module_type.

The netatmo API also delivers a field called 'type' which provides a
more consistent way to differentiate the fields. This commit introduces
a differentiation which uses this provided type. This should improve
readability.

Also the field module_id is renamed to module_type which should better
resemble what it actually represents.

* netatmo: reintroduce unique_id using actual module mac address

Each netatmo module features a unique MAC-Address. The base station uses
an actual assigned MAC Address it also uses on the Wifi it connects to.
All other modules have unique MAC Addresses which are only assigned and
used by Netatmo on the internal Wireless-Network. All theses Addresses
are exposed via the API. So we could use the combination
MAC-Address-Sensor_type as unique_id.

In a previous commit this had already been tried but there was a
misunderstanding in what the 'module_id' represented. It was actually
only a module_type representation so it clashed when two modules of the
same type where used.

* Netatmo: fixed line length
2018-12-01 18:00:49 +01:00
Joakim Sørensen 558504c686 Fix ordinal filter in template (#18878) 2018-12-01 14:49:34 +01:00
Eliseo Martelli c69fe43e75 fixed state case for rtorrent (#18778) 2018-12-01 12:00:35 +01:00
Carlos Gustavo Sarmiento 29f15393b1 Updated UVC camera component to support SSL connections (#18829) 2018-12-01 11:58:59 +01:00
Mahasri Kalavala c23792d1fb Added new filters for templates (#18125)
* added additional filters

Added base64_encode, base64_decode and ordinal filters.

* added test cases

added test cases for base64_encode, base64_decode and ordinal filters.

* forgot to add filters :)
2018-12-01 10:38:10 +01:00
damarco 1ae58ce48b Add support for zha device registry (#18755) 2018-12-01 10:31:49 +01:00
ehendrix23 ecca51b16b Add tests for directv platform (#18590)
* Create test for platform

Created test for platform.
Added media_stop to common.py test

* Multiple improvements

Fixed lint issue in common.py
Fixed lint issues in test_directv.py
Improved patching import using modile_patcher.start() and stop()
Added asserts for service calls.

* Updates based on Martin's review

Updates based on Martin's review.

* Updated test based on PR#18474

Updated test to use service play_media instead of select_source based on change from PR18474

* Lint issues

Lint issues

* Further updates based on feedback

Updates based on feedback provided.

* Using async_load_platform for discovery test

Using async_load_platform for discovery tests.
Added asserts to ensure entities are created with correct names.

* Used HASS event_loop to setup component

Use HASS event_loop to setup the component async.

* Updated to use state machine for # entities

Updated to use state machine to count # entities instead of entities.

* Use hass.loop instead of getting current loop

Small update to use hass.loop instead, thanks Martin!

* Forgot to remove asyncio

Removed asyncio import.

* Added fixtures

Added fixtures.

* Remove not needed updates and assertions

* Return mocked dtv instance from side_effect

* Fix return correct fixture instance

* Clean up assertions

* Fix remaining patches

* Mock time when setting up component in fixture

* Patch time correctly

* Attribute _last_update should return utcnow
2018-12-01 10:28:27 +01:00
Aaron Bach 3a854f4c05
Fix issues with 17track.net sensor names (#18860) 2018-11-30 21:54:40 -07:00
Aaron Bach c24ddfb1be
Bump py17track to 2.1.1 (#18861) 2018-11-30 21:12:55 -07:00
Paulus Schoutsen df21dd21f2 RFC: Call services directly (#18720)
* Call services directly

* Simplify

* Type

* Lint

* Update name

* Fix tests

* Catch exceptions in HTTP view

* Lint

* Handle ServiceNotFound in API endpoints that call services

* Type

* Don't crash recorder on non-JSON serializable objects
2018-11-30 21:28:35 +01:00
Paulus Schoutsen 53cbb28926
Fix flaky geofency test (#18855) 2018-11-30 20:06:10 +01:00
Erik Eriksson d7809c5398 Update of volvooncall component (#18702) 2018-11-30 19:07:42 +01:00
Paulus Schoutsen d014517ce2
Always set hass_user (#18844) 2018-11-30 17:32:47 +01:00
pbalogh77 8f50180598 Hotfix for Fibaro wall plug (#18845)
Fibaro wall plug with a lamp plugged in was misrecognized as a color light, generating crashes in the update function.
2018-11-30 17:23:25 +01:00
Matt Schmitt e0f0487ce2 Add services description (#18839) 2018-11-30 16:31:35 +01:00
Daniel Høyer Iversen 44e35ec9a1 update netatmo library (#18823) 2018-11-30 08:45:40 -05:00
emontnemery a9990c130d Revert change to MQTT discovery_hash introduced in #18169 (#18763) 2018-11-30 13:57:17 +01:00
Darren Foo fcdb25eb3c bump gtts-token to 1.1.3 (#18824) 2018-11-30 11:18:24 +01:00
Heine Furubotten 4bee3f760f Add Entur departure information sensor (#17286)
* Added Entur departure information sensor.

* Fixed houndci-bot comments.

* Removed tailing whitespace.

* Fixed some comments from tox lint.

* Improved docstring, i think.

* Fix for C1801

* Unit test for entur platform setup

* Rewritten entur component to have pypi dependecy.

* Propper client id for api usage.

* Minor cleanup of usage of constants.

* Made location output configurable.

* Cleaned up usage of constants.

* Moved logic to be contained within setup or update methods.

* Moved icon consts to root in module.

* Using config directly in test

* Minor changes
2018-11-30 09:06:59 +01:00
Andrew Hayworth 5f53627c0a Bump python_awair to 0.0.3 (#18819) 2018-11-30 08:47:05 +01:00
Adam Mills 22f27b8621 Store state last seen time separately (#18806)
* Store state last seen time separately

This ensures that infrequently updated entities aren't accidentally
dropped from the restore states store

* Fix mock restore cache
2018-11-30 08:26:19 +01:00
ehendrix23 a9dc4ba297 Increase pyatv to 0.3.11 (#18801) 2018-11-29 23:44:29 +01:00
ehendrix23 a035725c67 Service already discovered log entry (#18800)
Add debug log entry if service is already discovered.
2018-11-29 23:15:48 +01:00
pbalogh77 2b52f27eb9 Hotfix for crash with virtual devices (#18808)
* Quickfix for crash with virtual devices

Added try/except to critical loops of processing
Reinforced read_devices, map_device_to_type and update processing

* oops
2018-11-29 22:57:05 +01:00
Aaron Bach 6f7ff9a18a
Remove additional self from update function in RainMachine (#18810) 2018-11-29 14:47:41 -07:00
Daniel Høyer Iversen 4bc9e6dfe0 Remove self from update function in rainmachine (#18807) 2018-11-29 22:28:27 +01:00
Paulus Schoutsen 28215d7edd
Make auth backwards compat again (#18792)
* Made auth not backwards compat

* Fix tests
2018-11-29 22:26:19 +01:00
Paulus Schoutsen 38ecf71307
Fix race condition in group.set (#18796) 2018-11-29 22:26:06 +01:00
Eric Nagley 4e272624eb BUGFIX: handle extra fan speeds. (#18799)
* BUGFIX: add support for extra fan speeds.

* Drop extra fan speeds.

Remove catch all, drop missing fan speeds.

* fix self.speed_synonyms call. Remove un-needed keys() call
2018-11-29 22:24:53 +01:00
Aaron Bach ab4d0a7fc3 Bumped py17track to 2.1.0 (#18804) 2018-11-29 22:24:32 +01:00
Paulus Schoutsen ca74f5efde
Render the secret (#18793) 2018-11-29 22:17:01 +01:00
Eric Nagley e50a6ef8af Add support for Mode trait in Google Assistant. (#18772)
* Add support for Mode trait in Google Assistant.

* Simplify supported logic.

* Fix SUPPORTED_MODE_SETTINGS to correct rip failures.

* more stray commas

* update tests.
2018-11-29 21:14:17 +01:00
Eliseo Martelli 5c026b1fa2 Added qbittorrent sensor platform (#18618)
* added qbittorrent sensor platform

* Added requirements

* linting

* disabled broad-except

* added noqa

* removed pass statement (left that from development session)

* Added to coveragerc & moved to async

* fixed linting

* fixed indentation

* removed white space

* added await

* Removed generic exception

* removed pylint disable

* added auth checks

* linting

* fixed linting

* fixed error

* should be fixed now

* linting

* ordered imports

* added requested changes

* Update homeassistant/components/sensor/qbittorrent.py

Co-Authored-By: eliseomartelli <martely98@gmail.com>

* Update qbittorrent.py

* Minor changes
2018-11-29 20:40:26 +01:00
cdce8p 474567e762 Fix logbook domain filter - alexa, homekit (#18790) 2018-11-29 20:16:39 +01:00
Fabian Affolter 16911a5cb4
Update lang list (fixes #18768) (#18773)
* Update lang list (fixes #18768)

* Fix lint issues
2018-11-29 19:14:14 +01:00
Daniel Høyer Iversen 46389fb6ca Update switchmate lib (#18785) 2018-11-29 19:13:08 +01:00
Paulus Schoutsen 9aeb489282 Raise NotImplementedError (#18777) 2018-11-29 16:40:49 +01:00
Daniel Høyer Iversen 8c9a39845c Round average price for Tibber (#18784) 2018-11-29 16:39:39 +01:00
Fabian Affolter c976ac3b39
Fix lint issues 2018-11-29 12:28:50 +01:00
mdallaire 07a7ee0ac7 Add more waterfurnace sensors (#18451)
Add the following sensors that provide interesting data when using a variable speed geothermal system:

* Compressor Power
* Fan Power
* Aux Power
* Loop Pump Power
* Compressor Speed
* Fan Speed
2018-11-29 06:04:12 -05:00
Ian Richardson a306475065 Convert shopping-list clear to WebSockets (#18769) 2018-11-29 10:06:18 +01:00
Fabian Affolter faeaa43393
Update lang list (fixes #18768) 2018-11-29 09:26:48 +01:00
ehendrix23 aadf72d445 Fix statistics for binary sensor (#18764)
* Fix statistics for binary sensor

-) Binary sensors have 'on' and 'off' for state resulting in issue as numbers were expected. Fixed so that it works with non-numeric states as well.
-) Added check to skip unknown states.
-) Updates test so that binary sensor test will use non-numeric values for states.

* Using guard clause and changed debug to error

Changed to use a guard clause for state unknown.
Writing error on value error instead of debug.

* Add docstring
2018-11-29 09:01:56 +01:00
Paulus Schoutsen 48e28843e6
OwnTracks Config Entry (#18759)
* OwnTracks Config Entry

* Fix test

* Fix headers

* Lint

* Username for android only

* Update translations

* Tweak translation

* Create config entry if not there

* Update reqs

* Types

* Lint
2018-11-28 22:20:13 +01:00
Paulus Schoutsen e06fa0d2d0
Default to on if logged in (#18766) 2018-11-28 22:17:37 +01:00
ehendrix23 0bdf96d94c Add block after setting up component (#18756)
Added a block_till_done after setting up component and before starting HASS.
2018-11-28 16:14:37 +01:00
Fabian Affolter 623cec206b Upgrade Adafruit-DHT to 1.4.0 (fixes #15847) (#18614) 2018-11-28 13:38:26 +01:00