Commit Graph

3583 Commits (69f790f6cc0fafd5fff677f47225725d27a8b149)

Author SHA1 Message Date
Bas Nijholt 700cecc8ef sort imports according to PEP8 for airly (#29615) 2019-12-08 13:41:51 +01:00
springstan d752fe3033 Move imports to top for fido (#29557)
* Move imports to top for fido

* Fix tests for fido by using patch
2019-12-08 12:20:53 +01:00
Andrew McRae de0db1601b Add quarterly cycle for utility_meter component (#29534)
* Add quarterly tariff period to utility_meter

Many tariff cycles in Australia are 3 monthly (quarterly).
Add quarterly tariff cycle handling to the utility_meter component.

* Add quarterly tariff period to utility_meter

Many tariff cycles in Australia are 3 monthly (quarterly).
Add quarterly tariff cycle handling to the utility_meter component.

* Change date for test for utility_meter

* Add quarterly tariff period to utility_meter

Many tariff cycles in Australia are 3 monthly (quarterly).
Add quarterly tariff cycle handling to the utility_meter component.
2019-12-08 09:49:18 +01:00
springstan 957a2e99fd Move imports to top for tellduslive (#29550) 2019-12-08 09:48:08 +01:00
Franck Nijhof cc9589cff2 Add Elgato Key Light integration (#29592)
* Add Elgato Key Light integration

* Remove passing in of hass loop

* Tweaks a comment

* Tweaks a function name

* Ensure domain namespace in data exists in entry setup
2019-12-08 09:26:31 +01:00
Alexei Chetroi e360b1265f Add input_number.reload admin service. (#29584)
* Add input_number reload service.

* Add test.

* Allow platform setup without entities.

We can reload and add entities later.
2019-12-07 21:26:06 +01:00
Alexei Chetroi 256056430e Add input_datetime reload service. (#29581)
* Add input_datetime reload service.

* Add reload service test.
2019-12-07 21:24:56 +01:00
Alexei Chetroi ccb0fd5e32 Register automation.reload service as an admin service. (#29582)
* homeassistant/components/automation/__init__.py

* Register automation.reload as an admin service.
2019-12-07 21:17:30 +01:00
springstan 23fb364076 Move imports to top for openuv (#29541)
* Move imports to top for openuv

* Renamed mock_pyopenuv_ to MockClient in test_config_flow
2019-12-06 14:13:43 -07:00
springstan 74d86dfff9 Move imports to top for soundtouch (#29546)
* Move imports to top for soundtouch

* Format with black

* Fix pyling error by renaming variable

* Rename entity instances to include entity instead of device
2019-12-06 21:11:02 +01:00
springstan 6af30bc232 Move imports to top for notion (#29539)
* Move imports to top for notion

* Fix mocking library in test_config_flow.py
2019-12-06 12:40:00 -07:00
springstan 606d310ea3 Move imports to top for spc (#29547)
* Move imports to top for spc

* Fix pylint error by removing duplicate import
2019-12-06 15:40:04 +01:00
David K c5f4872aea Limit available heat/cool modes for HomeKit thermostats (#28586)
* Limit available heat/cool modes for HomeKit thermostats.
The Home app only shows appropriate modes (heat/cool/auto) for the device. Depending on the climate integration, disabling the auto start might be needed.

* Include improved mapping for HVAC modes in tests
2019-12-06 14:07:45 +01:00
springstan 27530be46f Move imports to top for influxdb (#29513) 2019-12-06 17:35:35 +05:30
springstan ec3ffe309a Move imports to top for toon (#29553) 2019-12-06 10:40:38 +01:00
springstan 8def0326dd Move imports to top for izone (#29508)
* Move imports to top for izone

* Isorted all imports, fixed tests for config_flow
2019-12-06 06:08:08 +01:00
Alexei Chetroi dc911ecc5b Add input_boolean reload service (#29379)
* Add input_boolean reload service.

* Add reload test.

* Address comments.

Register reload service as an admin service
Setup platform even if there're no entities
2019-12-05 20:31:18 -08:00
springstan 3b6bc9067f Move imports to top for mochad (#29514)
* Move imports to top for mochad

* Fix test test_light.py for mochad

* Fix test test_switch.py for mochad

* Make intra package imports relative in switch and light
2019-12-06 02:02:34 +01:00
orrpan 9ba9b3339b Add full state view for emulated_hue (apps using emulated_hue, 'sleep cycle' and 'sleep as android') (#26650)
* Add full state view for emulated_hue

* clean and support updated sleep cycle

* emulated hue add reuasable logic and cleanup code

* emulated hue correct typos

* Update hue_api.py

* correct error message and update test_hue_api.py

* cleanup test_hue_api.py
2019-12-05 15:23:54 -08:00
springstan 173966f459 Move imports to top for switcher_kis (#29530)
* Move imports to top for switcher_kis
* Disabled ungrouped imports if TYPE_CHECKING is true
2019-12-05 18:20:07 -05:00
springstan 20fdcbadff Move imports to top for nextbus (#29520)
* Move imports to top for nextbus

* Fix test_sensor.py failed tests
2019-12-05 21:56:42 +01:00
springstan 4e7b9eaed0 Move imports to top for monoprice (#29516)
* Move imports to top for monoprice

* Format test with black
2019-12-05 19:16:15 +01:00
springstan 19893b8f3c Move imports to top for islamic_prayer_times (#29506)
* Move imports to top for islamic_prayer_times

* Fix test_sensor.py for islamic_prayer_times

* Format test_sensor.py with black

* Fix tests for islamic prayer times sensor
2019-12-05 16:58:14 +01:00
springstan ed5cdb528c Move imports to top for group (#29485)
* Move imports to top for group

* Fix failing test for group
2019-12-05 13:44:11 +01:00
springstan 564fed7879 Move imports to top for ambient_station (#29497) 2019-12-05 12:50:53 +01:00
Paulus Schoutsen e99184bf68 Install requirements of after_dependencies when loading integrations (#29491)
* Install requirements of after_dependencies when loading integrations

* Fix smartthings test
2019-12-05 09:28:56 +01:00
Paulus Schoutsen dad11f8208 Fix tests & lint 2019-12-04 22:47:40 -08:00
Paulus Schoutsen 41440d4f1b Fix litejet tests 2019-12-04 21:47:35 -08:00
Paulus Schoutsen f6780c1fa2
Allow negative altitude in location updates (#29381) 2019-12-03 22:39:12 -08:00
Joakim Plate 26b63e73ad Add initial test suite for arcam_fmj integration (#29335)
* Add initial tests

* Adjust test

* Typo
2019-12-02 22:52:25 -08:00
Joakim Plate 4191d9ca8d Report unavailable entities to google (#28501)
* Report unavailable entites to google.

Entities should only removed when removed from HA. Removing a temporarily unavailable entity from google causes it to need to re-configured once it become available again.

* Fix test for unavailable entities
2019-12-02 22:14:16 -08:00
Joakim Plate 2569c4ae37 Google assistant storage of connected agents (#29158)
* Make async_report_state take agent_user_id

* Attempt to store synced agents

* Drop now not needed initialization

* Make sure cloud uses the all sync on changed preferences

* Some more places to use all version of sync

* Get the agent_user_id from the request context if available

* Minor cleanup

* Remove the old fixed agent_user_id for cloud

Instead pass along cloud_user where appropriate.

* async_delay_save takes a function

* Adjust test for delayed store

* Remove unused save function

* Add login check.
2019-12-02 22:05:59 -08:00
Paulus Schoutsen 02d9ed5e36
Do not select all entities when omitting entity ID in service call (#29178)
* Do not select all entities when omitting entity ID

* Address comments Matthew

* Require either area_id or entity_id

* Fix tests

* Fix test
2019-12-02 16:23:12 -08:00
Franck Nijhof 76aaf8b560 Improve WLED white value support for RGBW strips (#29312) 2019-12-02 16:12:18 -08:00
Alain Turbide 83b21651ce Add alexa check for "name" channelMetadata attribute (#29279)
* Added check for "name" channelMetada attribute

* Added/changed smart home media player tests for added value name in chanelMetadata payload section

* Since Alexa only expects a number/callSign/affiliate in the returned response, returning "name" is not technically valid.  Modified to return the value in the callSign field  instead since it's a text value. Since there is no returned channel number, cannot return a true numeric value in "channel" field
2019-12-02 16:10:44 -08:00
Abílio Costa 9811d63d78 Improve Alexa interface selection for binary sensors (#29120)
* Improve Alexa interface selection for binary sensors

This allows the sensor to work correctly as a contact or motion sensor
in alexa, if the user overrides its display category as such.

* add tests
2019-12-02 16:02:17 -08:00
Raman Gupta 040fd9c258 Update service domains for xiaomi_miio from base domains to xiaomi_miio domain (#29134)
* move service constants to const.py, move all custom xiaomi_miio services to xiaomi_miio domain

* update service names

* try to fix black error

* try black formatting again

* final black formatting attempt

* update service names to reflect platform

* fix typo
2019-12-02 11:49:39 -08:00
Paulus Schoutsen ffaa0e572a
Inline MQTT paho imports (#29177)
* Inline MQTT paho imports

* Address comments

* Fix patch paths

* Move other imports inline

* Fix test
2019-12-02 11:32:02 -08:00
NobleKangaroo 3f2b6bfaa4 Overhaul Emulated Hue (#28317)
* Emulated Hue Overhaul

* Fix erroneous merge

* Remove unused code

* Modernize string format
2019-12-01 21:00:22 -08:00
Paulus Schoutsen d1aa0cea97
Move intent registration to own integration (#29280)
* Move intent registration to own integration.

* Lint
2019-12-01 14:12:57 -08:00
Bram Kragten d91dd68b31 Limit parallel requests to Philips Hue (#29189)
* Limit parallel requests to Philips Hue

* Fix tests

* Remove loop

* Update homeassistant/components/hue/bridge.py

Co-Authored-By: Paulus Schoutsen <balloob@gmail.com>
2019-12-01 13:24:16 -08:00
springstan 22225cea4d Move imports to top for seventeentrack (#29264)
* Move imports to top for seventeentrack

* Updated patch target path in test_sensor.py
2019-12-01 10:19:17 -07:00
jjlawren 6a02c6540e Stop Plex config flow imports where more user input needed (#29241)
* Abort imports that require user interaction, update logs and tests

* Disable lint
2019-11-30 22:07:12 -08:00
springstan 8908dba5b4 Add device trigger for alarm_control_panel (#29068)
* Added device trigger to alarm control panel

* Added supported features to check that device has certain trigger

* Fixed tests for device_trigger

* Fixed pylint error

* Removed pending trigger and removed trigger condition
2019-11-30 21:30:51 -08:00
Franck Nijhof d5efd0b352 Fix Espalexa being detected as Hue Bridge (#29237) 2019-11-30 21:28:42 -08:00
Malte Franken 6126d05935 Migrate NSW Rural Fire Service integration to async library (#29181)
* use async integration library

* adapted unit tests

* removed unused constants

* relocated constants

* simplified generation of new entries

* small code fixes

* increased test coverage and removed unused code

* fixed comment

* simplified patch code
2019-11-29 12:06:21 +01:00
Paulus Schoutsen b847d55077 Only create cloud user if cloud in use (#29150)
* Only create cloud user if cloud in use

* Pass context to alexa

* Update requirements

* Fix handing & design pattern for 0.30

* fix tests

* Fix lint & tests

* rename internal user
2019-11-28 14:23:59 +01:00
Paulus Schoutsen 4cfd24a03a
Fix mobile app device identifiers (#29173) 2019-11-27 20:27:22 -08:00
Raman Gupta b6d94bcc96 Change apns service domain and remove unused variable (#29165)
* change apns service domain and remove unused variable

* fix tests

* move DOMAIN to const.py and import DEVICE_TRACKER_DOMAIN from base component
2019-11-27 14:15:25 -08:00
jjlawren 88441d5f68 Reduce connection timeout to avoid config flow timeouts (#29172) 2019-11-27 14:14:01 -08:00
Tsvi Mostovicz d7a66e6e4c Return Jewish Calendar holiday type id support (#29168)
* Bring back holiday type id as a attribute to the holiday sensor

* Add test for holiday type id attribute
2019-11-27 20:52:03 +01:00
Raman Gupta ef21fd2536 Update services.yaml for nuheat (#29133)
* update services.yaml for nuheat

* update tests

* black formatting
2019-11-27 15:20:40 +01:00
Abílio Costa a08df53dbc Add "gentle" mode for Xiaomi Roborock vacuum (#29004)
* Add "gentle" mode for Xiaomi Roborock vacuum

* fix tests
2019-11-27 13:46:13 +01:00
Paulus Schoutsen 004476a1f8 Add intent integration to expose intent handle API (#29124)
* Add intent integration to expose intent handle API.

* Run hassfest + fix scaffolding

* Update __init__.py
2019-11-27 11:25:43 +01:00
Raman Gupta 5120181e0e move facebox service to facebox domain (#29151) 2019-11-27 11:20:24 +01:00
Joakim Plate 06231e7ac2
Move request sync logic into GoogleConfig (#28227)
* Move request sync logic into GoogleConfig

* Return http status code for request_sync same as cloud

* agent_user_id is not optional for async_sync_entities now

* No need in checking parameter here

* Adjust some things for cloud tests

* Adjust some more stuff for cloud tests

* Drop uneccessary else

* Black required change

* Let async_schedule_google_sync take agent_user_id

* Assert return value on api call

* Test old api key method

* Update homeassistant/components/google_assistant/helpers.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>
2019-11-26 22:47:13 +01:00
gjbadros 5f1b0fb15c Allow rest sensor list responses (#28835)
* Make rest sensor a little bit more flexible and allow the response to be a list with 0th element being a dictionary

* Black formatter wanted a different formatting

* Added test case for a list response with dict as 0th element

* Fixed lint error - it thinks a + STRING is an avoidance of using % sequences for log messages; I generally prefer explicit + rather than string juxtaposition for combining string literals, but sounds like that's not the standard

* Fixed test case -- I added it to the wrong scenario and need to use the one with json_attrs.
2019-11-26 22:10:58 +01:00
Nikolay Vasilchuk a37260faa9 StarLine integration (#27197)
* Device Tracker works

* Device Tracker works

* Binary Sensor

* Sensor

* Lock

* Switch and service

* New switches

* Update interval options

* WIP

* Translation errors

* Check online state

* WIP

* Move to aiohttp

* Some checks

* CI

* CI

* .coveragerc

* Black

* icon_for_signal_level test

* update_interval renamed to scan_interval

* async logic

* Fix cookie read

* Requirement starline

* Reformat

* Requirements updated

* ConfigEntryNotReady

* Requirement starline

* Lint fix

* Requirement starline

* available status

* Translations

* Expiration to config

* CI

* Linter fix

* Small renaming

* Update slnet token

* Starline version bump

* Fix updates

* Black

* Small fix

* Removed unused fields

* CI

* set_scan_interval service

* deps updated

* Horn switch

* Starline lib updated

* Starline lib updated

* Black

* Support multiple integrations

* Review

* async_will_remove_from_hass

* Deps updated

* Test config flow

* Requirements

* CI

* Review

* Review

* Review

* Review

* Review

* CI

* pylint fix

* Review

* Support "mayak" devices

* Icons removed

* Removed options_flow

* Removed options_flow test

* Removed options_flow test
2019-11-26 11:17:11 -08:00
Raman Gupta 9e01591cac Update service domain for blackbird from 'media_player' to 'blackbird' (#29112)
* move service constants to const.py, update blackbird custom service domain

* Readd bluesound services.yaml entries since it should be part of a different branch
2019-11-26 11:10:13 -08:00
Raman Gupta 499838d5a7 move service constants to const.py, move custom services to monoprice domain (#29099) 2019-11-26 10:07:29 -08:00
SukramJ c1163283ff Add hvac_action to HomematicIP Cloud Climate (#28859)
* Add hvac_action to HomematicIP Cloud Climate

* update test data

* limit hvac action to radiator only

* add checks

* Fix test to match new conditions
2019-11-26 10:02:30 -08:00
Raman Gupta 42ce5e8b07 Update service domain for local_file from 'camera' to 'local_file' (#28890)
* update service domain for local_file from camera to local_file

* remove service.yaml entry in camera component as part of change

* fix test

* move constants to const.py

* add local_file/const.py to .coveragerc

* remove local_file/const.py from .coveragerc since component has tests
2019-11-26 09:22:55 -08:00
Rami Mosleh a5960830d7 Add host field to add_torrent service (#28653)
* Add host field to add_torrent service

* Code cleanup

* use name instead of host for service

* update add_torrent
2019-11-26 09:22:12 -08:00
Quentame 44e708f72b Move ee_brightbox imports at top-level (#29054)
* Move ee_brightbox imports at top-level

* Fix tests

* Fix : Commented out code
2019-11-26 08:59:55 -08:00
Austin Drummond c47ed743f1 Fix HomeKit linked battery sensor crash (#28974)
* fix homekit linked battery sensor crash

* simplified missing linked battery

* fixed formatting

* Make if faster
2019-11-26 08:55:33 -08:00
Pascal Vizeli f9571c9637
Fix Alexa tests (#29100) 2019-11-26 16:17:41 +01:00
Paulus Schoutsen c76f768a82 Make conversation and intent context aware (#28965)
* WIP

* LINT
2019-11-26 11:30:21 +01:00
Tim McCormick 6c6a5c50a5 Fix digest auth rest sensors (#28153)
* Fix digest auth rest sensors

* Refactor to use request()

* Fix black complaints

* Don't rename data variable

Don't rename the data variable, appears several other sensors have been coded to rely on it

* Fix tests

test_setup_missing_schema:
Change the exception to check for to PlatformNotReady. With the change away from prepared statements, we no longer get the MissingSchema error during setup - we get it when we attempt to call the endpoint. Since the result is PlatformNotReady, which is what we want, and the error log clearly contains a note that the schema is incorrect I think this is fine.

test_setup_failed_connect & test_setup_timeout:
These aren't checking for minimum config, and they're not invoking the correct method to have the default config filled in. Therefore I've just added the correct minimum config so these can continue to test what they're there to test.

test_update_request_exception:
Testing a request exception with the assert on line 404! Excellent. Anyway, we've moved from using the requests Session object to the requests.request function - so the patch needed to be altered to ensure the RequestException was raised.

* Remove no longer needed import

* Fix binary sensor test in same way
2019-11-25 23:22:11 -08:00
ochlocracy b0925e60d7 Explicitly include "Alexa" Interface in discovery response (#28218)
* Explicitly include Alexa Interface to discovery response.

* Updated cloud component test to reflect additional Alexa interface.

* Updated test for recently added SeekController.
2019-11-25 23:05:10 -08:00
Ville Skyttä 99c7608fb4 Lint config cleanups (#28864)
* Remove bunch of unneeded lint exclusions

* Use symbolic names instead of identifiers in pylint disables

* Tighten scope of some pylint disables
2019-11-25 22:40:08 -08:00
Shulyaka 1f72de108c google_assistant: support for humidity sensors (#28695) 2019-11-25 22:12:20 -08:00
Dmitry Krasnoukhov 4881bc04d8 Allow to change MQTT climate hold mode (#28988) 2019-11-25 20:53:37 -08:00
Pedro Lamas db0008e62c Allow templates in rest_command headers (#26099) 2019-11-25 19:39:56 -08:00
Michaël Arnauts cc346e57e6 Cast the volume_level of a universal media_player to a float (#29045)
* Make sure to cast the volume_level of a universal media_player to a float

* Fix test that expects the wrong bahaviour

* Catch exception instead of checking for None
2019-11-25 18:01:24 -08:00
Quentame 8a413b152d Move esphome imports at top-level (#29064) 2019-11-25 18:00:58 -08:00
Andrew Onyshchuk f5c01cc30d Improve z-wave thermostat support (#27040)
* Improve z-wave thermostat support

Discover thermostat using COMMAND_CLASS_THERMOSTAT_MODE
so that it is a single entitiy in case there are multiple
setpoints. z-wave docs mention it is always present.
Add support for single/range target temperature depending
on the current thermostat mode.

* Remove debug print

* Refactor Z-Wave dynamic setpoint(s) selection

- use explicit mapping between modes and setpoints as defined in
Z-Wave specs
- add tests for away (2 setpoints) and heat eco (1 setpoint) modes

* Add non-standard thermostat mode aliases
2019-11-25 16:32:37 -08:00
Gil Peeters 0088995b98 Refactor template components to extract common routines (#27064)
* Added availability_template to Template Cover platform

* Added availability_template to Template Binary Sensor platform

* Added availability_template to Template Fan platform

* Added availability_template to Template Light platform

* Added availability_template to Template Sensor platform

* Added availability_template to Template Switch platform

* Added availability_template to Template Vacuum platform

* Added availability_template to Template Lock platform

* Added to test for invalid values in availability_template

* Black and Lint fix

* black formatting

* Added to test for invalid values in availability_template

* black

* Added to test for invalid values in availability_template

* Added to test for invalid values in availability_template

* simplified exception handler

* Fixed Entity discovery big and coverage

* Added to test for invalid values in availability_template

* flake8

* fixed component ID in test

* Added to test for invalid values in availability_template

* Added to test for invalid values in availability_template

* Made availability_template redering erorr more concise

* Cleaned template setup

* I'll remember to run black every time one of these days...

* Refactored Template initialisation

* Refactored Template initialisation

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Updated AVAILABILITY_TEMPLATE Rendering error

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Moved const to package Const.py

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fix import order (pylint)

* Fixed linting issues

* Moved availability_template rendering to common loop

* Moved availability_template rendering to common loop

* Moved availability_template rendering to common loop

* Moved availability_template rendering to common loop

* Removed 'Magic' string

* Removed 'Magic' string and removed duplicate code

* Removed 'Magic' string

* Removed 'Magic' string

* Brought contant into line

* Refactored availability_tempalte rendering to common loop

* Removed 'Magic' string

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* Cleaned up const and compare lowercase result to 'true'

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* reverted _available back to boolean

* Fixed tests (magic values and state checks)

* Fixed tests (magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Fixed tests (async, magic values and state checks)

* Removed duplicate

* Clean up and remove debug

* Reverted Dev Container Change
2019-11-25 16:30:49 -08:00
Quentame 112a3f5e9f Move hangouts imports at top-level (#29055) 2019-11-25 15:44:11 -08:00
SukramJ 1fde0d18ed Add supported_features to Alarm Control Panel to limit device_actions (#29065)
* Add supported_features to Alarm Control Panel

* mark supported_features abstract

* Add SF to async_register_entity_service

* fix test

* Add missing SF SUPPORT_ALARM_ARM_CUSTOM_BYPASS

* isort

* fix async_register_entity_service

* Update alarm_control_panel.py
2019-11-25 15:42:53 -08:00
ochlocracy 970a80216d Add valid inputs to alexa InputController (#28483)
* Add supported Inputs for Alexa.InputController.

* Fixed Test.

* Added default parameter for get() per @quthla suggestion.

* Added additional tests, assets call data.

* Added additional tests, asserts call data.

* Accounted for space in input name, added tests to handle space.
2019-11-25 15:17:12 -08:00
ochlocracy 5ea5db32d2 Add Alexa.ModeController to cover entities, adds open/close utterances! (#28309)
* Added Alexa.ModeController to cover entities.

* Added synonyms for directives.

* Updated tests for additional synonyms for directives.

* Added Alexa.ModeController to cover entities.

* Sacrifice unused variable in split() to please the Pylint gods.

* Removed duplicate instance check.

* Corrected variable name, clarified definition and consistency.

* Changed list to tuple.
2019-11-25 15:07:33 -08:00
ochlocracy dc8c085872 Support default display category based one switch device_class. (#28221) 2019-11-25 14:50:43 -08:00
SukramJ 9a5dc848c9 Fix climate device actions (#28660)
* limit climate device actions

* update test

* use supported_features for device_action

* Fix tests

* user support_features for device_condition
2019-11-25 11:12:00 -08:00
Chris Halls 5690313084 Report device unavailable state through Emulated Hue (#29029)
If an entity is in unavailable state in HA, we expose this
as unreachable to Hue clients. This helps when troubleshooting
Hue issues because you can now receive feedback if there is an issue
on the HA side.
2019-11-25 12:17:08 +01:00
escoand 430f7bdfd4 Catch samsungtv websocket exceptions (#28849)
* catch websocket exceptions

* fix syntax

* use exceptions from base class

* add comments

* add test
2019-11-25 10:45:50 +01:00
Santobert c35f9ee35f Creating a scene by snapshotting entities (#28939)
* Initial commit

* Add tests

* service.yaml

* typo

* snapshooted -> snapshot

* snapshot_entities instead of snapshot

* Edit validator

* Fix tests

* Remove keys()

* Improve coverage

* Activate scenes

* Use pytest.raise

* snapshot -> snapshotted
2019-11-22 13:21:28 -08:00
Kevin Eifinger 9f181ac92e bump herepy to 0.6.3.3 (#28907)
* bump herepy to 0.6.3.3

* run gen_requirements_all
2019-11-20 22:37:59 +01:00
Michael Hansen c2161b1f5a Add HTTP view to conversation to handle intents via JSON POST (#28818) 2019-11-19 13:47:03 -06:00
Paulus Schoutsen 94675ca5a7
Mark entity abc (#28869)
* Mark entity abc

* Use abstractmethod in climate

* Lint
2019-11-19 13:42:09 -06:00
Malte Franken 4e9e9efa43 GeoNet NZ Volcanic Alert Level sensor (#26901)
* first version of new integration

* moved icon to shared consts

* added unit tests

* transformed from geolocation to sensor integration

* alert level is now the state of the sensor

* adopted unit tests

* fixed comment

* keep all sensors registered even if the feed update fails intermittently

* bumped version of upstream library

* bumped version of integration library

* regenerated requirements

* bumped version of integration library

* bumped version of integration library

* fixed generated file

* removed commented out code

* regenerated config flow file

* update to latest integration library version

* simplified code

* removed debug log statement

* simplified code structure

* defined constant

* use core interfaces

* moved test and fixture

* sorted imports

* simplified patching

* moved fixture to central config file
2019-11-19 14:00:59 +01:00
Quentame eb23846cfe Move imports in owntracks component (#27780)
* Move imports in owntracks component

* Fix nacl import

* Fix nacl import 2

* Fix nacl import 3

* Add helper.supports_encryption tests

* Fix tests helper 1

* Fix tests 2

* Add not_supports_encryption + get_cipher_error tests

* Code cov

* Fix nacl_not_imported test
2019-11-18 16:47:30 +01:00
Ville Skyttä d4c80f160c Add bandit, use to catch known vulnerable XML parsing (#28341)
* Add bandit to pre-commit and CI, use to catch known vulnerable XML parsing

* Use defusedxml instead of direct xml.etree to parse XML

* Move config to tests/bandit.yaml
2019-11-18 09:10:15 +01:00
Fabian Affolter 101ab5c3fa
Align naming (#28830)
* Align naming

* Update tests
2019-11-17 15:53:34 +01:00
Jay Newstrom cb63a9d7e1 Add broadcast address for WOL and samsungtv (#28819)
* Add broadcast address for WOL and samsungtv

* Fix style

* Fix tests, and add new test for new functionality

* Fix code style
2019-11-17 13:17:22 +01:00
Jeff Irion c7f684d3f4 Bump androidtv to 0.0.34 (#28816)
* Bump androidtv to 0.0.33; add pure-python-adb requirement

* python -m script.gen_requirements_all

* Avoid redundant 'available' check

* Bump androidtv to 0.0.34

* Update docstrings for the decorator functions
2019-11-17 12:47:14 +01:00
Santobert 0996b717ce Improve coverage of input_datetime/reproduce_state (#28272)
* Improve coverage of input_datetime/reproduce_state

* Improve tests
2019-11-16 13:27:54 +01:00
Ville Skyttä d88ca0f5cb Lint exclusions (#28655)
* Remove malformed pylint disable markers

* Remove some unused imports

* Remove some unneeded lint exclusions

* Remove more unneeded lint exclusions

* Add specific codes to all noqa's
2019-11-16 10:22:07 +01:00
Davide Varricchio d796053d9f Add support for Hisense AEH-W4A1 wifi module (AC remote control) (#28641)
* First commit

* First working release, but there's a lot to do

* Added support for preset_modes

* Refined logic

* Added translations for config_flow

* Updated translations

* modified:   homeassistant/components/hisense_aehw4a1/climate.py

* modified:   climate.py

* Updated library to latest version

* Small changes

* Null states when AC off

* Minor fixes

* Latest updates for TOX

* First commit

* First working release, but there's a lot to do

* new file:   requirements_test_all.txt

* Added support for preset_modes

* Refined logic

* Added translations for config_flow

* Updated translations

* modified:   homeassistant/components/hisense_aehw4a1/climate.py

* modified:   climate.py

* Updated library to latest version

* Small changes

* Null states when AC off

* Minor fixes

* Latest updates for TOX

* new file:   requirements_test_all.txt

* Fighting with tox

* vs Tox round 2

* Isort and updated requirements_test_all.txt

* Fighting with lint

* Implemented available state

* Changed exception type after Travis-ci pylint fails

* Support entry in configuration.yaml

* Removed commented code

* Switched to async

* Minor changes

* Updated library and fixed pylint errors

* Code optimization

* Implemented static ip addresses in configuration.yaml

* Reverted to existing constant

* Corrected pylint wrong-import-order

* Recovery from nuke event (messing all while rebase)

* Resolved Ci error

* Changes for PR

* Corrected temp scale for frontend

* Added test for config entry from configuration.yaml

* Updated dependency

* Check on manual config

* Imported custom exceptions and modified import config

* Optimized

* Change based on PR revision

* Added logging for failure event on manual config

* Tests added but to be corrected

* Edited tests

* Tests updated to ensure no I/O

* Working on tests

* Cheanges based on revision for PR

* Setting librey exception as direct side_effect in test

* Final changes for PR

* Redundand on command solved

* Improved AC logic
2019-11-15 21:22:24 +01:00
SukramJ 60e7440ec1 Fix HomematicIP Cloud Alarm Control Panel support for basic mode (#28778) 2019-11-15 09:55:40 +01:00
Paolo Tuninetto b4ccc0202a Change keys for Samsung TV next and prev track command (#28213) 2019-11-15 09:53:16 +01:00