Chris Browet
5a2bcd2763
ADD: generalize regex_findall ( #54584 )
2021-09-05 12:41:39 +02:00
Ville Skyttä
b10fc89a6b
Automation trigger info type hint improvements ( #55402 )
...
* Make automation trigger info a TypedDict
* zwave_js trigger type hint fixes
* Remove redundant automation trigger info field presence checks
* Use async_initialize_triggers in mqtt and tasmota device_trigger tests
2021-09-04 02:25:51 +02:00
Raman Gupta
4d98a7e156
Allow device_id template function to use device name as input ( #55474 )
2021-08-31 14:56:47 +02:00
Raman Gupta
1d1b5ab345
Fix area_id and area_name template functions ( #55470 )
2021-08-30 13:09:41 -07:00
J. Nick Koston
43288d3e1f
Prevent storage loads from monopolizing the executor pool ( #55389 )
...
* Prevent storage loads from monopolizing the executor pool
- At startup there is an increasing demand to load data
from storage. Similar to #49451 and #43085 , we now prevent
the thread pool from being monopolized by storage loads and
allow other consumers that are doing network I/O to proceed
without having to wait for a free executor thread.
* Only create Semaphore instance when one is not already there
2021-08-28 18:30:20 -05:00
Raman Gupta
2f7a7b0309
Add template functions to get area_id and area_name ( #54248 )
...
* Add template function to get area_id
* fix int bug
* Prefer area name lookup
* remove unnecessary checks
* fix import
* Add area_name function
* change behavior to fail in ambiguous scenarios
* Revert lotto winning exception checking
* review comments
* try except else
2021-08-25 15:16:51 -04:00
Paulus Schoutsen
7c5a0174ba
Add an energy solar platform for solar forecasts ( #54576 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-25 11:37:03 -07:00
Børge Nordli
0d654fa6b3
Extract attribute names out of vol.Optional when validating entity service schema ( #55157 )
2021-08-25 13:00:11 +02:00
Franck Nijhof
243c52e210
Add missing BYN currency ( #55001 )
2021-08-21 19:14:48 -07:00
Ville Skyttä
59809503d1
Various type hint related improvements ( #54971 )
...
* Avoid some implicit generic Anys
* Fix hassio discovery view type hints
* Fix http view result type in assert message
2021-08-21 13:58:49 +02:00
Marc Mueller
69e413ac1e
Update pylint to 2.10.1 ( #54963 )
...
* Update pylint to 2.10.0
* useless-suppression
* Consider-using-tuple
* Apply suggestions from code review
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Use dict.items()
* Add pylint disable
* Use pylint 2.10.1
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-08-21 10:41:23 +02:00
Ville Skyttä
de6e7ea016
Replace *args and **kwargs type hint collections with value types ( #54955 )
2021-08-21 10:20:09 +03:00
Raman Gupta
036e99e91e
Allow integrations to define trigger platforms with a subtype ( #54861 )
2021-08-19 21:43:04 -07:00
Paulus Schoutsen
f1a4ba8bb0
Add Rainforest Eagle tests and price ( #54887 )
2021-08-19 13:19:31 -07:00
Paulus Schoutsen
4ae2a26aa3
Add config flow to Rainforest EAGLE-200 ( #54846 )
...
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-19 09:22:30 -07:00
Ville Skyttä
848c0be58a
Avoid some implicit generic Anys ( #54577 )
2021-08-16 23:12:06 +02:00
Erik Montnemery
4e07ab1b32
Move temperature conversions to sensor base class (1/8) ( #48261 )
...
* Move temperature conversions to entity base class (1/8)
* Update integrations a-c
* Leave old temperature conversion until all integrations are migrated
* tweak
* Use contextlib.suppress
* Remove the MeasurableUnitEntity mixin
* Address comments, add tests
* Fix f-string
* Drop deprecation warning from base entity class
* Update with _attr-shorthand
* Fix rebase mistakes
* Fix additional rebase mistakes
* Only report temperature conversion once
* Fix additional rebase mistakes
* Format homeassistant/components/bbox/sensor.py
* Fix check for overidden _attr_state
* Remove test workarounds from implementation
* Remove useless None-check
* Tweaks
* Migrate new sensors a-c
* Update climacell
* Push deprecation of temperature conversion forward
* Override __repr__ in SensorEntity
* Include native_value in SensorEntity attributes
* Pylint
* Black
* Black
* Fix rebase mistakes
* black
* Fix rebase mistakes
* Revert changes in august/sensor.py
* Revert handling of unit converted restored state
* Apply code review suggestion
* Fix arlo test
2021-08-11 10:45:05 +02:00
Richard T. Schaefer
3184f0697f
Add Save Persistent States service ( #53881 )
2021-08-10 00:38:56 +02:00
Paulus Schoutsen
952d11cb03
Ensure internal/external URL have no path ( #54304 )
...
* Ensure internal/external URL have no path
* Fix comment typo
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-09 09:38:09 +02:00
Allen Porter
160bd74bae
Update DeviceInfo static types ( #54276 )
...
* Update nest static types from aditional PR feedback
Update nest and device helper static types based on post-merge discussion in PR #53475
* Remove unused type: ignore in synology
* Remove check for None device type
Remove check for None device type in order to reduce untested code as this is
a case not allowed by the nest python library.
2021-08-08 19:24:36 -07:00
Paulus Schoutsen
1cc3ffe20d
Fix jinja warning ( #54109 )
2021-08-06 06:41:50 +02:00
Joakim Sørensen
3f2e18fe17
Add user to homeassistant system health ( #53902 )
2021-08-03 11:58:27 +02:00
Robert Svensson
c6213b36ad
Only disable a device if all associated config entries are disabled ( #53681 )
2021-07-29 12:08:53 -07:00
Franck Nijhof
1968b95829
Add currency core configuration ( #53541 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-07-28 08:55:58 +02:00
Raman Gupta
73bc0267e9
Add DeviceRegistry template functions ( #53131 )
2021-07-27 18:55:55 -04:00
Franck Nijhof
d4c4263730
Adjust typing of _attr_extra_state_attributes ( #53529 )
2021-07-27 01:25:22 +02:00
Franck Nijhof
0b44265232
Add description classes to entity components ( #53521 )
...
* Add description classes to entity components
* An -> A
* Add StateVacuumEntityDescription
2021-07-27 00:22:21 +02:00
Franck Nijhof
ee452d415d
Add SensorEntityDescription class ( #53357 )
2021-07-26 22:00:43 +02:00
Marc Mueller
46c3495ae0
Update pylint to 2.9.5 ( #53496 )
2021-07-26 16:17:15 +02:00
Aaron Bach
0fd88e7e66
Type _attr_extra_state_attributes as a MutableMapping ( #52616 )
...
* Type extra_state_attributes as a MutableMapping
* Update homeassistant/helpers/entity.py
Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
* Update homeassistant/helpers/entity.py
Co-authored-by: Ruslan Sayfutdinov <ruslan@sayfutdinov.com>
2021-07-20 15:41:03 -06:00
Marc Mueller
a56485a8c5
Revert new unit types ( #53226 )
2021-07-20 14:13:51 +02:00
Marc Mueller
f6b162bc39
Add pylint CodeStyle extension ( #53147 )
2021-07-19 06:57:06 -07:00
Ville Skyttä
470f2dd73f
Upgrade pyupgrade to 2.21.2, apply its changes ( #52987 )
2021-07-19 10:46:09 +02:00
Marc Mueller
71a8ae3016
Add new unit types for better type checking ( #53124 )
...
* Add new unit types
* Update helper functions
* Update components
* Update lcn climate
2021-07-18 14:43:47 +02:00
Daniel Hjelseth Høyer
fbad453c89
Pylint 2.9.3 ( #52972 )
...
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-07-14 21:44:57 -07:00
Erik Montnemery
3408912ded
Improve docstring for async_get_device_class_lookup ( #52921 )
2021-07-13 10:55:18 +02:00
Marc Mueller
5d2e5d2612
Import Protocol from typing ( #52848 )
2021-07-12 10:35:17 +02:00
Erik Montnemery
1cc8280959
Enable basic type checking for the homeassistant component ( #52464 )
...
* Enable basic type checking for the homeassistant component
* Tweak
2021-07-05 11:26:31 +02:00
Erik Montnemery
14dd6478d1
Enable basic type checking for trace ( #52468 )
2021-07-03 17:52:31 +02:00
Shay Levy
ab73ce00a0
Change "Not adding entity" log level to debug ( #52240 )
2021-06-28 11:22:10 +02:00
Raman Gupta
bef8be9256
Support dynamic schema validation in device conditions and actions ( #52007 )
...
* Allow integrations to provide dynamic schema validation in device conditions and actions
* Add tests
* re-add type
* mypy
2021-06-28 09:23:46 +02:00
Erik Montnemery
b916247e8e
Improve editing of device automation referring non added select entity ( #52047 )
...
* Improve editing of device automation referring non added select entity
* Update tests
2021-06-21 14:49:51 +02:00
Erik Montnemery
4c9f12b9c5
Correct trace path for trigger with custom id ( #51847 )
2021-06-14 17:09:20 +02:00
Eduard van Valkenburg
779ef3c8e1
Add timedelta option for async_call_later ( #50164 )
2021-06-12 13:14:35 +02:00
Erik Montnemery
b01b33c304
Add trigger condition ( #51710 )
...
* Add trigger condition
* Tweaks, add tests
2021-06-11 15:05:57 +02:00
Erik Montnemery
ba6b527d61
Improve editing of device actions referencing non-added HVAC ( #51706 )
...
* Improve editing of device actions referencing non-added HVAC
* Improve test coverage
2021-06-11 11:13:55 +02:00
Erik Montnemery
49bec86dae
Add base schema for triggers ( #51727 )
...
* Add base schema for triggers
* Tweak
* Make TRIGGER_BASE_SCHEMA a voluptuous schema
* Make state trigger BASE_SCHEMA a voluptuous schema
2021-06-11 09:51:12 +02:00
Erik Montnemery
a1e3283f8f
Improve editing of device automations referencing non-added sensors ( #51312 )
2021-06-08 23:28:08 -07:00
Franck Nijhof
4c51299dcc
Add easy converting string timestamps/dates to datetime objects in templates ( #51576 )
2021-06-07 15:02:15 +02:00
Franck Nijhof
f35929ba63
Allow referencing sensor entities for before/after in time conditions ( #51444 )
...
* Allow referencing sensor entities for before/after in time conditions
* Fix typo in variable naming
* Improve test coverage
2021-06-07 14:50:31 +02:00