Ville Skyttä
fa4fa30461
Various string cleanups ( #30435 )
...
* Remove some unnecessary string concatenations
* Replace some simple str.formats with f-strings
* Replace some string concatenations with f-strings
2020-01-03 14:47:06 +01:00
Ville Skyttä
e6388e186c
Remove unnecessary string literal concatenations ( #30360 )
2020-01-02 21:17:10 +02:00
Ville Skyttä
868eb3c735
More helpers type improvements ( #30145 )
2019-12-22 19:51:39 +01:00
Ville Skyttä
ecdc1adf90
Upgrade mypy to 0.761 ( #30104 )
...
https://mypy-lang.blogspot.com/2019/12/mypy-0760-released.html
https://github.com/python/mypy/releases/tag/v0.761
2019-12-20 22:35:02 +01:00
Bas Nijholt
67c56c860d
Sort imports according to PEP8 for 'homeassistant' folder ( #29789 )
...
Components are already done
2019-12-09 16:42:10 +01:00
Paulus Schoutsen
eef91f843d
Rendering complex template objects to leave non-template values alone ( #29353 )
2019-12-03 14:15:45 -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
Erik Montnemery
42691b783e
Handle empty service in script action gracefully ( #27467 )
...
* Handle empty service in script action gracefully
* Add test
2019-10-12 12:28:47 -07:00
Matthew Donoughe
d16edb3ef0
add script shortcut for activating scenes ( #27223 )
...
* add script shortcut for activating scenes
use `- scene: scene.<scene name>` in a script to activate a scene
* Update validation
2019-10-05 13:30:43 -07:00
Franck Nijhof
2e17ad86af
Adds guards for missing information in call stack frames ( #27217 )
2019-10-05 11:59:33 +02: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
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
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
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
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
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
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
Ville Skyttä
a54ade1189
Spelling fixes ( #25666 )
2019-08-02 23:20:06 +02:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -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
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
Paulus Schoutsen
27d750db1c
Guard module being None ( #25077 )
2019-07-11 09:38:58 +02:00
Penny Wood
b30f4b8fc0
Improve boolean validator ( #24294 )
...
* Improve boolean validator
* Remove extra throw
* Remove None test as discussed
* Fix for tests depending on None == False
2019-06-07 22:18:02 -07:00
Paulus Schoutsen
59ce31f44f
No longer allow invalid slugs or extra keys ( #24176 )
...
* No longer allow slugs
* Lint
* Remove HASchema
* Lint
* Fix tests
2019-05-30 13:33:26 +02:00
Penny Wood
5b9d01139d
render_with_collect method for template ( #23283 )
...
* Make entity_filter be a modifiable builder
* Add render_with_collect method
* Use sync render_with_collect and non-class based test case
* Refactor: Template renders to RenderInfo
* Freeze with exception too
* Finish merging test changes
* Removed unused sync interface
* Final bits of the diff
2019-05-01 10:54:25 +08:00
Erik Montnemery
8d775caaac
Always print invalid configuration data ( #21972 )
...
* Always print invalide configuration data
* Print offending data as yaml
* Revert "Print offending data as yaml"
This reverts commit 01721a21a9ff918ed2c8595151ebfe55eb2f7d36.
* Do not print sensitive data
* Print MQTT topic
* Add line break
* Review comments
* review comments
2019-04-29 13:45:53 -07:00
Johann Kellerman
3453d67cfe
Person schema for merge_packages #21307 ( #21703 )
...
* Person schema for merge_packages #21307
* empty list
* skip empty persons
* hound
* test schema
* ensure_none
* remove any test changes
* remove_falsy validator
* nice!
* coretests
2019-04-02 19:43:06 -07:00
Jason Hu
6ba2891604
Add trusted_users in trusted networks auth provider ( #22478 )
2019-03-27 21:53:11 -07:00
Daniel Høyer Iversen
519315f9c8
pylint 2.3.0 ( #21485 )
...
* pylint 2.3.0
* remove const
* disable=syntax-error
2019-02-27 16:10:40 -05:00
Paulus Schoutsen
f1b84962ed
Add legacy PLATFORM_SCHEMA config validation ( #21072 )
...
* Add legacy PLATFORM_SCHEMA config validation
* Fix tests
* Lint
* Add persistent notification
* Update bootstrap.py
2019-02-16 23:05:06 -08:00
Rohan Kapoor
481439d387
Deprecate conf_update_interval ( #20924 )
...
* Deprecate update_interval and replace with scan_interval
* Update tests
* Fix Darksky tests
* Fix Darksky tests correctly
This reverts commit a73384a223ba8a93c682042d9351cd5a7a399183.
* Provide the default for the non deprecated option
* Don't override default schema for sensors
2019-02-17 06:23:09 +01:00
Otto Winter
06f2aa93a4
Add persistent notification
2019-02-15 18:40:46 +01:00
Otto Winter
f6ae054e9f
Lint
2019-02-15 10:57:02 +01:00
Otto Winter
9c09a98c9e
Add legacy PLATFORM_SCHEMA config validation
2019-02-14 20:55:51 +01:00
Rohan Kapoor
d5fad33599
Add better handling of deprecated configs ( #20565 )
...
* Add better handling of deprecated configs
* Embed the call to has_at_most_one_key in deprecated
* Add tests for checking the deprecated logs
* Add thoroughly documented tests
* Always check has_at_most_one_key
* Fix typing
* Move logging helpers to homea new logging helper
* Lint
* Rename to KeywordMessage instead of BraceMessage
* Remove unneeded KeywordStyleAdapter
* Lint
* Use dict directly rather than dict.keys() when creating set
* Patch the version in unit tests, update logging and use parse_version
* Re-add KeywordStyleAdapter and fix tests
* Lint
* Lint
2019-02-08 11:14:50 +01:00
Paulus Schoutsen
59393ab085
Prevent template changing options ( #20775 )
...
* Prevent complex template validation changing input value
* Remove deprecation warnings
2019-02-06 11:15:27 -08:00
emontnemery
b1faad0a50
Use PLATFORM_SCHEMA_BASE as base schema for additional components. ( #20578 )
...
* Disable extra=vol.ALLOW_EXTRA for additional platforms.
* Remove PLATFORM_SCHEMA_2
* Add entity_namespace to base platform schema
2019-02-04 21:52:19 -08:00
emontnemery
bada9b5e0b
Add entity_namespace to PLATFORM_SCHEMA ( #20693 )
...
* Add entity_namespace to base platform schema
* Add test
* Fix
2019-02-02 18:31:28 +01:00
emontnemery
d7ba2aad1d
Add COMPONENT_SCHEMA and use it in alarm_control_panel ( #20224 )
...
* Add COMPONENT_SCHEMA and use in alarm and mqtt
* Revert MQTT changes
* Lint
* Small tweak
* Add tests
* Rename COMPONENT_SCHEMA to PLATFORM_SCHEMA_BASE
* Fix tests
* Improve tests
2019-01-28 16:14:55 -08:00
Rohan Kapoor
38c33bd01e
Fix linting error ( #20488 )
2019-01-26 17:11:09 -08:00
Paulus Schoutsen
87316c4e83
Warn for old slugs/entity ids ( #20478 )
...
* Warn for old slugs/entity ids
* add comments
* Lint
* LInt
* Lint
* Lint
2019-01-26 14:09:41 -08:00
Johann Kellerman
6511e11ec9
Config Validator: schema_with_slug_keys ( #20298 )
...
* schema_with_slug_keys
* Update config_validation.py
* Update config_validation.py
2019-01-21 16:36:04 -08:00
Johann Kellerman
c36c708068
Align valid_entity_id with new slugify ( #20231 )
...
* slug
* ensure a dot
* fix
* schema_with_slug_keys
* lint
* test
2019-01-21 09:45:11 -08:00
Anders Melchiorsen
62844e237c
Allow 'all' entity_id in service schema ( #20278 )
2019-01-20 16:33:39 -08:00
Thomas Lovén
f73bda1218
Allow other icon prefixes than mdi: ( #19872 )
2019-01-08 20:08:20 -08:00
Paulus Schoutsen
8ea0a8d40b
RFC: Deprecate auto target all for services and introduce entity_id: * ( #19006 )
...
* Deprecate auto target all
* Match on word 'all'
2018-12-13 10:07:59 +01:00
Ville Skyttä
9c840f93f0
Use const.SUN_EVENT_* more ( #18039 )
2018-10-31 09:10:28 +01:00