Commit Graph

15 Commits (c9c41260b22d4dedd09e5c4a6d1b3712a0019e2b)

Author SHA1 Message Date
Tsvi Mostovicz d7a66e6e4c Return Jewish Calendar holiday type id support (#29168)
* Bring back holiday type id as a attribute to the holiday sensor

* Add test for holiday type id attribute
2019-11-27 20:52:03 +01:00
Tsvi Mostovicz 674860e00e Fix hdate spamming homeassistant log (#28392)
* Fix hdate spamming homeassistant log

* Lower verbosity of another spammy message
2019-10-31 11:16:27 -07:00
Tsvi Mostovicz 2bc6b59e79 Move holiday info into a single sensor with multiple attributess (#27654)
* Move holiday onfo into a single sensor with multiple attributess

* Add tests for holiday attributes
2019-10-17 20:32:24 -07:00
Tsvi Mostovicz 9e3005133a Standardize times in time sensors Jewish calendar (#26940)
* Standardize times in time sensors Jewish calendar

* Fix pylint errors

* Add non-default time format test

* Make black happy

* Remove timestamp device class

Timestamp device class requires ISO 8601 format

* Revert "Remove timestamp device class"

This reverts commit 8a2fda39831bc750c3a77aa774b84b054d78032c.

* Remove time_format

As this is part of the UI decision, it should be decided by lovelace.

A nice addition for a future PR, might be the option to hint to lovelace the preferred way to display some data.

* Update name of state_attributes

* State of timestamp variable to be shown in UTC

Although I don't understand it, I give up :)

* Remove unnecessary attributes

I don't really see the value in these attributes, if there are any they should be implemented in
the sensor component for the timestamp device class
2019-10-10 20:57:48 +02:00
Franck Nijhof c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
Tsvi Mostovicz 815e7a70e9 Jewish calendar binary sensor (#26200)
* Move jewish calendar to its own platform

* Fix tests for Jewish Calendar platform

As part of this, move tests to use async_setup_component instead of
testing JewishCalendarSensor as suggested by @MartinHjelmare here:

https://github.com/home-assistant/home-assistant/pull/24958#pullrequestreview-259394226

* Get sensors to update during test

* Use hass.config.set_time_zone instead of directly calling set_default_time_zone in tests

* Cleanup log messages

* Rename result from weekly_portion to parshat_hashavua

* Fix english/hebrew tests

* Fix updating of issue melacha binary sensor

* Fix docstrings of binary sensor

* Reset timezones before and after each test

* Use correct entity_id for day of the omer tests

* Fix omer tests

* Cleanup and rearrange tests

* Remove the old issur_melacha_in_effect sensor

* Rename variables to make the code clearer

Instead of using lagging_date, use after_tzais and after_shkia

* Use dt_util.set_default_time_zone instead of hass.config.set_time_zone so as not to break other tests

* Remove should_poll set to false (accidental copy/paste)

* Remove _LOGGER messaging during init and impossible cases

* Move binary tests to standalone test functions

Move sensor tests to standalone test functions

* Collect entities before calling add_entities

* Fix pylint errors

* Simplify logic in binary sensor until a future a PR adds more sensors

* Rename test_id holyness to holiday_type

* Fix time zone for binary sensor tests

Fix time zone for sensor tests

* Don't use unnecessary alter_time in sensors

Don't use unnecessary alter time in binary sensor

Remove unused alter_time

* Simply set hass.config.time_zone instead of murking around with global values

* Use async_fire_time_changed instead of directly calling async_update_entity

* Removing debug messaging during init of integration

* Capitalize constants

* Collect all Entities before calling async_add_entities

* Revert "Don't use unnecessary alter_time in sensors"

This reverts commit 74371740eaeb6e73c1a374725b05207071648ee1.

* Use test time instead of utc_now

* Remove superfluous testing

* Fix triggering of time changed

* Fix failing tests due to side-effects

* Use dt_util.as_utc instead of reimplementing it's functionality

* Use dict[key] for default values

* Move 3rd party imports to the top of the module

* Fix imports
2019-09-06 13:24:10 +02:00
Franck Nijhof f9edec19ad Use literal string interpolation in integrations H-J (f-strings) (#26380) 2019-09-03 17:27:14 +02:00
Tsvi Mostovicz 54d6acf87a Bump hdate==0.9.0 (use pytz instead of dateutil) (#25726)
Use new hdate version of library which uses pytz for timezones.
dateutil expects /usr/share/timezone files, as these are not available
in the docker image and in HASSIO, the timezone offsets are broken.

This should fix
 - #23032
 - #18731
2019-08-06 11:03:52 -05:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
arigilder f3e542542a Add missing support for jewish_calendar.omer_count sensor (#24958)
* Add missing support for omer_count to jewish_calendar

* Add tests for omer sensor

* Add tests for omer after tzeit hakochavim

* Lint fixes
2019-07-09 11:58:57 +02:00
Tsvi Mostovicz b0dc782c98 Upgrade hdate==0.8.8 (#25008)
This should fix incosistencies between issur_melacha_in_effect sensor and candle_lighting time.

Probably fixes #24479 and #23852
2019-07-07 17:32:54 +02:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07: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
Tobias Sauerwein 048b100eea Clean up docstrings (#22679)
* Clean up docstrings

* Fix long lines

* Fix more docstrings

* Fix more docstrings

* Fix more docstrings
2019-04-03 17:40:03 +02:00
Penny Wood f195ecca4b Consolidate all platforms that have tests (#22109)
* Moved climate components with tests into platform dirs.

* Updated tests from climate component.

* Moved binary_sensor components with tests into platform dirs.

* Updated tests from binary_sensor component.

* Moved calendar components with tests into platform dirs.

* Updated tests from calendar component.

* Moved camera components with tests into platform dirs.

* Updated tests from camera component.

* Moved cover components with tests into platform dirs.

* Updated tests from cover component.

* Moved device_tracker components with tests into platform dirs.

* Updated tests from device_tracker component.

* Moved fan components with tests into platform dirs.

* Updated tests from fan component.

* Moved geo_location components with tests into platform dirs.

* Updated tests from geo_location component.

* Moved image_processing components with tests into platform dirs.

* Updated tests from image_processing component.

* Moved light components with tests into platform dirs.

* Updated tests from light component.

* Moved lock components with tests into platform dirs.

* Moved media_player components with tests into platform dirs.

* Updated tests from media_player component.

* Moved scene components with tests into platform dirs.

* Moved sensor components with tests into platform dirs.

* Updated tests from sensor component.

* Moved switch components with tests into platform dirs.

* Updated tests from sensor component.

* Moved vacuum components with tests into platform dirs.

* Updated tests from vacuum component.

* Moved weather components with tests into platform dirs.

* Fixed __init__.py files

* Fixes for stuff moved as part of this branch.

* Fix stuff needed to merge with balloob's branch.

* Formatting issues.

* Missing __init__.py files.

* Fix-ups

* Fixup

* Regenerated requirements.

* Linting errors fixed.

* Fixed more broken tests.

* Missing init files.

* Fix broken tests.

* More broken tests

* There seems to be a thread race condition.
I suspect the logger stuff is running in another thread, which means waiting until the aio loop is done is missing the log messages.
Used sleep instead because that allows the logger thread to run. I think the api_streams sensor might not be thread safe.

* Disabled tests, will remove sensor in #22147

* Updated coverage and codeowners.
2019-03-18 23:07:39 -07:00