1
mirror of https://github.com/home-assistant/core synced 2024-09-12 15:16:21 +02:00
Commit Graph

40 Commits

Author SHA1 Message Date
Marc Mueller
b3f997156a
Enable strict typing for counter (#106906) 2024-01-03 09:06:26 +01:00
G Johansson
72c02d4d63
Remove counter configure service (#103204)
* Remove counter configure service after deprecation

* reproduce state
2023-11-04 16:17:51 +01:00
Marc Mueller
77f38e33e5
Import names from typing instead of typing_extensions [3.11] (#97065) 2023-07-22 17:03:44 -05:00
Franck Nijhof
ed16fffa79
Bump breaking version for YAML features ADR-0021 (#95525) 2023-06-29 11:59:36 +02:00
Franck Nijhof
7537667e53
Adjust counter to not restore configuration parameters (#93344) 2023-05-22 15:27:44 +02:00
Franck Nijhof
f2899a19c1
Deprecate counter.configure service (#93343) 2023-05-22 15:27:33 +02:00
Franck Nijhof
97cac66195
Add counter.set_value service (#92863) 2023-05-10 18:52:10 +02:00
Erik Montnemery
8f8a398631
Support marking an assist pipeline as preferred (#91418)
* Support marking an assist pipeline as preferred

* Adjust

* Revert unneeded change

* Send preferred pipeline id in pipeline list

* Don't use property functions for the preferred pipeline
2023-04-15 10:05:46 -04:00
Erik Montnemery
59a02cd08c
Allow storing other items than untyped dict in StorageCollection (#90932)
Allow storing other items than untyped dict in StorageCollection
2023-04-06 10:57:00 -04:00
Erik Montnemery
fa308d8e10
Drop unused logger argument for StorageCollection() (#90913) 2023-04-06 13:28:34 +02:00
Marc Mueller
f7b39aa4a8
Add Self typing (3) [mypy 1.0] (#87600) 2023-02-06 22:30:07 -06:00
epenet
996bcbdac6
Make EntityComponent generic (#78473) 2022-09-14 14:16:23 -04:00
Erik Montnemery
47da1c456b
Don't allow partial update of counter settings (#78371) 2022-09-13 14:55:06 -04:00
Erik Montnemery
b0d033ef29
Add mixin class CollectionEntity for the collection helper (#77703)
* Add mixin class CollectionEntity for the collection helper

* Improve typing

* Address review comments

* Fix tests
2022-09-03 12:56:49 +02:00
epenet
a46c25d2c8
Use _attr_should_poll in components [a-g] (#77268) 2022-08-26 10:15:33 +02:00
Marc Mueller
887d04be60
Use assignment expressions 32 (#58716) 2021-10-30 16:30:13 +02:00
Shay Levy
cf228e3fe5
Add constructor return type in integrations A-D (#50903) 2021-05-20 18:51:39 +03:00
Franck Nijhof
855b68faa1
Remove HomeAssistantType alias from entity components - Part 1 (#48467) 2021-03-29 13:24:36 -10:00
Erik Montnemery
346a724ac3
Mark base components' state_attribute @final, rename others to extra_state_attributes (#48161)
* Mark base state_attributes @final, rename others to extra_state_attributes

* Fix calendar, update tests
2021-03-21 10:38:24 +01:00
Marc Mueller
7c0734bdd5
Update typing 05 (#48038) 2021-03-17 23:43:55 +01:00
Franck Nijhof
dd8d4471ec
Postponed evaluation of annotations for integrations (#46455) 2021-02-12 18:54:00 +01:00
Paulus Schoutsen
9e07910ab0
Mark entities as unavailable when they are removed but are still registered (#45528)
* Mark entities as unavailable when they are removed but are still registered

* Add sync_entity_lifecycle to collection helper

* Remove debug print

* Lint

* Fix tests

* Fix tests

* Update zha

* Update zone

* Fix tests

* Update hyperion

* Update rfxtrx

* Fix tests

* Pass force_remove=True from integrations

Co-authored-by: Erik <erik@montnemery.com>
2021-02-08 10:45:46 +01:00
Alexei Chetroi
0670b4f457
Use collection helpers for counter integration (#32295)
* Refactor counter to use config dict.

* Use collection helpers for counter integration.

* Update tests.

* Use callbacks were applicable.
2020-02-28 14:06:39 -08:00
Phil Bruckner
d6e230e66b Fix counter with empty config (#30454) 2020-01-04 00:03:54 +01:00
Bas Nijholt
38657c0055 Sort imports according to PEP8 for counter (#29692) 2019-12-09 11:47:35 +01: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
Santobert
92508af253 Counter configure with value (#28066) 2019-10-21 15:01:35 -07:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Aaron Bach
b71cb73c80
Add area support to counter service schemas (#25401)
* Add area support to counter service schemas

* Updates
2019-07-23 11:08:32 -06:00
Rohan Kapoor
f588fef3b4
Add minimum/maximum to counter (#22608)
* Added minimum/maximum to counter

* Added min/max testcases

* remove duplicate

* cosmetic changes

* removed blank lines at eof

* added newline at eof

* type cv -> vol

* more fixes

* - fixed min/max warnings
- fixed failing tests

* Added linewrap

* - Added cast to int
- Fixed double quotes

* - removed None check in __init__
- fixed failing test

* copy paste fix

* copy paste fix

* Added possibility to change counter properties trough service call

* fixed copy paste errors

* Added '.' to comment

* rephrased docstring

* Fix tests after rebase

* Clean up per previous code review comments

* Replace setup service with configure

* Update services description

* Update tests to use configure instead of setup
2019-04-18 19:02:01 +09:00
Fabian Affolter
127c55e0c1
Update file header (#21023)
* Update file header

* Update file header

* Update file header

* Update file header

* Update file header

* Fix lint issues
2019-02-13 21:21:14 +01: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
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
Adam Mills
5c3a4e3d10 Restore states through a JSON store instead of recorder (#17270)
* Restore states through a JSON store

* Accept entity_id directly in restore state helper

* Keep states stored between runs for a limited time

* Remove warning
2018-11-28 13:16:43 +01:00
mvn23
aeb21596a0 Fix counter restore. (#17101)
Add config option to disable restore (always use initial value on restart).
Add unit tests for restore config option.
2018-10-03 23:12:21 +02:00
cdce8p
fa98a27df7 Remove service helper (2) (#16863)
* alarm_control_panel

* automation

* camera

* climate

* counter

* fan

* Add legacy notes

* Fix tests
2018-09-26 09:49:55 +02:00
Paulus Schoutsen
b682e48e12
Entity service (#15991)
* Add entity service helper

* Use entity service helper

* Context
2018-08-16 09:50:11 +02:00
Fabian Affolter
3b8ee196be
Update syntax (#14742) 2018-06-01 19:41:20 +02:00
Anders Melchiorsen
8267a21bfe Lazy loading of service descriptions (#11479)
* Lazy loading of service descriptions

* Fix tests

* Load YAML in executor

* Return a copy of available services to allow mutations

* Remove lint

* Add zha/services.yaml

* Only cache descriptions for known services

* Remove lint

* Remove description loading during service registration

* Remove description parameter from async_register

* Test async_get_all_descriptions

* Remove lint

* Fix typos from multi-edit

* Remove unused arguments

* Remove unused import os

* Remove unused import os, part 2

* Remove unneeded coroutine decorator

* Only use executor for loading files

* Cleanups suggested in review

* Increase test coverage

* Fix races in existing tests
2018-01-07 14:54:16 -08:00
Fabian Affolter
a5d5f3f727
Move counter component (#10332)
* Fix docstring

* Add comment

* Move counter to folder

* Fix missing parts

* Commit it when file is saved
2017-11-05 13:51:52 +01:00