Commit Graph

43 Commits (edce497a0d48ba25a8b5a5373c4eec2a85b4a4a7)

Author SHA1 Message Date
Ville Skyttä 130571c478 Remove no longer needed auth.util, use secrets instead (#29861) 2019-12-12 16:46:33 +01:00
Bas Nijholt 23b92b2a56 Sort imports according to PEP8 for components starting with "S" (#29777) 2019-12-09 14:38:01 +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 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
Paulus Schoutsen 48660585f1 Add climate device triggers (#28544)
* Add climate device triggers

* Test capabilities
2019-11-07 16:28:45 +01:00
Paulus Schoutsen d98114d2ab Guard cloud check (#27901)
* Guard cloud check

* Fix pos args
2019-10-18 20:08:53 -05:00
Franck Nijhof a8a485abf7 Bumps aiohttp to 3.6.0 (#26728) 2019-09-19 20:34:41 +02:00
Andrew Sayre 3c07a9b4c7 Cleanup strings (#26243) 2019-08-27 17:08:09 -06:00
Robert Svensson a2589f56e1 Add system options to config entries (#25926)
* Add system options to config entries

* For feedback

* Follow most of balloobs comments

* Fix balloobs comments

* Improvements

* Fix second round of Balloobs comments

* Fix third round

* Add system options to mock config entry

* Fix integration tests

* Fix the last failing tests

* Fix disabled string

* Fix failing disabled_by tests

* New tests

* Config entry WS API tests

* Fix comments
2019-08-17 21:34:11 -07:00
Paulus Schoutsen 6f357cb23e First pass fixing tests that raise exceptions caught by asyncio.gather (#25860)
* First pass fixing tests that raise exceptions caught by asyncio.gather

* Fix demo test

* lint
2019-08-12 16:42:12 +02:00
Andrew Sayre b8460bb331 Always populate hvac_modes in SmartThings climate platform (#25859)
* Always return list for hvac_modes

* Use climate constants
2019-08-11 06:47:36 +02:00
Andrew Sayre 6909235d8a Fix brightness type (#25818) 2019-08-09 11:41:50 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Andrew Sayre 752d0deb97 Turn on device before setting mode (#25314) 2019-07-19 10:19:34 -07:00
Andrew Sayre cfc2c58fe0 Restore SmartThings A/C on/off services (#25259)
* Restore ST A/C on/off services

* Use correct OFF const

* Support AC HVAC_MODE_OFF
2019-07-18 10:14:58 -07:00
Andrew Sayre 20301ae888 Use MockConfigEntry (#25190) 2019-07-16 14:51:30 -07:00
Andrew Sayre a31e49c857
Improve SmartThings test mocking (#25028)
* Migrate to asynctest

* Simplify mock access

* Use mocks
2019-07-08 22:39:55 -04:00
Pascal Vizeli 84cf76ba36
Climate 1.0 (#23899)
* Climate 1.0 / part 1/2/3

* fix flake

* Lint

* Update Google Assistant

* ambiclimate to climate 1.0 (#24911)

* Fix Alexa

* Lint

* Migrate zhong_hong

* Migrate tuya

* Migrate honeywell to new climate schema (#24257)

* Update one

* Fix model climate v2

* Cleanup p4

* Add comfort hold mode

* Fix old code

* Update homeassistant/components/climate/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/climate/const.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* First renaming

* Rename operation to hvac for paulus

* Rename hold mode to preset mode

* Cleanup & update comments

* Remove on/off

* Fix supported feature count

* Update services

* Update demo

* Fix tests & use current_hvac

* Update comment

* Fix tests & add typing

* Add more typing

* Update modes

* Fix tests

* Cleanup low/high with range

* Update homematic part 1

* Finish homematic

* Fix lint

* fix hm mapping

* Support simple devices

* convert lcn

* migrate oem

* Fix xs1

* update hive

* update mil

* Update toon

* migrate deconz

* cleanup

* update tesla

* Fix lint

* Fix vera

* Migrate zwave

* Migrate velbus

* Cleanup humity feature

* Cleanup

* Migrate wink

* migrate dyson

* Fix current hvac

* Renaming

* Fix lint

* Migrate tfiac

* migrate tado

* Fix PRESET can be None

* apply PR#23913 from dev

* remove EU component, etc.

* remove EU component, etc.

* ready to test now

* de-linted

* some tweaks

* de-lint

* better handling of edge cases

* delint

* fix set_mode typos

* apply PR#23913 from dev

* remove EU component, etc.

* ready to test now

* de-linted

* some tweaks

* de-lint

* better handling of edge cases

* delint

* fix set_mode typos

* delint, move debug code

* away preset now working

* code tidy-up

* code tidy-up 2

* code tidy-up 3

* address issues #18932, #15063

* address issues #18932, #15063 - 2/2

* refactor MODE_AUTO to MODE_HEAT_COOL and use F not C

* add low/high to set_temp

* add low/high to set_temp 2

* add low/high to set_temp - delint

* run HA scripts

* port changes from PR #24402

* manual rebase

* manual rebase 2

* delint

* minor change

* remove SUPPORT_HVAC_ACTION

* Migrate radiotherm

* Convert touchline

* Migrate flexit

* Migrate nuheat

* Migrate maxcube

* Fix names maxcube const

* Migrate proliphix

* Migrate heatmiser

* Migrate fritzbox

* Migrate opentherm_gw

* Migrate venstar

* Migrate daikin

* Migrate modbus

* Fix elif

* Migrate Homematic IP Cloud to climate-1.0 (#24913)

* hmip climate fix

* Update hvac_mode and preset_mode

* fix lint

* Fix lint

* Migrate generic_thermostat

* Migrate incomfort to new climate schema (#24915)

* initial commit

* Update climate.py

* Migrate eq3btsmart

* Lint

* cleanup PRESET_MANUAL

* Migrate ecobee

* No conditional features

* KNX: Migrate climate component to new climate platform (#24931)

* Migrate climate component

* Remove unused code

* Corrected line length

* Lint

* Lint

* fix tests

* Fix value

* Migrate geniushub to new climate schema (#24191)

* Update one

* Fix model climate v2

* Cleanup p4

* Add comfort hold mode

* Fix old code

* Update homeassistant/components/climate/__init__.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* Update homeassistant/components/climate/const.py

Co-Authored-By: Paulus Schoutsen <paulus@home-assistant.io>

* First renaming

* Rename operation to hvac for paulus

* Rename hold mode to preset mode

* Cleanup & update comments

* Remove on/off

* Fix supported feature count

* Update services

* Update demo

* Fix tests & use current_hvac

* Update comment

* Fix tests & add typing

* Add more typing

* Update modes

* Fix tests

* Cleanup low/high with range

* Update homematic part 1

* Finish homematic

* Fix lint

* fix hm mapping

* Support simple devices

* convert lcn

* migrate oem

* Fix xs1

* update hive

* update mil

* Update toon

* migrate deconz

* cleanup

* update tesla

* Fix lint

* Fix vera

* Migrate zwave

* Migrate velbus

* Cleanup humity feature

* Cleanup

* Migrate wink

* migrate dyson

* Fix current hvac

* Renaming

* Fix lint

* Migrate tfiac

* migrate tado

* delinted

* delinted

* use latest client

* clean up mappings

* clean up mappings

* add duration to set_temperature

* add duration to set_temperature

* manual rebase

* tweak

* fix regression

* small fix

* fix rebase mixup

* address comments

* finish refactor

* fix regression

* tweak type hints

* delint

* manual rebase

* WIP: Fixes for honeywell migration to climate-1.0 (#24938)

* add type hints

* code tidy-up

* Fixes for incomfort migration to climate-1.0 (#24936)

* delint type hints

* no async unless await

* revert: no async unless await

* revert: no async unless await 2

* delint

* fix typo

* Fix homekit_controller on climate-1.0 (#24948)

* Fix tests on climate-1.0 branch

* As part of climate-1.0, make state return the heating-cooling.current characteristic

* Fixes from review

* lint

* Fix imports

* Migrate stibel_eltron

* Fix lint

* Migrate coolmaster to climate 1.0 (#24967)

* Migrate coolmaster to climate 1.0

* fix lint errors

* More lint fixes

* Fix demo to work with UI

* Migrate spider

* Demo update

* Updated frontend to 20190705.0

* Fix boost mode (#24980)

* Prepare Netatmo for climate 1.0 (#24973)

* Migration Netatmo

* Address comments

* Update climate.py

* Migrate ephember

* Migrate Sensibo

* Implemented review comments (#24942)

* Migrate ESPHome

* Migrate MQTT

* Migrate Nest

* Migrate melissa

* Initial/partial migration of ST

* Migrate ST

* Remove Away mode (#24995)

* Migrate evohome, cache access tokens (#24491)

* add water_heater, add storage - initial commit

* add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

delint

* Add Broker, Water Heater & Refactor

add missing code

desiderata

* update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

* bugfix - loc_idx may not be 0

more refactor - ensure pure async

more refactoring

appears all r/o attributes are working

tweak precsion, DHW & delint

remove unused code

remove unused code 2

remove unused code, refactor _save_auth_tokens()

* support RoundThermostat

bugfix opmode, switch to util.dt, add until=1h

revert breaking change

* store at_expires as naive UTC

remove debug code

delint

tidy up exception handling

delint

add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

add water_heater, add storage - initial commit

delint

add missing code

desiderata

update honeywell client library & CODEOWNER

add auth_tokens code, refactor & delint

refactor for broker

delint

bugfix - loc_idx may not be 0

more refactor - ensure pure async

more refactoring

appears all r/o attributes are working

tweak precsion, DHW & delint

remove unused code

remove unused code 2

remove unused code, refactor _save_auth_tokens()

support RoundThermostat

bugfix opmode, switch to util.dt, add until=1h

revert breaking change

store at_expires as naive UTC

remove debug code

delint

tidy up exception handling

delint

* update CODEOWNERS

* fix regression

* fix requirements

* migrate to climate-1.0

* tweaking

* de-lint

* TCS working? & delint

* tweaking

* TCS code finalised

* remove available() logic

* refactor _switchpoints()

* tidy up switchpoint code

* tweak

* teaking device_state_attributes

* some refactoring

* move PRESET_CUSTOM back to evohome

* move CONF_ACCESS_TOKEN_EXPIRES CONF_REFRESH_TOKEN back to evohome

* refactor SP code and dt conversion

* delinted

* delinted

* remove water_heater

* fix regression

* Migrate homekit

* Cleanup away mode

* Fix tests

* add helpers

* fix tests melissa

* Fix nehueat

* fix zwave

* add more tests

* fix deconz

* Fix climate test emulate_hue

* fix tests

* fix dyson tests

* fix demo with new layout

* fix honeywell

* Switch homekit_controller to use HVAC_MODE_HEAT_COOL instead of HVAC_MODE_AUTO (#25009)

* Lint

* PyLint

* Pylint

* fix fritzbox tests

* Fix google

* Fix all tests

* Fix lint

* Fix auto for homekit like controler

* Fix lint

* fix lint
2019-07-08 14:00:24 +02:00
Andrew Sayre 7db4eeaf7f
Move SmartThings imports to top (#24878)
* Move imports to top

* use lib constants

* Add missing three_axis mapping
2019-06-30 22:29:21 -04:00
Andrew Sayre 074142400a Fix SmartThings Samsung Air Conditioner Support (#23706)
* Bump pysmartthings to 0.6.8

* Fix AC climate device

* Fix stale comment
2019-05-06 10:21:16 -07:00
Andrew Sayre e26a5abb2b Don't return cover position when not supported (#22484) 2019-03-27 19:50:02 -07:00
Andrew Sayre 6526c68e2d Fix validate webhook requirements (#22248) 2019-03-21 09:13:20 -07:00
Andrew Sayre c401f35a43 Add cloudhook support to SmartThings component (#21905)
* Add support for Nabu Casa cloudhooks

* Added tests to cover cloudhook creation and removal

* Remove cloud dependency
2019-03-11 08:33:25 -04:00
Andrew Sayre 5ace55ea8d
Add SmartThings sensor support for Three Axis (#21841)
* Add support for Three Axis to sensor platform

* Changes per review feedback.

* Remove unnecessary KeyError except

* Fix lint issue in line wrapping
2019-03-09 18:45:15 -06:00
Andrew Sayre c927cd9c14
Add SmartThings climate support for Air Conditioners (#21840)
* Add support for Samsung Air Conditioners to Climate

* Changes per review feedback.

* Fix py3.5 compat list sorting in test
2019-03-09 18:43:16 -06:00
Andrew Sayre c5734eecc7 Update dependencies to receive data on webhook callbacks (#21838) 2019-03-08 21:20:07 -08:00
Andrew Sayre 3e0459cef9
SmartThings remove SmartApp/Automation on integration removal (#21594)
* Add clean-up logic upon entry removal

* Removed unecessary app removal from migration

* Change log level and clarified code
2019-03-03 13:47:25 -06:00
Andrew Sayre 3b9db88065 Add SmartThings Scene platform (#21405)
* Add SmartThings Scene platform

* Fixed failing tests after rebase

* Update cover tests.
2019-02-26 13:12:24 -08:00
Andrew Sayre d3f1ee4a89 Add SmartThings Cover platform and add cover device classes (#21192)
* Add additional device classes to Cover component; Add SmartThings cover platform; Improve lock test coverage

* Enhance cover platform to support position and battery level reporting.

* Add additional classes

* Removed device class descriptions

* Updates based on review feedback

* Add test case for closed
2019-02-25 10:13:34 -08:00
Andrew Sayre 0ccbf61aea Add power and energy attributes to SmartThings switch (#21375) 2019-02-25 15:50:16 +01:00
Andrew Sayre 04fc951048
Improve tolerance of SmartThings Climate platform (#21383)
* Improve resilience of platform with buggy handlers

* Eliminate possibility of None in operation list

* Refactor variable name
2019-02-24 10:45:11 -06:00
Andrew Sayre 3d9f4bf2aa SmartThings Lock platform state attributes enhancement (#21379)
* Add additional lock metadata

* Fixed attribute name in test
2019-02-24 02:52:37 +01:00
Andrew Sayre 8b38b82e73 Enhance SmartThings component subscription (#21124)
* Move to config v2 to store SmartApp oauth keys

* Add migration functionality.

* Regenerate refresh token on periodic basis

* Fix regenerate and misc. optimizations

* Review feedback

* Subscription sync logic now performs a difference operation

* Removed config entry reloading.
2019-02-22 20:35:12 +01:00
Andrew Sayre 93f84a5cd1 SmartThings Component Enhancements/Fixes (#21085)
* Improve component setup error logging/notification

* Prevent capabilities from being represented my multiple platforms

* Improved logging of received updates

* Updates based on review feedback
2019-02-15 17:40:54 +01:00
Joakim Plate c5de32e7b1 Climate const.py move (#20945)
* Move constants to const.py

* Import from const instead of climate
2019-02-14 20:34:43 +01:00
Ben Dews c20e0b985a Add Lock capability to SmartThings platform (#20977)
* Bumped pysmartthings version to 0.6.1

* Added Lock to supported platforms

* Added SmartThings Lock component

* Updated lock to eagerly set state

* Updated requirements_all.txt & requirements_test_all.txt with pysmartthings==0.6.1

* Added SmartThings Lock tests

* Removed inapplicable comment

* Removed unused import (STATE_UNLOCKED)

* Populated device_state_attributes with values provided by SmartThings

* Condensed if_lock assertion function

* Updated gathered attributes

* Fixed typo

* Updated tests to use new setup_platform

* Updated assignment of device state attributes

* Updated tests to utilise the LOCK_DOMAIN constant where suitable

* Fixed false positive for Switch test: (test_unload_config_entry)

* Implemented constant to contain expected SmartThings state for is_locked check

* Improved allocation of State Attributes

* Improved allocation of state attributes

* Fixed lint error (was running lint checks against the wrong file, whoops)

* Added test for unloading lock config

* Use isinstance instead of type()

* Updated device state to explicitly check for is not None instead of a truthy value
2019-02-13 18:36:49 -06:00
Andrew Sayre e8ed56ca52 Add SmartThings Climate platform (#20963)
* Add SmartThings Climate platform

* Add SmartThings Climate platform
2019-02-12 08:11:36 +01:00
Andrew Sayre 706810bbce Add SmartThings Sensor platform (#20848)
* Add Sensor platform and update pysmartthings 0.6.0

* Add tests for Sensor platform

* Redesigned capability subscription process

* Removed redundant Entity inheritance

* Updated per review feedback.
2019-02-07 21:51:17 -07:00
Andrew Sayre 38ea43b678 Add SmartThings button support via events (#20707)
* Add event support for buttons

* binary_sensor test clean-up
2019-02-02 22:08:37 -08:00
Andrew Sayre 6458abca2e Add SmartThings Binary Sensor platform (#20699)
* Add SmartThings binary_sensor platform

* Fixed comment typo.
2019-02-02 14:06:30 -08:00
Andrew Sayre acf5b04231 Add SmartThings Fan platform (#20681)
* Add SmartThings fan

* Removed unnecessary update method

* Corrected usage of async_schedule_update_ha_state

* Clean-up/optimization
2019-02-02 14:04:29 -08:00
Andrew Sayre a24da611c5 Add SmartThings Light platform (#20652)
* Add SmartThings Light platform and tests

* Cleaned a few awk comments

* Updates per review feedback

* Switched to super

* Changes per review feedback
2019-02-02 07:12:24 -08:00
Andrew Sayre 69ec7980ad Add SmartThings component and switch platform (#20148)
* Added SmartThings component and switch platform

* Corrected comment typos.

* Embedded switch platform.

* Replaced custom view usage with webhook component.

* Replaced urls with tokens in strings.

* Fixed line length.

* Use generated webhook id instead of static one.

* Reuse core constant instead of defining again.

* Optimizations in anticipation of future platforms.

* Use async_generate_path instead of hard-coded path.

* Fixed line length.

* Updates per review feedback.

* Updates per latest review feedback.
2019-01-30 17:31:59 -08:00