Franck Nijhof
2e17ad86af
Adds guards for missing information in call stack frames ( #27217 )
2019-10-05 11:59:33 +02:00
Erik Montnemery
c43eeee62f
Improve validation of device condition config ( #27131 )
...
* Improve validation of device condition config
* Fix typing
2019-10-02 15:58:14 -07:00
Erik Montnemery
65ce3b49c1
Add support for `for` to binary_sensor, light and switch device triggers ( #26658 )
...
* Add support for `for` to binary_sensor, light and switch device triggers
* Add WS API device_automation/trigger/capabilities
2019-10-02 22:14:52 +02:00
Erik Montnemery
5a1da72d5e
Improve validation of device action config ( #27029 )
2019-10-01 20:35:36 -07:00
Pascal Vizeli
c1851a2d94
Cleanup coroutine threadsafe ( #27080 )
...
* Cleanup coroutine threadsafe
* fix lint
* Fix typing
* Fix tests
* Fix black
2019-10-01 16:59:06 +02:00
Ville Skyttä
f259ff17d5
Type hint additions ( #26831 )
...
* Type hint additions
* Remove optional from sidebar_icon comment
Co-Authored-By: Franck Nijhof <frenck@frenck.nl>
* Remove optional from sidebar_title comment
Co-Authored-By: Franck Nijhof <frenck@frenck.nl>
* Fix issues after rebase and mypy 0.730
2019-09-29 20:07:49 +03:00
Ville Skyttä
fde128d66c
Upgrade mypy to 0.730, address raised issues ( #26959 )
...
https://mypy-lang.blogspot.com/2019/09/mypy-730-released.html
2019-09-27 22:57:59 +03:00
Erik Montnemery
e57e7e8449
Improve validation of device trigger config ( #26910 )
...
* Improve validation of device trigger config
* Remove action and condition checks
* Move config validation to own file
* Fix tests
* Fixes
* Fixes
* Small tweak
2019-09-27 17:48:48 +02:00
Bram Kragten
b75639d9d1
Remove lamps and groups from ha when removed from Hue ( #26881 )
...
* Remove light when removed from hue
* add remove_config_entry_id
* Review + bump aiohue
* lint
* Add tests
2019-09-25 14:00:18 -07:00
Franck Nijhof
9c9c921922
Use Python3 new super syntax sugar ( #26890 )
2019-09-24 15:38:20 -07:00
Paulus Schoutsen
6fdff9ffab
Reorg device automation ( #26880 )
...
* async_trigger -> async_attach_trigger
* Reorg device automations
* Update docstrings
* Fix types
* Fix extending schemas
2019-09-24 14:57:05 -07:00
Franck Nijhof
b52cfd3409
Add comment for clarity to helper.entity.enabled() ( #26793 )
...
* Fixes entity enabled expression
* Ensure True is returned when there is no registry_entity
* Add comment for clarity to helper.entity.enabled()
2019-09-24 14:21:00 -07:00
Franck Nijhof
6f9ccb5434
Add and corrects typehints in Entity helper & core class ( #26805 )
...
* Add and corrects typehints in Entity class
* Adjust state type based on comments
2019-09-24 14:20:04 -07:00
Franck Nijhof
b1118cb8ff
Removes unnecessary else/elif blocks ( #26884 )
2019-09-24 13:53:03 -07:00
Ville Skyttä
54242cd65c
Type hint additions ( #26765 )
2019-09-20 08:23:34 -07:00
Erik Montnemery
02ded7a4a8
Remove device from device action schema ( #26536 )
2019-09-09 10:40:22 -07:00
Erik Montnemery
b14b14c3c9
Add device automation support to switch entities ( #26466 )
...
* Add device automation support to switch entities
* Update switch translations
* Address review comments
2019-09-09 16:55:47 +02:00
Ville Skyttä
33e1b44b3a
Use PEP 526 type annotations, add some type hints ( #26464 )
...
* Add some more type hints to helpers.event
* Change most type comments to variable types
* Remove some superfluous type hints
2019-09-07 09:48:58 +03:00
Erik Montnemery
b1c2a5fa08
Add device automation action ( #26455 )
...
* Add support for device actions, with light as example.
* Add translation; return list
2019-09-05 16:26:22 -07:00
Erik Montnemery
f7dc537275
Add device automation condition ( #26313 )
...
* Add support for device conditions
* Lint
* Update test case
* Make and+or conditions async, adjust tests
* Cleanup tests
* Remove non callback versions of conditions, correct typing
* Correct typing
* Update light/strings.json
* Address review comments
* Make device automation lists simple lists, not dicts
* Add device_automation/const.py
* Use IS_ON/IS_OFF everywhere for conditions
2019-09-05 16:49:32 +02:00
Penny Wood
4004879ae0
Entity registry doesn't overwrite with None ( #24275 )
2019-09-04 09:49:22 -07:00
Franck Nijhof
2f0eb07624
Migrate legacy typehints in core to PEP-526 ( #26403 )
...
* Migrate legacy typehints in core to PEP-526
* Fix one type
2019-09-03 20:36:04 -07:00
Paulus Schoutsen
0cffd61481
Allow passing dictionaries to async_register_entity_service ( #26370 )
2019-09-03 09:50:24 +02:00
SukramJ
cf3bb300e6
Fix for 0.98: Don't update disabled entities (Homematic IP Cloud) ( #26236 )
...
* Homematic IP Cloud Fix: Don't update disabled entities
* Added enabled to entity.py
* Update test for enabled
* Update entity.py
2019-08-28 13:38:20 -07:00
Franck Nijhof
decf13b948
Use literal string interpolation in core (f-strings) ( #26166 )
2019-08-23 09:53:33 -07:00
Paulus Schoutsen
f704a8e90e
Reload config entry when entity enabled in entity registry, remove entity if disabled. ( #26120 )
...
* Reload config entry when disabled_by updated in entity registry
* Add types
* Remove entities that get disabled
* Remove unnecessary domain checks.
* Attach handler in async_setup
* Remove unused var
* Type
* Fix test
* Fix tests
2019-08-22 19:32:43 -05:00
Paulus Schoutsen
aa56b4dd30
Log warning if disabled entities receive updates. ( #26143 )
...
* Log warning if disabled entities receive updates.
* Fix test
* Always set entity ID on disabled entities
2019-08-22 14:12:24 -07:00
Jeff Irion
7090970436
Add descriptive fields to script config ( #26056 )
...
* Add descriptive fields to script config
* Add script descriptions to hass.data["service_description_cache"]
* Import SERVICE_DESCRIPTION_CACHE
* Register script descriptions via async_set_service_schema
* Add scripts test for loading and reloading service descriptions
* Minor cleanup
* Clean up script schema
2019-08-21 14:08:46 -07: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
eba6caf8a1
Entity registry api update disable ( #26015 )
...
* Clean up entity registry WS commands
* Allow updating disabled_by in entity registry
* Allow changing disabled_by via API
* Update tests/components/config/test_entity_registry.py
Co-Authored-By: Robert Svensson <Kane610@users.noreply.github.com>
2019-08-16 16:22:45 -07:00
Paulus Schoutsen
8b66c11706
Fix config entry has options check ( #25976 )
...
* Fix config entry has options check
* Register webhook/discovery config flows with classes
* Fix types
* Apply suggestions from code review
Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
2019-08-16 16:19:19 -07:00
Paulus Schoutsen
6c292846be
Allow entities to indicate they should be disabled by default ( #26011 )
2019-08-16 16:17:16 -07:00
Erik Montnemery
fad54cd6d8
Ensure sun conditions are using the right date ( #23664 )
...
* Ensure sun conditions are using the right date
2019-08-16 17:34:56 +02:00
Ville Skyttä
aa508b5106
Complete some incomplete type hints in helpers ( #25953 )
2019-08-15 08:53:25 -07:00
Paulus Schoutsen
cf90e49b50
Make reproduce state use platform instead of rely on function ( #25856 )
...
* Make reproduce state use platform instead of rely on function
* Fix types
* address comment Martin.
2019-08-11 20:03:21 -07:00
Johann Kellerman
8b9d0593b1
Allow components with empty list config (i.e. person) in packages ( #25827 )
...
* Fix #23424
* mypy Lists
2019-08-10 16:30:33 -07:00
Tomi Lehto
5b516fc0cd
Add arcus trigonometry functions to templates ( #25510 )
2019-08-09 11:16:47 -07:00
Joakim Plate
d1b9ebc7b2
Integration requirement check refactor ( #25626 )
...
* Factor out code getting requirements for integration
* Have process requirements raise an exception
* One more lint fix
* Blackify
* Catch new exception
* Let RequirementsNotFound be a HomeAssistantError
* Correct another test
* Split catching of exceptions and avoid complete log
2019-08-07 15:35:50 -07:00
Paulus Schoutsen
7a90808e52
Add service to reload scenes from configuration.yaml ( #25680 )
...
* Allow reloading scenes
* Update requirements
* address comments
* fix typing
* fix tests
* Update homeassistant/components/homeassistant/scene.py
Co-Authored-By: Martin Hjelmare <marhje52@kth.se>
* Address comments
2019-08-05 23:04:19 +02:00
Ville Skyttä
a54ade1189
Spelling fixes ( #25666 )
2019-08-02 23:20:06 +02:00
Paulus Schoutsen
620cb74050
Type
2019-07-31 13:08:31 -07:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Joakim Plate
3d11c45edd
Log platform import errors and correct reqs for config check ( #25425 )
...
* Log failures to load plaforms
* Drop unused exception variable
* Also load pip requirements with check config
* Fix lint
* More lint
* Drop invalid parameters for error call
2019-07-31 09:09:00 -07:00
aschamberger
3512d05467
Add ord() to template filters ( #25398 )
...
* Add ord() to template filters
* Remove trailing whitespace
* add test
2019-07-25 15:06:51 -07:00
Ville Skyttä
17d754dbbf
Optional and Union simplifications ( #25365 )
2019-07-21 10:59:51 -07:00
Ville Skyttä
d64f1e767c
Type check all helpers ( #25373 )
...
* Type check all helpers, add inline exclusions for work in progress
* Remove unused Script._template_cache
* Add some missing type hints
* Remove unneeded type: ignore
* Type hint fixes
* Mypy assistance tweaks
* Don't look for None in deprecated config "at most once" check
* Avoid None name slugify attempt when generating entity id
* Avoid None state store attempt on entity remove
2019-07-21 09:59:02 -07:00
David F. Mulcahey
0653f57fb4
change and condition to or condition ( #25374 )
2019-07-21 09:57:40 -07:00
nierob
979f801488
Avoid creating temporary lists ( #25317 )
...
That gives nano performance improvements as *() is slightly faster
then *[].
2019-07-19 13:36:18 -07:00
Ville Skyttä
56841da2d3
Upgrade mypy to 0.720, turn on unreachability warnings ( #25157 )
...
* Upgrade mypy to 0.720
* Turn on mypy unreachability warnings, address raised issues
2019-07-16 15:11:38 -07:00
Paulus Schoutsen
7aae490a85
Allow area ID in service call schemas ( #25121 )
...
* Allow area ID in service call schemas
* Remove ATTR_ENTITY_ID from service light turn off schcema
2019-07-15 11:31:53 -07:00