Commit Graph

16187 Commits (08dbd792cdcd3d56123e1734039fdb68fe5d4149)

Author SHA1 Message Date
Daniel Høyer Iversen 08dbd792cd Improve logging and error handling 2018-12-02 15:35:59 +01:00
Andrew Hayworth b7e2522083 bugfix: ensure the `google_assistant` component respects `allow_unlock` (#18874)
The `Config` object specific to the `google_assistant` component
had a default value for `allow_unlock`. We were not overriding this
default when constructing the Config object during `google_assistant`
component setup, whereas we do when setting up the `cloud` component.

To fix, we thread the `allow_unlock` parameter down through http setup,
and ensure that it's set correctly. Moreover, we also change the
ordering of the `Config` parameters, and remove the default. Future
refactoring should not miss it, as it is now a required parameter.
2018-12-02 11:14:46 +01:00
Paulus Schoutsen a62fc7ca04
Use string formatting (#18886)
* Use string formatting

* Fix lint issue

* Fix change
2018-12-02 10:53:09 +01:00
pbalogh77 0a68cae507 Fibaro ubs (#18889)
* Fibaro HC connection, initial commit

Very first steps working, connects, fetches devices, represents sensors, binary_sensors and lights towards HA.

* Cover, switch, bugfixes

Initial support for covers
Initial support for switches
Bugfixes

* Some cleanup and improved lights

pylint based cleanup
light switches handled properly
light features reported correctly

* Added status updates and actions

Lights, Blinds, Switches are mostly working now

* Code cleanup, fiblary3 req

Fiblary3 is now in pypi, set it as req
Cleanup based on pylint

* Included in .coveragerc and added how to use guide

Included the fibaro component in coveragerc
Added usage instructions to file header

* PyLint inspired fixes

Fixed pylint warnings

* PyLint inspired fixes

PyLint inspired fixes

* updated to fiblary3 0.1.5

* Minor fixes to finally pass pull req

Fixed fiblary3 to work with python 3.5
Updated fiblary3 to 0.1.6
(added energy and batteryLevel dummies)

* module import and flake8 fixes

Finally (hopefully) figured out what lint is complaining about

* Fixed color support for lights, simplified callback

Fixed color support for lights
Simplified callback for updates
Uses updated fiblary3 for color light handling

* Lean and mean refactor

While waiting for a brave reviewer, I've been making the code smaller and easier to understand.

* Minor fixes to please HoundCI

* Removed unused component

Scenes are not implemented yet

* Nicer comments.

* DEVICE_CLASS, ignore plugins, improved mapping

Added support for device class and icons in sensors and binary_sensors
Improved mapping of sensors and added heuristic matching
Added support for hidden devices
Fixed conversion to float in sensors

* Fixed dimming

Fibaro apparently does not need, nor like the extra turnOn commands for dimmers

* flake8

* Cleanup, Light fixes, switch power

Cleanup of the component to separate init from connect, handle connection error better
Improved light handling, especially for RGBW strips and working around Fibaro quirks
Added energy and power reporting to switches

* Missing comment added

Missing comment added to please flake8

* Removed everything but bin.sensors

Stripdown, hoping for a review

* better aligned comments

OMG

* Fixes based on code review

Fixes based on code review

* Implemented stopping

Implemented stopping of StateHandler thread
Cleanup for clarity

* Minor fix

Removed unnecessary list copying

* Nicer wording on shutdown

* Minor changes based on code review

* minor fixes based on code review

* removed extra line break

* Added Fibaro omcponents

Added cover, light, sensor and switch components

* Improved support for Fibaro UBS

Improved support for Fibaro Universal Binary Sensor, when configured to flood sensor or motion sensor.
2018-12-02 10:52:37 +01:00
Adam Mills a10cbadb57 Restore states when removing/adding entities (#18890) 2018-12-02 10:51:15 +01:00
emontnemery bbb40fde84 Optionally do not log template rendering errors (#18724) 2018-12-02 10:31:46 +01:00
emontnemery ce218b172a Small refactoring of MQTT climate (#18814) 2018-12-02 10:30:07 +01:00
emontnemery 2e4e673bbe Small refactoring of MQTT alarm (#18813) 2018-12-02 10:29:31 +01:00
emontnemery db4a0e3244 Small refactoring of MQTT cover (#18850) 2018-12-02 10:27:50 +01:00
Daniel Høyer Iversen de82df3c6b
Merge pull request #18892 from home-assistant/upgrade-sphinx
Upgrade Sphinx to 1.8.2
2018-12-02 09:57:52 +01:00
Daniel Høyer Iversen 3bc83920b4
Merge branch 'dev' into upgrade-sphinx 2018-12-02 08:46:34 +01:00
Daniel Høyer Iversen 253dc66129
Merge pull request #18895 from home-assistant/upgrade-slacker
Upgrade slacker to 0.11.0
2018-12-02 08:45:02 +01:00
Daniel Høyer Iversen b063547138
Merge pull request #18851 from emontnemery/mqtt_fan_refactor
Small refactoring of MQTT fan
2018-12-02 08:43:56 +01:00
Daniel Høyer Iversen d8c6cb1112
Merge pull request #18852 from emontnemery/mqtt_sensor_refactor
Small refactoring of MQTT sensor
2018-12-02 08:40:57 +01:00
Daniel Høyer Iversen 5b0c12b12b
Merge pull request #18864 from meatheadmike/dev
Bump pywemo to 0.4.33 (expanded port range fixes dimmers on latest firmware)
2018-12-02 08:38:37 +01:00
Daniel Høyer Iversen ba372c085c
Merge pull request #18880 from ludeeus/tautulli-fix
Fixes error with getting attributes from Tautulli
2018-12-02 08:35:30 +01:00
Daniel Høyer Iversen 2c36f4411e
Merge pull request #18879 from ludeeus/multiple-googlehome
Fix stability issues with multiple googlehome units
2018-12-02 08:33:33 +01:00
Daniel Høyer Iversen 8eb9445bea
Merge pull request #18904 from home-assistant/upgrade-Pillow
Upgrade pillow to 5.3.0
2018-12-02 08:28:27 +01:00
Daniel Høyer Iversen 456cec2931
Merge pull request #18903 from home-assistant/upgrade-ruamel.yaml
Upgrade ruamel.yaml to 0.15.80
2018-12-02 08:28:04 +01:00
Daniel Høyer Iversen af7fe8c4fd
Merge pull request #18902 from home-assistant/upgrade-restrictedpython
Upgrade restrictedpython to 4.0b7
2018-12-02 08:27:40 +01:00
Daniel Høyer Iversen 41ad04276b
Upgrade sphinx-autodoc-typehints to 1.5.1 (#18893) 2018-12-02 08:26:46 +01:00
Fabian Affolter e591234b59 Upgrade keyring to 17.0.0 (#18901) 2018-12-02 08:26:23 +01:00
Fabian Affolter 9f3c9cdb11
Upgrade pillow to 5.3.0 2018-12-02 00:30:02 +01:00
Fabian Affolter 48b8fc9e01
Upgrade ruamel.yaml to 0.15.80 2018-12-02 00:17:41 +01:00
Fabian Affolter 4807ad7875
Upgrade restrictedpython to 4.0b7 2018-12-02 00:11:47 +01:00
Fabian Affolter 7b6893c9d3
Fix change 2018-12-01 22:08:15 +01:00
Fabian Affolter 4b85ffae4f
Upgrade slacker to 0.11.0 2018-12-01 22:01:22 +01:00
Fabian Affolter 2ca4893948
Upgrade sphinx-autodoc-typehints to 1.5.1 2018-12-01 21:48:56 +01:00
Fabian Affolter 9156a827ce
Upgrade Sphinx to 1.8.2 2018-12-01 21:45:16 +01:00
ludeeus 1dac84e9dd corrects , -> . typo 2018-12-01 21:34:31 +01:00
ludeeus da715c2a03 Use dict.get('key') instead of dict['key'] 2018-12-01 21:32:31 +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
ludeeus 8e84401b68 bump ghlocalapi to use clear_scan_result 2018-12-01 16:28:22 +01:00
ludeeus 934eccfeee Fix stability issues with multiple units 2018-12-01 14:55:50 +01:00
ludeeus 89bd6fa494 Fix requirements_all 2018-12-01 14:51:32 +01:00
ludeeus d8b9bee7fb Fix IndexError for home stats 2018-12-01 14:51:32 +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
meatheadmike 0754a63969
Bumped pywemo to 0.4.33 2018-11-30 14:03:32 -07:00
meatheadmike 8a75bee82f
bump pywemo to 0.4.33
Bump pywemo to 0.4.33 - includes expended port range fix for dimmers
2018-11-30 14:00:26 -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