Marc Mueller
ea4e2ab4aa
Add Self typing (4) [mypy 1.0] ( #87601 )
2023-02-06 22:30:22 -06:00
epenet
996bcbdac6
Make EntityComponent generic ( #78473 )
2022-09-14 14:16:23 -04:00
Erik Montnemery
4898a41dcf
Don't allow partial update of timer settings ( #78378 )
2022-09-13 14:58:12 -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
Philip Allgaier
da55c48cce
Prevent issues with config update of "Timer" integration (unknown "restore" key) ( #69332 )
2022-04-05 22:22:03 +03:00
Philip Allgaier
398db35334
Prevent issues with setting up "Timer" integration (unknown "restore" key) ( #68936 )
...
* Prevent issues with setting up "Timer" for existing entities
* Use default constant
* Update homeassistant/components/timer/__init__.py
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-03-31 10:57:52 -04:00
Raman Gupta
df4ddc6491
Allow timer state to be restored on restart ( #67658 )
2022-03-29 23:04:46 -07:00
Raman Gupta
2791cd68c2
Timer code cleanup ( #67604 )
2022-03-09 10:42:07 +01:00
Marc Mueller
565a9fea6b
Import Callable from collections.abc (2) ( #56776 )
2021-09-29 14:06:51 +02:00
Marc Mueller
48bada5a18
Update pylint to 2.11.1 ( #56364 )
2021-09-18 13:52:59 +02:00
jan iversen
9078824556
Activate mypy for timer ( #55058 )
2021-08-23 20:22:55 +02:00
Michael
9eecd90afc
Add constructor return type in integrations T-Z ( #50899 )
2021-05-20 17:00:19 +02:00
Franck Nijhof
1b5596b4c2
Remove ServiceCallType alias from codebase ( #49844 )
2021-05-02 00:15:27 +02:00
jan iversen
2e084f260e
Rename HomeAssistantType —> HomeAssistant, integrations s* - t* ( #49550 )
2021-04-22 16:21:38 +02:00
youknowjack0
9d085778c2
Fix timer.finish to cancel callback ( #48549 )
...
Timer.finish doesn't cancel the callback, which can lead to incorrect early cancellation of the timer if it is subsequently restarted.
Bug reported here: https://community.home-assistant.io/t/timer-component-timer-stops-before-time-is-up/96038
2021-04-01 09:32:59 -07: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
b67b9b94f9
Update typing 13 ( #48077 )
2021-03-18 14:43:52 +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
Bram Kragten
4b01ab616a
Timer make attribute format always h:mm:ss ( #38292 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-09-07 19:12:52 +02:00
Marijn Pool
c11b88b4c2
Remove remaining and add finishes_at attributes from timer ( #37519 )
2020-09-07 18:08:46 +02:00
akasma74
83cc871edf
Add force_update to timer integration ( #31646 )
...
* force_update added
As per this discussion we need to update last_changed when active timer restarted.
One way to do that is to force HA update the state on each request even if it remains the same.
More details here - https://github.com/home-assistant/architecture/issues/345
* add test for force_update
make sure state_change event fired every time timer (re)started
* remove whitespaces
* remove whitespace
* Update tests/components/timer/test_init.py
Co-Authored-By: Alexei Chetroi <lexoid@gmail.com>
* fix lint
* fix isort
Co-authored-by: Alexei Chetroi <lexoid@gmail.com>
2020-04-02 23:48:41 -07:00
Paulus Schoutsen
0a25e86fab
Use callback instead of async methods in Timer ( #32638 )
2020-03-10 08:01:52 -04:00
Alexei Chetroi
8a78b65f0d
Extract collection entity registry cleaner into a helper ( #30844 )
...
* Extract entity_registry_keeper into separate helper
* Refactor input_*, timer and person to use new helper.
* Make Mypy happy.
* Better name.
2020-01-17 11:41:46 -05:00
Alexei Chetroi
5fa7d6f22a
Allow input_* and timer component setup without config ( #30772 )
...
* Allow input_boolean setup without config.
* Allow input_number setup without config.
* Allow input_select setup without config.
* Allow input_text setup without config.
* Allow timer setup without config.
2020-01-14 22:15:59 -05:00
Alexei Chetroi
0a7feba855
Use storage based collections for Timer platform ( #30765 )
...
* Use config dict for timer entity.
* Manage timer entities using collection helpers.
* Add tests.
* Make Timer duration JSON serializable.
2020-01-14 15:32:48 -08:00
inputd
4dc39492a5
Drop timer component microseconds ( #30198 )
...
* Update __init__.py
2020-01-11 22:55:28 -05:00
Markus Nigbur
453f7c7294
Fire restarted event on restarting active timer ( #30475 )
...
* Fire restarted event on restarting active timer
* Added test for the restart event
2020-01-07 00:00:23 +01:00
Phil Bruckner
e233dd7cbe
Fix timer with empty config ( #30463 )
2020-01-04 23:01:58 +01:00
Alexei Chetroi
41bef4b919
Add timer reload service. ( #30015 )
2019-12-18 21:15:11 +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
Ville Skyttä
99c7608fb4
Lint config cleanups ( #28864 )
...
* Remove bunch of unneeded lint exclusions
* Use symbolic names instead of identifiers in pylint disables
* Tighten scope of some pylint disables
2019-11-25 22:40:08 -08:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Aaron Bach
df51c07a88
Add area support to timer service schemas ( #25440 )
...
* Add area support to timer service schemas
* Base
* Remove unnecessary TIMER_SERVICE_SCHEMA
2019-07-24 08:26:25 +02: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
rbflurry
f1a00cc0f9
Allow target all timer services using 'entity_id: all' ( #21008 )
2019-02-12 23:18:45 +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
Robbert Müller
9928b977fd
Added events STARTED, RESTARTED AND PAUSED ( #19516 )
...
Rewrote the tests a bit
the 'wait for the timer to finish' part of the test is now it's own test.
The rest is a sequence of fire/assert. Which i rewrote to a loop to
reduce the amount of duplicate code
2018-12-29 16:40:17 +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
cdce8p
dd45e99302
Remove service helper (4) ( #16892 )
...
* Update media_player
* Update lock
* Update notify
* Update remote
* Update scene
* Update vacuum
* Remove timer helpers
* Removed unused legacy helpers
2018-09-26 18:02:05 +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
Otto Winter
a4bf421044
Convert more files to async/await syntax ( #14142 )
...
* Move more files to async/await syntax
* Attempt Work around pylint bug
Using lazytox :P
2018-04-28 19:26:20 -04: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
Julio Guerra
c20324793e
timer: include the remaining time in the state attributes ( #11510 )
...
Add the amount of remaining time before a timer is finished in its state attributes, so that it is received when fetching a timer state.
In my particular case, it allows me to correctly implement a UI for a timer when it is paused and when the UI didn't received the pause state change (which happens when the UI is started after the pause). In this case, it is impossible to show the remaining amount of time before the timer ends.
2018-01-07 13:37:19 -08:00
Pascal Vizeli
0f7a4b1d6f
Move timer into correct folder ( #10324 )
...
* Move timer into correct folder
* Rename tests/components/test_timer.py to tests/components/timer/test_timer.py
* create init for test component
* Fix services.yaml loading
2017-11-03 21:10:08 -07:00