Commit Graph

53 Commits (f18056f0a4edc340d1cab380dbc602fc4606078a)

Author SHA1 Message Date
J. Nick Koston da4c144a5e
Fix history stats query using incorrect microseconds (#91250) 2023-04-17 11:37:30 -10:00
J. Nick Koston e34853a82a
Switch underlying history stats calculation to use seconds (#77857)
* Switch history stats to report in seconds

Because hours were previously used, the data would always be off because
of the loss of resolution when the time being tracked was in a window
of more than 12s

* Apply suggestions from code review

* Update homeassistant/components/history_stats/sensor.py

* tweak
2023-03-12 23:05:48 -04:00
Erik Montnemery 899adef590
Sort manifests 4 (#87025) 2023-02-08 20:27:05 +01:00
epenet 55a5e17cf2
Use UnitOfTime in integrations (h-s) (#84289) 2022-12-20 13:21:14 +01:00
J. Nick Koston 6644f62ad2
Fix history stats device class when type is not time (#77855) 2022-09-05 14:56:27 -04:00
J. Nick Koston 0505c596a5
Fix dropouts in history_stats graphs on restart (#73110) 2022-06-09 21:11:23 -07:00
J. Nick Koston d3f01f7ea9
Reduce memory pressure from history_stats with large data sets (#73289) 2022-06-09 20:49:37 -07:00
J. Nick Koston 0a2a166860
Fix history stats not comparing all times in UTC (#73040) 2022-06-04 12:47:30 -07:00
J. Nick Koston d3b1896a06
Only present history_stats state as unknown if the time is in the future (#72880) 2022-06-02 08:39:53 -07:00
J. Nick Koston c74b241949
Include initial state in history_stats count (#71952) 2022-05-18 10:28:04 -07:00
J. Nick Koston 1dc15bb7c8
Prevent history_stats from rejecting states when microseconds differ (#71704) 2022-05-11 20:44:35 -07:00
J. Nick Koston b86f508ac8
Use DataUpdateCoordinator generic for data (#71479) 2022-05-07 06:42:49 -07:00
J. Nick Koston aafe6ff0e2
Fix history_stats for timezones with a positive offset from UTC (#71038) 2022-04-28 23:48:58 -07:00
J. Nick Koston 1c3203abda
Use device class duration for history_stats sensors (#70720) 2022-04-26 19:24:28 +02:00
J. Nick Koston 1d2c949c51
Convert history_stats to use a coordinator (#70388)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2022-04-25 15:20:06 -07:00
J. Nick Koston 73a368c242
Refactor history_stats to minimize database access (part 2) (#70255) 2022-04-21 09:06:59 -07:00
J. Nick Koston e70c8fa359
Refactor history_stats to minimize database access (part 1) (#70134) 2022-04-18 13:18:38 -10:00
J. Nick Koston c223397098
Remove unneeded attributes selection from history_states api calls (#68409) 2022-03-22 19:49:07 +01:00
J. Nick Koston bc862e97ed
Use a dedicated executor pool for database operations (#68105)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-03-17 23:09:01 -10:00
epenet 2709db008c
Remove invalid return values in setup methods [a-h] (#63362)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-04 11:08:28 +01:00
Sebastian Lövdahl bc3bf2ffe3
Use Platform constants all over the place 1/3 (#62952) 2021-12-28 21:13:20 +01: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
Marc Mueller f6b162bc39
Add pylint CodeStyle extension (#53147) 2021-07-19 06:57:06 -07:00
tkdrob 4ce3038b29
Add targets and selectors for services (G-H) (#50524)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-12 20:49:04 +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
J. Nick Koston df66f2a9da
Cleanup history states tests that were converted to async tests (#49446) 2021-04-20 08:21:41 -10:00
J. Nick Koston b8001b951b
Avoid executor jumps in history stats when no update is needed (#49407) 2021-04-19 08:23:10 -07: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
Erik Montnemery af4d06b12e
Update integrations f-i to override extra_state_attributes() (#47757) 2021-03-11 16:57:47 +01:00
Indu Prakash 7213d5f31b
Support for multiple states in history_stats (#43416)
Co-authored-by: Indu Prakash <6459774+InduPrakash@users.noreply.github.com>
2020-11-21 12:44:37 +01:00
springstan a967f689c7
Remove unnecessary instances of dict.keys() (#42518) 2020-10-28 20:43:48 +01:00
Franck Nijhof 58ede21f39
Fix date parsing template int in history stats (#41476) 2020-10-09 11:50:52 +02:00
Franck Nijhof ee914366a8
Add native Python types support to templates (#41227)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-10-07 00:05:52 +02:00
springstan f47d58d9c2
Remove unnecessary should poll from sensor classes (#41219)
* Remove unnecessary should poll from sensor classes

* Remove two more occurrences
2020-10-04 21:35:59 +02:00
springstan d2b1918e9c
Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
J. Nick Koston f914625b8a
Add the ability to reload history_stats platforms from yaml (#39337)
* Add the ability to reload history_stats platforms from yaml

* Increase coverage and cleanup

* Fix coverage

* services.yaml
2020-08-28 00:22:43 -05:00
J. Nick Koston 20d5d3c162
Switch a few more async_track_state_change to the faster async_track_state_change_event (#37833)
async_track_state_change_event is faster than async_track_state_change
and since we do not care about the data being returned to the callback
this is a simple speedup
2020-07-14 22:31:34 -07:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
springstan f1a0ca7cd3
Add and use percentage constant (#32094)
* Add and use percentage constant

* Fix pylint error and broken test
2020-02-28 11:46:48 -08:00
springstan a85808e325
Add and use time related constants (#32065)
* Add and use time related constants

* Sort time constants and reuse them in data rate constants

* Fix greeneyemonitor import

* Fix greeneyemonitor import V2

* Fix failing here_travel_time test

* Add TIME_MONTHS and TIME_YEARS

* Use TIME_MINUTES in opentherm_gw and isy994

* Add and use TIME_MILLISECONDS

* Change inconsistent ones

* Add TIME_MICROSECONDS and TIME_WEEKS

* Use constants in apcupsd and travisci

* Fix import error in upnp sensor.py

* Fix isy994 sensor.py using TIME_YEARS

* Fix dyson tests

* Use TIME_SECONDS in more places

* Use TIME_DAYS in google wifi
2020-02-23 22:09:24 +02:00
Franck Nijhof bfa0edaf92 Migrate Integration Quality Scale from docs to manifest: internal (#30551) 2020-01-07 20:58:49 +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
Ville Skyttä e6388e186c
Remove unnecessary string literal concatenations (#30360) 2020-01-02 21:17:10 +02:00
Bas Nijholt 8b39957c56 Sort imports according to PEP8 for components starting with "H" (#29768) 2019-12-09 14:19:48 +01: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
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
Rohan Kapoor 6ba9ccf052 Load requirements and dependencies from manifests. Fallback to current `REQUIREMENTS` and `DEPENDENCIES` (#22717)
* Load dependencies from manifests. Fallback to current DEPENDENCIES

* Fix typing

* Ignore typing correctly

* Split out dependency processing to a new method

* Fix tests

* Only pull from manifest if dependencies is non empty

* Inline temporary function

* Fix light tests [skip ci]

* Fix tests/common

* Fix some mqtt tests [skip ci]

* Fix tests and component manifests which have only one platform

* Fix rflink tests

* Fix more tests and manifests

* Readability over shorthand format

* Fix demo/notify tests

* Load dependencies from manifests. Fallback to current DEPENDENCIES

* Load requirements from manifests. Fallback to current REQUIREMENTS

* Fix typing

* Ignore typing correctly

* Split out dependency processing to a new method

* Only pull from manifest if dependencies is non empty

* Inline temporary function

* Fix tests and component manifests which have only one platform

* Fix rflink tests

* Readability over shorthand format

* Clean up requirements

* Use integration to resolve deps/reqs

* Lint

* Lint

* revert a change

* Revert a test change

* Fix types

* Fix types

* Add back cache for load component

* Fix test_component_not_found

* Move light.test and device_tracker.test into test package instead with manifest to fix tests

* Fix broken device_tracker tests

* Add docstrings to __init__

* Fix all of the light tests that I broke earlier

* Embed the test.switch platform to fix other tests

* Embed and fix the test.imagimage_processing platform

* Fix tests for nx584

* Add dependencies from platform file's DEPENDENCIES

* Try to setup component when entity_platform is setting up

Fix tests in helpers folder

* Rewrite test_setup

* Simplify

* Lint

* Disable demo component if running in test

Temp workaround to unblock CI tests

* Skip demo tests

* Fix config entry test

* Fix repeat test

* Clarify doc

* One extra guard

* Fix import

* Lint

* Workaround google tts
2019-04-11 01:26:36 -07:00