Commit Graph

14 Commits (72cc656b7e116c7cc38bbbae0e4919d60a67451b)

Author SHA1 Message Date
Bram Kragten bbe0f75336
input_datetime guard for unexpected state on restore (#32652)
* input_datetime guard for unexpected state

If state is a time and has_date = true, or the other way around, restore state would error

* Update __init__.py

* Add test
2020-03-10 15:15:11 -07:00
Christian Clauss df7d2b3aeb
Fix typos found by codespell (#31243)
* Fix typos found by codespell

* Fix typos found by codespell

* codespell: Furture  ==> Future

* Update test_config_flow.py

* Update __init__.py

* Spellcheck: successfull  ==> successful

* Codespell: unsuccesful  ==> unsuccessful

* Codespell: cant  ==> can't

* Codespell: firware ==> firmware

* Codespell: mimick  ==> mimic
2020-01-31 08:33:00 -08: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 d9d5e06baf
Use collection helpers for input_datetime component (#30815)
* Refactor input_datetime.
Keep the state as datetime, but format accordingly to has_time and
has_date.

* Use config dict for input_datetime.
* Add tests.
* Lint
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-01-16 09:16:57 -05:00
Paulus Schoutsen 5fdc60e067
Add Safe Mode (#30723)
* Store last working HTTP settings

* Add safe mode

* Fix tests

* Add cloud to safe mode

* Update logging text

* Fix camera tests leaving files behind

* Make emulated_hue tests not leave files behind

* Make logbook tests not leave files behind

* Make tts tests not leave files behind

* Make image_processing tests not leave files behind

* Make manual_mqtt tests not leave files behind
2020-01-14 13:03:02 -08:00
Franck Nijhof 52ed9608e2 Migrate input_* tests from coroutine to async/await (#30336) 2020-01-01 01:22:44 +01:00
Alexei Chetroi 256056430e Add input_datetime reload service. (#29581)
* Add input_datetime reload service.

* Add reload service test.
2019-12-07 21:24:56 +01:00
Santobert 0996b717ce Improve coverage of input_datetime/reproduce_state (#28272)
* Improve coverage of input_datetime/reproduce_state

* Improve tests
2019-11-16 13:27:54 +01:00
Santobert 703cd96186 Add improved scene support to the input_datetime integration (#28105)
* input_datetime reproduce state

* simplify service decision
2019-10-22 23:03:38 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Aaron Bach c92f287c73
Add area support to input datetime service schemas (#25430)
* Add area support to input datetime service schemas

* Fixed tests
2019-07-23 13:39:07 -06:00
Phil Bruckner 1431fd6fbd Add datetime option to input_datetime.set_datetime service (#24975) 2019-07-08 13:18:42 -07:00
Tsvi Mostovicz eac2388d49 Set default value for input_datetime (#21919)
* Set default value for input_datetime

If no initial value is set and no value is available to be restored, set the default value as specified in the docs to 1970-01-01 00:00.

* Use regular if statement

Ternary statements can be tricky if you try to keep the value the same if not something

* Add test for default values

Check that if no initial value is set, state returns 1970-01-01 at 00:00

* Fix tests - was passing wrong args to time/date

* Verify we get a timestamp attribute for input_datetime

This adds a check that when using the default timestamp of 1970-1-1 00:00:00, we
get a timestamp attribute. This is waht prompted this PR in the first place, as
when specifying an automation trying to access the timestamp attribute for a non-
initialized input_datetime HASS wouldn't start.

* Simplify the change for a default value

Based on @balloob comment. Simplifying the code

* Revert "Simplify the change for a default value"

This reverts commit c2d67f19a6.
2019-04-18 21:00:35 -07:00
Paulus Schoutsen b8cc547fa3
Move components to folders (#20774)
* Move all components into folders

* Move component tests into folders

* Fix init moving

* Move tests

* Lint

* Update coverage

* Fix service descriptions

* Update CODEOWNERS
2019-02-05 19:31:15 -08:00