1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02:00
Commit Graph

51 Commits

Author SHA1 Message Date
MosheTzvi
8810d3320c
added Hanetz Hachama (#76216)
added missing variable
2022-08-04 10:08:23 -06:00
Chaim Turkel
7251445ffb
Add shabat sensors to jewish_calendar (#57866)
* add shabat sensors

* add shabat sensors

* add shabat sensors

* add shabat sensors

* add shabat sensors

* Remove redundunt classes and combine sensors

* Update homeassistant/components/jewish_calendar/binary_sensor.py

Co-authored-by: Yuval Aboulafia <yuval.abou@gmail.com>

* Update homeassistant/components/jewish_calendar/binary_sensor.py

Co-authored-by: Yuval Aboulafia <yuval.abou@gmail.com>

* updated requirements

* call get_zmanim once

* add type hint to entity description

* fix errors resulted from type hints introduction

* fix mypy error

* use attr for state

* Update homeassistant/components/jewish_calendar/binary_sensor.py

Co-authored-by: Teemu R. <tpr@iki.fi>

* Fix typing

Co-authored-by: Yuval Aboulafia <yuval.abou@gmail.com>
Co-authored-by: Teemu R. <tpr@iki.fi>
2022-07-28 16:19:20 +02:00
Yuval Aboulafia
70e8f81be1
Loop load Jewish Calendar platforms (#70714) 2022-04-28 20:35:42 +02:00
J. Nick Koston
5b755b74fb
Add loggers to integration manifest.json (#65083) 2022-01-28 13:37:53 -08:00
epenet
c7cb26cbab
Use Platform enum in load_platform [a-l] (#63750) 2022-01-10 10:30:47 +01:00
epenet
002512f4ff
Use SensorDeviceClass in jewish-calendar (#61827) 2021-12-14 22:12:34 +01:00
Paulus Schoutsen
7b3a7ee2d1
Jewish Calendar: Do not convert datetimes to UTC (#61222) 2021-12-07 23:38:52 -08:00
Franck Nijhof
4e4f6ffa07
Use native datetime value in Jewish Calendar sensors (#59917) 2021-11-18 20:03:16 +01:00
Yuval Aboulafia
a9ccd70e71
Fully type Jewish Calendar (#56232) 2021-10-22 23:11:41 +02:00
Yuval Aboulafia
2fcce7fd12
Bump hdate to 0.10.4 (#58121) 2021-10-20 20:17:46 +02:00
Bram Kragten
86d24bec75
Update icons for MDI 6 (#56170) 2021-09-13 19:29:38 +02:00
Yuval Aboulafia
173b87e675
Clean holiday attributes code in Jewish calendar (#55080)
* Clean repetitive code in jewish calendar

* do not return none

* fix holiday
2021-09-03 12:07:53 +03:00
Yuval Aboulafia
ebe48e78b7
Refactor Jewish Calendar to use EntityDescription (#54852) 2021-08-25 12:05:58 +02:00
Erik Montnemery
2720ba2753
Move temperature conversions to sensor base class (4/8) (#54472)
* Move temperature conversions to entity base class (4/8)

* Fix litterrobot sensor

* Fix tests
2021-08-11 21:17:47 +02:00
Franck Nijhof
d4d791e0a1
Ensure Jewish Calendar returns an iso formatted timestamp (#52722) 2021-07-26 20:23:25 -07:00
Yuval Aboulafia
4a94ed8f5a
Use attrs instead of property for Jewish Calendar (#52333)
* Use attrs instead of property for Jewish Calendar

* clean time sensor class

* move type and prefix up

* revert is_on attribute
2021-06-30 22:24:19 +03:00
Tsvi Mostovicz
968460099a
Change Jewish calendar IOT class to calculated (#49571)
This integration doesn't poll at all, rather all values are calculated based on location and date, so I think this is the more correct value here
2021-04-23 10:19:43 +02:00
Franck Nijhof
055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
amitfin
f8690c29cd
Bump libhdate dependency (#48695) 2021-04-10 17:20:08 +02:00
amitfin
2391134d26
Update "issur_melacha_in_effect" via time tracking (#42485) 2021-04-09 12:26:55 +02:00
Erik Montnemery
fdf97eaca3
Migrate integrations i-m to extend SensorEntity (#48213) 2021-03-22 19:59:03 +01:00
Marc Mueller
25a13d1554
Update typing 10 (#48071) 2021-03-18 13:07:04 +01:00
Erik Montnemery
14a59d290a
Update integrations j-o to override extra_state_attributes() (#47758) 2021-03-11 20:11:25 +01:00
Tsvi Mostovicz
c756457aa1
Fix typo in sensor names (#44598)
Fixes home-assistant/core#44464
2020-12-29 13:40:52 +01:00
Yuval Aboulafia
adfcbe9058
Make Jewish Calendar use DEVICE_CLASS_TIMSTAMP and remove timestamp attribute (#41397)
* Added "time" attribute

* Revert "Added "time" attribute"

This reverts commit 8adab9b788.

* Make DEVICE_CLASS use the DEVICE_CLASS_TIMESTAMP

* Removed unix timstamp attr

* keep attributes but delete the timestamp
2020-11-09 09:26:43 +01:00
Tsvi Mostovicz
80e8068b46
Bump libhdate depndency (#42396)
* Bump libhdate depndency

This version fixes an important bug found by @amitfin in py-libhdate/py-libhdate#78

* Update reqs

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-10-26 15:26:21 +01:00
Philip Allgaier
625bbe6238
Cleanup unused loggers (components A-M) (#41600) 2020-10-12 16:59:05 +02:00
springstan
61d9067a49
Return empty dictionary at first for attributes (#41348) 2020-10-06 18:08:53 +02:00
Andrew Marks
d0af3339fc
Add unique_id to jewish_calendar entities (#39025) 2020-09-06 20:29:17 -05:00
Erik Montnemery
b022e08db9
Rename BinarySensorDevice to BinarySensorEntity (#34462)
* Rename BinarySensorDevice to BinarySensorEntity

* Tweak

* Move deprecation warning to __new__, add test

* Move deprecation warning back to __init__

* Move deprecation warning to __init_subclass
2020-04-23 21:57:07 +02:00
Paulus Schoutsen
f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
Moshe Kaplan
7dff5e79d1
Add support for displaying Daf Yomi (#30628)
* Add support for displaying Daf Yomi

* Ran black --fast

* Added docstring to get_daf

* Further lint fixes

* Remove unnecessary else

* clarify code

* Use fstrings

* pull daf yomi from hdate

* Update manifest version for daf_yomi support

* fix variable usage

* Update requirements

* Also pass in today's date as well

* Rename date variable to daytime_date

* Add tests for daf yomi sensor

* Update stale test IDs
2020-02-16 00:00:17 +01:00
ajmarks
656ef6566b Minor enhancements to jewish_calendar (#30632)
* Minor enhancement to jewish_calendar:
 - Expose more halachic times from the underlying hdate module
 - Correct and standardize some transliterations

* Undo breking name change

* Add icon for talit time

Co-authored-by: Andrew Marks <52414333+amarks-coatue@users.noreply.github.com>
2020-01-18 21:33:18 +01:00
Franck Nijhof
345cc244ed
Correct names in manifests (C-L) (#30532) 2020-01-07 08:19:17 +01:00
Franck Nijhof
a84741392b
Format all manifests with prettier (#30521) 2020-01-06 21:28:23 +01:00
Bas Nijholt
0fbb450838 Sort imports according to PEP8 for jewish_calendar (#29697)
* use isort to sort imports according to PEP8 for jewish_calendar

* fix order
somehow isort did the wrong thing
2019-12-09 11:30:31 +01:00
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