1
mirror of https://github.com/home-assistant/core synced 2024-09-09 12:51:22 +02:00
Commit Graph

96 Commits

Author SHA1 Message Date
Chris Talkington
8a3279a5c9
Add device action support for remotes (#39400) 2020-09-07 08:54:18 -05:00
springstan
d2b1918e9c
Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
Jason Hunter
f2b3e63ff6
Media Source implementation for Chromecast (#39305)
* Implement local media finder and integrate into cast

* update to media source as a platform

* Tweak media source design

* fix websocket and local source

* fix websocket schema

* fix playing media

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Add resolve_media websocket

* Register that shit

* Square brackets

* Sign path

* add support for multiple media sources and address PR review

* fix lint

* fix tests from auto whitelisting config/media

* allow specifying a name on the media source

* add tests

* fix for python 3.7

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* add http back to cast and remove guess_type from executor as there is no i/o

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-04 11:16:29 -04:00
Paulus Schoutsen
b7ec0d4884 Remove stale print 2020-08-20 11:41:05 +00:00
Paulus Schoutsen
3dc79aa60a
Track entity sources (#37258)
Co-authored-by: David Mulcahey <david.mulcahey@me.com>
2020-08-19 14:57:38 +02:00
fabiocastagnino
02d572aae5
Add device classes for electrical measurement (#36800)
* added device classes for electrical measurement

(cherry picked from commit 2409fe19ed43bef568a0cca826652867d3a2d71a)

* upadte power factor unit (%)

* update power factor unit (%)
2020-08-08 21:04:18 +02:00
Ville Skyttä
435a88636a
Address new issues flagged by flake8 3.8.0a2 (#34964) 2020-04-30 21:37:58 +02:00
Erik Montnemery
e4333a7a44
Rename Light to LightEntity (#34593) 2020-04-26 18:49:41 +02:00
Erik Montnemery
8c5c963b96
Rename CoverDevice to CoverEntity (#34595) 2020-04-25 18:07:15 +02:00
Erik Montnemery
6f7f5b4034
Rename AlarmControlPanel to AlarmControlPanelEntity (#34590) 2020-04-25 18:05:28 +02:00
Erik Montnemery
b30d117e7d
Rename LockDevice to LockEntity (#34594) 2020-04-25 18:02:41 +02:00
Erik Montnemery
b022e08db9
Rename BinarySensorDevice to BinarySensorEntity (#34462)
* Rename BinarySensorDevice to BinarySensorEntity

* Tweak

* Move deprecation warning to __new__, add test

* Move deprecation warning back to __init__

* Move deprecation warning to __init_subclass
2020-04-23 21:57:07 +02:00
Joakim Sørensen
730a257f3c
Rename translations dir for integrations (#34494) 2020-04-21 16:11:05 -07:00
Paulus Schoutsen
98f1548f2d
Allow fetching translations by categories (#34329) 2020-04-18 17:13:13 -07:00
springstan
f1a0ca7cd3
Add and use percentage constant (#32094)
* Add and use percentage constant

* Fix pylint error and broken test
2020-02-28 11:46:48 -08:00
Erik Montnemery
3b17e570df
Add device actions to cover (#28064)
* Add device actions to cover

* Remove toggle action, improve tests

* lint

* lint

* Simplify actions

* Update homeassistant/components/cover/device_action.py

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

* Improve tests

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-02-27 21:05:43 -08:00
Paulus Schoutsen
c85a7934ed
Add brightness_step to light.turn_on (#31452)
* Clean up light turn on service

* Add brightness_step to turn_on schema

* Fix import

* Fix imports 2

* Fix RFLink test
2020-02-04 16:13:29 -08:00
Bas Nijholt
f60125b5c9 Sort imports according to PEP8 for 'tests' (#29791) 2019-12-09 16:52:24 +01: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
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
Erik Montnemery
7fee44b8c5 Add additional device conditions to cover (#27830)
* Add additional device conditions to cover

* Add default value

* Add test

* Use numeric_state condition instead of template condition
2019-10-25 13:50:46 -07:00
Erik Montnemery
6d083969c2 Add device action support to the lock integration (#27499)
* Add device action support to the lock integration

* Check that the enitity supports open service
2019-10-17 17:20:10 -07:00
Erik Montnemery
43c85c0549 Add device action support to the alarm_control_panel integration (#27616)
* Add device action support to the alarm_control_panel integration

* Improve tests
2019-10-16 21:34:56 -07:00
Erik Montnemery
89ebc17fb1 Only generate device trigger for sensor with unit (#27152) 2019-10-03 13:30:59 -07:00
Erik Montnemery
3e99743244
Add device trigger support to sensor entities (#27133)
* Add device trigger support to sensor entities

* Fix typing

* Fix tests, add test helper for comparing lists
2019-10-03 06:14:35 +02:00
Erik Montnemery
e5f6f33340 Add device automation support to binary_sensor entities (#26643)
* Add device automation support to binary_sensor entities

* turn_on -> turned_on

* Correct spelling of present

* Improve tests

* Fix strings

* Fix stale comment
2019-09-22 11:13:17 -07:00
Erik Montnemery
6a60ebdb30
Rename MockToggleDevice to MockToggleEntity (#26644)
* Rename MockToggleDevice to MockToggleEntity

* Fix tests
2019-09-15 09:50:17 +02:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
David F. Mulcahey
3c487928d4 New scanner device tracker and ZHA device tracker support (#24584)
* initial implementation for zha device trackers

* constant

* review comments

* Revert "review comments"

This reverts commit 2130823566820dfc114dbeda08fcdf76ed47a4e7.

* rename device tracker entity

* update trackers

* raise when not implemented

* Update homeassistant/components/device_tracker/config_entry.py

Review comment

Co-Authored-By: Martin Hjelmare <marhje52@kth.se>

* move source type to base state attrs

* review comments

* review comments

* review comments

* fix super call

* fix battery and use last seen from device

* add test

* cleanup and add more to test

* cleanup post zha entity removal PR

* add tests for base entities

* rework entity tests
2019-07-04 12:44:39 +02:00
Rohan Kapoor
6ba9ccf052 Load requirements and dependencies from manifests. Fallback to current REQUIREMENTS and DEPENDENCIES (#22717)
* Load dependencies from manifests. Fallback to current DEPENDENCIES

* Fix typing

* Ignore typing correctly

* Split out dependency processing to a new method

* Fix tests

* Only pull from manifest if dependencies is non empty

* Inline temporary function

* Fix light tests [skip ci]

* Fix tests/common

* Fix some mqtt tests [skip ci]

* Fix tests and component manifests which have only one platform

* Fix rflink tests

* Fix more tests and manifests

* Readability over shorthand format

* Fix demo/notify tests

* Load dependencies from manifests. Fallback to current DEPENDENCIES

* Load requirements from manifests. Fallback to current REQUIREMENTS

* Fix typing

* Ignore typing correctly

* Split out dependency processing to a new method

* Only pull from manifest if dependencies is non empty

* Inline temporary function

* Fix tests and component manifests which have only one platform

* Fix rflink tests

* Readability over shorthand format

* Clean up requirements

* Use integration to resolve deps/reqs

* Lint

* Lint

* revert a change

* Revert a test change

* Fix types

* Fix types

* Add back cache for load component

* Fix test_component_not_found

* Move light.test and device_tracker.test into test package instead with manifest to fix tests

* Fix broken device_tracker tests

* Add docstrings to __init__

* Fix all of the light tests that I broke earlier

* Embed the test.switch platform to fix other tests

* Embed and fix the test.imagimage_processing platform

* Fix tests for nx584

* Add dependencies from platform file's DEPENDENCIES

* Try to setup component when entity_platform is setting up

Fix tests in helpers folder

* Rewrite test_setup

* Simplify

* Lint

* Disable demo component if running in test

Temp workaround to unblock CI tests

* Skip demo tests

* Fix config entry test

* Fix repeat test

* Clarify doc

* One extra guard

* Fix import

* Lint

* Workaround google tts
2019-04-11 01:26:36 -07:00
Paulus Schoutsen
cac00f5b26 Test for circular dependencies using manifests (#22908)
* Integration dependencies

* Lint

* Lint

* Fix one test

* Lint

* Fix load custom component integration

Fix async issue
Add circular dependency detection in manifest validation

* Fix test

* Address review comment

* Apply suggestions from code review

Co-Authored-By: balloob <paulus@home-assistant.io>
2019-04-09 09:30:32 -07:00
Paulus Schoutsen
2435456248 Prevent partial custom component overlays (#21070)
* Prevent partial custom component overlays

* Fix tests
2019-02-21 09:41:36 +01:00
Paulus Schoutsen
16159cc3d0
Update platform loading path (#20807)
* Warn when platform loaded from an entity component folder

* Fix tests
2019-02-07 13:33:12 -08:00
Paulus Schoutsen
9fd21d20ae
Fix loading translations for embedded platforms (#20122)
* Fix loading translations for embedded platforms

* Update doc string

* Lint
2019-01-15 16:06:04 -08:00
Paulus Schoutsen
994b829cb4
add_devices -> add_entities (#16171)
* add_devices -> add_entities

* Lint

* PyLint

* Revert external method in scsgate
2018-08-24 16:37:30 +02:00
Paulus Schoutsen
5c95c53c6c Revert custom component loading logic (#14327)
* Revert custom component loading logic

* Lint

* Fix tests

* Guard for infinite inserts into sys.path
2018-05-07 11:25:48 +02:00
Paulus Schoutsen
34727be5ac
Fix module names for custom components (#14317)
* Fix module names for custom components

* Also set __package__ correctly

* bla

* Remove print
2018-05-06 20:54:56 -04:00
Paulus Schoutsen
83d300fd11 Custom component loading cleanup (#14211)
* Clean up custom component loading

* Fix some tests

* Fix some stuff

* Make imports work again

* Fix tests

* Remove debug print

* Lint
2018-05-01 20:57:30 +02:00
Adam Mills
89c7c80e42 Use hue/sat as internal light color interface (#11288)
* Accept and report both xy and RGB color for lights

* Fix demo light supported_features

* Add new XY color util functions

* Always make color changes available as xy and RGB

* Always expose color as RGB and XY

* Consolidate color supported_features

* Test fixes

* Additional test fix

* Use hue/sat as the hass core color interface

* Tests updates

* Assume MQTT RGB devices need full RGB brightness

* Convert new platforms

* More migration

* Use float for HS API

* Fix backwards conversion for KNX lights

* Adjust limitless min saturation for new scale
2018-03-18 15:00:29 -07:00
Adam Mills
b434ffba2d Support serving of backend translations (#12453)
* Add view to support backend translation fetching

* Load backend translations from component json

* Translations for season sensor

* Scripts to merge and unpack Lokalise translations

* Fix copy paste error

* Serve post-lokalise translations to frontend

* Linting

* Auto-deploy translations with Travis

* Commit post-lokalise translation files

* Split logic into more helper functions

* Fall back to English for missing keys

* Move local translation copies to `.translations`

* Linting

* Initial tests

* Remove unnecessary file check

* Convert translation helper to async/await

* Convert translation helper tests to async/await

* Use set subtraction to find missing_components

* load_translation_files use component->file mapping

* Remove duplicated resources fetching

Get to take advantage of the slick Python 3.5 dict merging here.

* Switch to live project ID
2018-02-28 19:31:38 -08:00
Stu Gott
9c4bc2a47f Add Kira component to sensor and remote platforms (#7479)
* Add Kira component to sensor and remote platforms

* Test cases for Kira component and platforms
2017-05-12 21:12:47 -07:00
Fabian Affolter
a4f1f6e724 Update docstrings (#7374)
* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstrings

* Update docstring

* Update docstrings

* Update docstrings

* Fix lint issues

* Update docstrings

* Revert changes in dict
2017-05-02 09:18:47 -07:00
Pascal Vizeli
261ffbbfea Move part of image_processing tests (#5634)
* Move part of image_processing tests

* fix lint
2017-01-29 14:40:37 -08:00
Pascal Vizeli
b2371c6614 Update device_traker for async platforms (#5102)
Async DeviceScanner object, migrate to async, cleanups
2017-01-02 21:50:42 +02:00
Paulus Schoutsen
d2bbc6ef70 Upgrade linter (#4461) 2016-11-18 21:47:59 -08:00
Paulus Schoutsen
8ee4503d7c Exclude tests in dependencies in test dir from pytest (#2618) 2016-07-25 08:26:07 -07:00