Commit Graph

1331 Commits (d90d804260b93dece10ba75258b1534c82f10141)

Author SHA1 Message Date
Erik Montnemery bdbedd0f06
Alphabetize parts of device registry code () 2021-10-12 12:08:59 +02:00
Erik Montnemery 7acb1b6eb9
Override the jinja2 int filter () 2021-10-12 00:12:42 +02:00
Franck Nijhof 13db867c1d
Move attribution attribute to Entity base class () 2021-10-11 23:15:32 +02:00
Erik Montnemery 6954614e62
Warn if total_increasing sensor has negative states () 2021-09-30 07:49:16 -07:00
Erik Montnemery ef13e473cf
Warn if template functions fail and no default is specified ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-09-29 20:16:02 +02:00
Marc Mueller 77ee72cbb9
Import Callable from collections.abc (1) () 2021-09-29 16:32:11 +02:00
Erik Montnemery 14a1bb423c
Add is_number template filter and function () 2021-09-27 10:47:57 +02:00
J. Nick Koston f268227d64
Implement retry and backoff strategy for requirements install ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-09-26 14:47:03 -05:00
J. Nick Koston f74291ccb6
Expose the ability to move an entity/device between config entries () 2021-09-26 09:50:57 -07:00
Ville Skyttä d8d34fdd3b
Prefer HTTPStatus over int in HA view JSON functions ()
* Prefer HTTPStatus over int in HA view JSON functions

* Update zwave tests to not expect a fixed typo
2021-09-22 21:59:52 +03:00
Marc Mueller 7af67d34cf
Use assignment expressions 01 () 2021-09-18 13:31:35 -10:00
Marc Mueller 48bada5a18
Update pylint to 2.11.1 () 2021-09-18 13:52:59 +02:00
J. Nick Koston eb98ac9415
Allow IntegrationNotFound when checking config in safe mode ()
Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
2021-09-17 22:25:50 -07:00
Paulus Schoutsen 8a611eb640
Fix singleton not working with falsey values () 2021-09-11 12:02:01 -07:00
Erik Montnemery 232943c93d
Add significant change support to AQI type sensors () 2021-09-08 12:47:48 -07:00
Ruslan Sayfutdinov 7195b8222b
Bump PyJWT to 2.1.0 () 2021-09-07 20:59:02 -07:00
Chris Browet 5a2bcd2763
ADD: generalize regex_findall () 2021-09-05 12:41:39 +02:00
Ville Skyttä b10fc89a6b
Automation trigger info type hint improvements ()
* 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 () 2021-08-31 14:56:47 +02:00
Raman Gupta 1d1b5ab345
Fix area_id and area_name template functions () 2021-08-30 13:09:41 -07:00
J. Nick Koston 43288d3e1f
Prevent storage loads from monopolizing the executor pool ()
* Prevent storage loads from monopolizing the executor pool

- At startup there is an increasing demand to load data
  from storage. Similar to  and , 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 ()
* 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 ()
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 () 2021-08-25 13:00:11 +02:00
Franck Nijhof 243c52e210
Add missing BYN currency () 2021-08-21 19:14:48 -07:00
Ville Skyttä 59809503d1
Various type hint related improvements ()
* 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 ()
* 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 () 2021-08-21 10:20:09 +03:00
Raman Gupta 036e99e91e
Allow integrations to define trigger platforms with a subtype () 2021-08-19 21:43:04 -07:00
Paulus Schoutsen f1a4ba8bb0
Add Rainforest Eagle tests and price () 2021-08-19 13:19:31 -07:00
Paulus Schoutsen 4ae2a26aa3
Add config flow to Rainforest EAGLE-200 ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-19 09:22:30 -07:00
Ville Skyttä 848c0be58a
Avoid some implicit generic Anys () 2021-08-16 23:12:06 +02:00
Erik Montnemery 4e07ab1b32
Move temperature conversions to sensor base class (1/8) ()
* 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 () 2021-08-10 00:38:56 +02:00
Paulus Schoutsen 952d11cb03
Ensure internal/external URL have no path ()
* 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 ()
* Update nest static types from aditional PR feedback

Update nest and device helper static types based on post-merge discussion in PR 

* 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 () 2021-08-06 06:41:50 +02:00
Joakim Sørensen 3f2e18fe17
Add user to homeassistant system health () 2021-08-03 11:58:27 +02:00
Robert Svensson c6213b36ad
Only disable a device if all associated config entries are disabled () 2021-07-29 12:08:53 -07:00
Franck Nijhof 1968b95829
Add currency core configuration ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-07-28 08:55:58 +02:00
Raman Gupta 73bc0267e9
Add DeviceRegistry template functions () 2021-07-27 18:55:55 -04:00
Franck Nijhof d4c4263730
Adjust typing of _attr_extra_state_attributes () 2021-07-27 01:25:22 +02:00
Franck Nijhof 0b44265232
Add description classes to entity components ()
* Add description classes to entity components

* An -> A

* Add StateVacuumEntityDescription
2021-07-27 00:22:21 +02:00
Franck Nijhof ee452d415d
Add SensorEntityDescription class () 2021-07-26 22:00:43 +02:00
Marc Mueller 46c3495ae0
Update pylint to 2.9.5 () 2021-07-26 16:17:15 +02:00
Aaron Bach 0fd88e7e66
Type _attr_extra_state_attributes as a MutableMapping ()
* 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 () 2021-07-20 14:13:51 +02:00
Marc Mueller f6b162bc39
Add pylint CodeStyle extension () 2021-07-19 06:57:06 -07:00
Ville Skyttä 470f2dd73f
Upgrade pyupgrade to 2.21.2, apply its changes () 2021-07-19 10:46:09 +02:00
Marc Mueller 71a8ae3016
Add new unit types for better type checking ()
* Add new unit types
* Update helper functions
* Update components
* Update lcn climate
2021-07-18 14:43:47 +02:00