Commit Graph

49 Commits (1b4254d1df0a82ec0bbf752b3d348453ee274c2b)

Author SHA1 Message Date
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
HomeAssistant Azure 5ce62c8446 [ci skip] Translation update 2020-09-02 00:03:29 +00:00
HomeAssistant Azure 195d4b6897 [ci skip] Translation update 2020-08-27 00:04:55 +00:00
HomeAssistant Azure 9586e9ebef [ci skip] Translation update 2020-05-15 00:02:56 +00:00
Paulus Schoutsen 0efeefe3b2 Update translations 2020-05-13 11:27:21 -07:00
HomeAssistant Azure bd72ddda3c [ci skip] Translation update 2020-05-01 00:02:55 +00:00
HomeAssistant Azure 5d37eb8eeb [ci skip] Translation update 2020-04-30 00:03:17 +00:00
HomeAssistant Azure 7faba60e83 [ci skip] Translation update 2020-04-29 00:03:31 +00:00
HomeAssistant Azure aa2bfbb541 [ci skip] Translation update 2020-04-27 00:02:20 +00:00
HomeAssistant Azure 5f775c1427 [ci skip] Translation update 2020-04-25 00:08:30 +00:00
HomeAssistant Azure da87ec8499 [ci skip] Translation update 2020-04-23 00:05:07 +00:00
HomeAssistant Azure 46920e9be6 [ci skip] Translation update 2020-04-22 00:03:20 +00:00
Joakim Sørensen 730a257f3c
Rename translations dir for integrations (#34494) 2020-04-21 16:11:05 -07:00
Franck Nijhof bc5a2da7b7
Add transition support to scenes, cleanup blocking parameter (#34434) 2020-04-20 18:07:50 -07:00
Paulus Schoutsen 95357dfc55 Update translations 2020-04-20 16:33:54 -07:00
Paulus Schoutsen d560e8245a
Import state strings (#34451) 2020-04-20 16:25:35 -07:00
Franck Nijhof 24840b54ac
Add yamllint (in pre-commit and CI) (#33676)
* Add yamllint (in pre-commit and CI)

* Fix linting for all YAML files

* Bump and add it to requirements

* Fix gen_requirements for pre-commit, remove 'v' from version
2020-04-05 10:33:45 +02:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07: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
Franck Nijhof bfa0edaf92 Migrate Integration Quality Scale from docs to manifest: internal (#30551) 2020-01-07 20:58:49 +01: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
Santobert 50e9a9df4f Timer reproduce state (#28117) 2019-10-22 23:12:17 -07:00
Franck Nijhof c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07: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
Paulus Schoutsen cfe4cf30ad
Add manifests (#22699)
* Add manifests

* Update auto name

* Update codeowners

* Add requirements from platforms

* Minor cleanup

* Incorporate changes from awarecan PR
2019-04-03 21:14:45 -07: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
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
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
Daniel Perna 890c11cc7c WIP: Timer component (#9889)
* Added timer component

* Reworked functionality a bit

* Fixed requested change

* Fixed state updates when finished

* Removing expired listeners, added events, changed services

* Added finish service

* Using timedelta parameters in start-service

* Cleanup

* Lint

* Updating state for remaining time

* Removed duration from cancel method

* Renamed service to fix disabled lint

* Some tests (incomplete)

* Relocated service descriptions

* Addressed requested changes

* Adjusted tests, added methods and events

* Added test for finish service, lint

* Code cleanp, using string states

* tzzz... one char...

* Proper usage of restore_state

* Some more cleanup
2017-10-31 20:20:56 -07:00