1
mirror of https://github.com/home-assistant/core synced 2024-09-03 08:14:07 +02:00
Commit Graph

42 Commits

Author SHA1 Message Date
Diogo Gomes
012ef6bb7b
sanitize state_classes (#70090) 2022-04-15 16:38:08 +03:00
J. Nick Koston
e5f424a280
Switch filter to use the database executor (#68594) 2022-03-23 13:20:43 -10:00
Marc Mueller
ec980a574b
Improve typing [util.decorator] (#67087) 2022-02-23 20:58:42 +01:00
Diogo Gomes
9ed4bcf965
Add unique_id to the filter component (#65010)
* Optional manually defined uniqueid

* move to _attr
2022-02-21 21:00:09 +02:00
Diogo Gomes
abaf284ef2
Cast string back to datetime in Sensor Filter (#65396) 2022-02-21 19:14:23 +01:00
epenet
d24ebc3c10
Add sensor setup type hints [e-f] (#63317)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 19:19:11 +01:00
Sebastian Lövdahl
bc3bf2ffe3
Use Platform constants all over the place 1/3 (#62952) 2021-12-28 21:13:20 +01:00
Diogo Gomes
922d4c42a3
Inherit Filter sensor state_class from source sensor (#56407) 2021-09-28 09:30:21 +02:00
Erik Montnemery
6de6a5dc14
Move temperature conversions to sensor base class (3/8) (#54469)
* Move temperature conversions to entity base class (3/8)

* Fix FritzBox sensor

* Fix tests
2021-08-12 14:23:56 +02:00
Milan Meulemans
fc1babfc92
Activate mypy for Filter (#54044) 2021-08-10 10:45:56 +02:00
Marc Mueller
0815eede4b
Replace lists with tuples (2) (#53685) 2021-07-30 01:20:03 +02:00
tkdrob
9e0730c97f
Add targets and selectors for services (F) (#50191) 2021-05-12 11:00:32 +02:00
Erik Montnemery
973f59e423
Refactor history component (#50287)
* Refactor history component

* Update tests

* Address review comments

* Correct deprecated functions
2021-05-11 09:21:57 +02:00
Franck Nijhof
055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
Erik Montnemery
339a56e434
Migrate integrations f-h to extend SensorEntity (#48212) 2021-03-22 19:45:17 +01:00
Marc Mueller
91df3fa904
Update typing 06 (#48039) 2021-03-17 23:49:01 +01:00
Erik Montnemery
af4d06b12e
Update integrations f-i to override extra_state_attributes() (#47757) 2021-03-11 16:57:47 +01:00
Franck Nijhof
a80921ab65
Minor service definition tweaks (#46741) 2021-02-18 17:14:36 +01:00
Diogo Gomes
1454349813
Re-add support for input_number as source of filter integration (#45245) 2021-01-16 23:57:32 +01:00
Diogo Gomes
2d131823ce
Fix filter sensor None state (#44439)
Co-authored-by: Franck Nijhof <frenck@frenck.dev>
2020-12-24 02:24:11 +01:00
Diogo Gomes
b7d4c1826c
Add filter sensor device class from source entity (#44304)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-12-19 17:51:24 +01:00
J. Nick Koston
7537a3a7c8
Update filter to use async_add_executor_job (#41455) 2020-10-08 09:22:51 +02:00
springstan
513f03eb1f
Return attribute dict directly without temporary variable v2 (#41271) 2020-10-06 16:55:16 +02:00
J. Nick Koston
eaac00acfc
Add the ability to reload filter platforms from yaml (#39267)
* Add the ability to reload filter platforms from yaml

* force in memory db

* fix listener leak on un-load
2020-08-25 20:55:45 -05:00
J. Nick Koston
5cd6370822
Switch async_track_state_change to the faster async_track_state_change_event part 3 (#37852)
async_track_state_change_event is faster than async_track_state_change
2020-07-14 09:40:01 -10:00
Paulus Schoutsen
f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
Paulus Schoutsen
aaa1d06809
Directly call async_write_ha_state (#33508)
* Directly call async_write_ha_state

* Address comments

* Fix tests
2020-04-01 14:19:51 -07:00
Paulus Schoutsen
0763dc6089
Fix filter sensor processing states that aren't numbers (#32453)
* lint

* only_numbers flag
2020-03-04 12:47:53 -08: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
Franck Nijhof
bfa0edaf92 Migrate Integration Quality Scale from docs to manifest: internal (#30551) 2020-01-07 20:58:49 +01:00
Stefan Agner
3f33fc6122 convert to integer if rounding precision is zero (#30226)
Convert values to integer if rounding precision is zero. With that a
value which is an integer before filtering can be configured to stay
integer when using precision = 0. This also aligns behavior of filters
to how rounding behaves in tempaltes (homeassistant/helpers/template.py,
function forgiving_round).
2020-01-03 11:54:19 +01:00
Paulus Schoutsen
9e51a18845
Make hassfest import detection better (#29932)
* Make hassfest import detection better

* Fix tests
2019-12-16 08:22:20 +01:00
Bas Nijholt
ca0fad2cbb Sort imports according to PEP8 for components starting with "F" (#29766) 2019-12-09 14:14:40 +01:00
Franck Nijhof
c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
Franck Nijhof
fa79ef1220 Use literal string interpolation in integrations E-G (f-strings) (#26379) 2019-09-03 17:10:56 +02:00
Diogo Gomes
9df2c3f8c9 Add precision argument to the Range Filter (#25874)
* add precision argument

* add precision testing to range_filter
2019-08-31 19:24:17 +02:00
Diogo Gomes
1f2bab8e67 Fix Filter Sensor - check existing entity history (#25870)
* make sure we have entity history

* increase coverage

* increase coverage

* no need for list comprehension

* increase coverage
2019-08-13 11:07:05 -07:00
Ville Skyttä
49a5dda7a8 Upgrade pydocstyle to 4.0.0, do not run in tox (#25667)
* Upgrade pydocstyle to 4.0.0 and flake8-docstrings to 1.3.1

http://www.pydocstyle.org/en/4.0.0/release_notes.html#july-6th-2019

* Address pydocstyle D413's

* tox: do not run pydocstyle

Does not seem to add any value over flake8-docstrings (and would have
needed a D202 exclusion).
2019-08-04 17:05:43 +02:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25: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