Commit graph

84 commits

Author SHA1 Message Date
Erik Montnemery
45fb21e32d
Suppress update entity's update_percentage when update not in progress (#129397) 2024-10-29 17:56:09 +01:00
Erik Montnemery
bd55fe868d
Allow update entities to report progress as a float (#128930)
* Allow update entities to report progress as a float

* Add test

* Update snapshots

* Update recorder test

* Use _attr_* in MockUpdateEntity
2024-10-24 21:20:18 +02:00
Erik Montnemery
23b43319a8
Add update_percentage property to update entity (#128908) 2024-10-21 19:49:50 +02:00
Erik Montnemery
e861cab727
Add update_percentage state attribute to update entity (#128877)
* Add update_percentage state attribute to update entity

* Update tests

* Update tests
2024-10-21 15:31:48 +02:00
J. Nick Koston
0f29fd3e10
Switch to using fast cached_property implementation in propcache (#127339) 2024-10-03 13:11:02 -05:00
epenet
2699eb62bd
Rename DOMAIN_DATA HassKey constants to DATA_COMPONENT (#126746)
* Rename DOMAIN_DATA HassKey constant to DATA

* DATA -> DATA_COMPONENT
2024-09-25 15:53:58 +02:00
epenet
94df0bd5ab
Use HassKey in core components (d-z) (#126324)
* Use HassKey in core components (d-s)

* Add

* Undo light

* Undo device_tracker

* Undo notify

* Undo sensor

* Undo stt

* Improve
2024-09-21 13:10:14 +02:00
Simone Chemelli
c94bb6c1db
Add new method version_is_newer to Update platform (#124797)
* Allow string comparing in update platform

* new approach after architecture discussion

* cleanup

* Update homeassistant/components/update/__init__.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update homeassistant/components/update/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* add tests

* Update tests/components/update/test_init.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update tests/components/update/test_init.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Update tests/components/update/test_init.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* update docstrings

* one more docstring

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-09-19 11:00:22 +02:00
Erik Montnemery
38ef216894
Update icons.json to new service schema part 4 (#124771) 2024-08-28 13:48:13 +02:00
Erik Montnemery
5836f8edb5
Pass None instead of empty dict when registering entity services (#123879)
* Pass None instead of empty dict when registering entity services

* Update rainmachine
2024-08-15 10:11:43 +02:00
epenet
f65d91f6d2
Refactor PLATFORM_SCHEMA imports in platforms (#120564) 2024-06-26 15:44:59 +02:00
epenet
960d1289ef
Avoid references to websocket_api.const in core and other components (#119285) 2024-06-10 13:49:44 +02:00
Marc Mueller
816ce116bf
Remove unnecessary functools.cached_property backport (#114239) 2024-04-04 11:24:26 +02:00
Sid
6587ee20db
Enable Ruff TRY300 (#114437)
* Enable Ruff TRY300

* Update validation.py

* Address review comments
2024-03-30 10:37:59 +01:00
Sid
82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
Marc Mueller
062cc4bfce
Add empty line after module docstring [t-v] (#112705) 2024-03-08 10:35:23 -05:00
Franck Nijhof
bb225e4b38
Add update icon translations (#108481)
* Add update icon translations

* Oops
2024-01-20 14:28:07 -05:00
Joakim Sørensen
6da82cf07e
Use supported_features_compat in update.install service (#107224) 2024-01-05 10:38:54 +01:00
J. Nick Koston
4b6aaf6254
Update platform back-compat for custom components without UpdateEntityFeature (#106528) 2023-12-28 14:10:26 -10:00
J. Nick Koston
7a2a99db2e
Use faster contains check in update (#106436) 2023-12-27 08:45:51 +01:00
J. Nick Koston
5156a93b9e
Add support for attribute caching to the update platform (#106261) 2023-12-23 10:29:55 +01:00
Erik Montnemery
104bcc64b7
Allow inheriting base component entity descriptions in frozen dataclasses (#105512)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-15 23:33:50 -10:00
Paul Bottein
eaaca3e556
Add translations for update entity components (#103752)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-11 01:33:02 +01:00
Erik Montnemery
df73850f56
Move definition of attributes excluded from history to entity classes (#100430)
* Move definition of attributes excluded from history to entity classes

* Revert change which should be in a follow-up PR

* Fix sun unrecorded attributes

* Fix input_select unrecorded attributes
2023-09-21 15:02:47 +02:00
Erik Montnemery
d1afcd773f
Revert "Cache entity properties that are never expected to change in the base class" (#100422)
Revert "Cache entity properties that are never expected to change in the base class (#95315)"

This reverts commit 042776ebb8.
2023-09-15 11:25:24 +02:00
J. Nick Koston
042776ebb8
Cache entity properties that are never expected to change in the base class (#95315) 2023-09-14 17:48:48 -05:00
Robert Resch
790523126e
Name unnamed update entities by their device class (#98579) 2023-08-18 13:40:35 +02:00
Franck Nijhof
30058297cf
Migrate backported StrEnum to built-in StrEnum (#97101) 2023-07-23 23:19:24 +02:00
J. Nick Koston
e2394b34bd
Cache version compare in update entity (#96978) 2023-07-21 08:56:34 +02:00
J. Nick Koston
70c88a125c
Reduce attribute lookups in update state_attributes (#96511) 2023-07-17 17:47:36 +02:00
Franck Nijhof
c5cd7e5897
Migrate update services to support translations (#96395)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-07-12 16:59:45 +02:00
Erik Montnemery
86a397720f
Move platform_integration_no_support issue to the homeassistant integration (#95927)
* Move platform_integration_no_support issue to the homeassistant integration

* Update test

* Improve repair text

* Update test
2023-07-07 13:31:54 +02:00
Paulus Schoutsen
149ac4f99e
Capitalize a bunch of translations (#95421) 2023-06-28 11:08:53 +02:00
Erik Montnemery
4085c4f6d8
Tweak typing of Entity.platform (#88321)
* Tweak typing of Entity.platform

* Fix mypy errors

* Fix update test

* Improve comments
2023-06-09 10:56:04 +02:00
G Johansson
c6feb30c31
Raise issue "does not support platform setup" (#93585)
* Raise issue on platform missing

* Modify issue

* Remove deprecation

* Fix strings

* Strings

* Last strings

* strings to common
2023-05-28 21:53:32 +02:00
Franck Nijhof
f9919bb7cf
Add pre-defined entity name translations (#89792) 2023-03-16 21:10:20 +01:00
G Johansson
8c00f435a6
Change name to entity_id update platform error messages (#87960) 2023-02-12 22:18:09 +01:00
Erik Montnemery
cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +01:00
Erik Montnemery
b0b1d8143f
Sort manifests 10 (#87031) 2023-02-08 20:41:50 +01:00
Franck Nijhof
939eef3b28
Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
Shay Levy
857df05308
Add Shelly Gen2 update entity for sleeping devices (#86837) 2023-01-30 19:05:13 +02:00
Franck Nijhof
cf5fca0464
Code styling tweaks to core entity components (#85460) 2023-01-08 13:40:08 -10:00
GitHub Action
1f3e5fb4fc [ci skip] Translation update 2022-12-07 00:24:08 +00:00
Franck Nijhof
91cf2e2792
Remove str from update device class (#83399) 2022-12-06 14:50:19 +01:00
GitHub Action
eaf6d43508 [ci skip] Translation update 2022-11-23 00:26:26 +00:00
epenet
ab26ea06b9
Enforce UpdateEntityFeature (#82465) 2022-11-22 07:16:53 +01:00
epenet
3be750812d
Adjust type hints for UpdateEntityFeature (#82268) 2022-11-17 15:17:50 +01:00
epenet
a91abebea8
Use IntFlag for EntityFeature (#81903) 2022-11-16 12:43:17 +01:00
GitHub Action
eac1a1e513 [ci skip] Translation update 2022-10-11 00:31:56 +00:00
Franck Nijhof
2b27cfdabb
Set system & entity integration types (#79593) 2022-10-04 10:36:42 -04:00