Commit Graph

111 Commits (f0eb0849088aa843d3ab8b479f2a734eeb3d6414)

Author SHA1 Message Date
Erik Montnemery e25fbecfdc
Add missing super() call to EnergyCostSensor.add_to_platform_abort (#94322) 2023-06-09 11:28:12 +02:00
Erik Montnemery ef68f2c3ff
Add empty config schema to integrations d-h (#93645) 2023-05-29 21:00:08 +02:00
J. Nick Koston 460d04fc07
Disable polling on energy sensors (#93651)
These sensors do not implement async_update so no
polling is needed
2023-05-27 19:54:40 -04:00
rlippmann f5911bcad6
Add slots to dataclasses in default_config (#91410)
* add dataclass slots to default config items

* remove slots from sun mixing
2023-04-14 14:22:39 -04:00
J. Nick Koston 5ffb233004
Avoid database executor job to fetch statistic metadata on cache hit (#89960)
* Avoid database executor job to fetch statistic metadata on cache hit

Since we will almost always have a cache hit fetching
statistic meta data we can avoid an executor job

* Avoid database executor job to fetch statistic metadata on cache hit

Since we will almost always have a cache hit fetching
statistic meta data we can avoid an executor job

* Avoid database executor job to fetch statistic metadata on cache hit

Since we will almost always have a cache hit fetching
statistic meta data we can avoid an executor job

* remove exception catch since the threading.excepthook will actually catch this in production

* fix a few missed ones

* threadsafe

* Update homeassistant/components/recorder/table_managers/statistics_meta.py

* coverage and optimistic caching
2023-03-19 22:01:16 -04:00
J. Nick Koston a6d6807dd0
Add typing to statistics results (#89118) 2023-03-14 09:06:56 -10:00
epenet 9e6f869438
Set Protocol inheritance on EnergyPlatform (#89079) 2023-03-03 11:57:41 +01:00
J. Nick Koston c35661947a
Optimize fetching statistics by avoiding timestamp conversions (#87845)
* Optimize fetching statistics by avoiding timestamp conversions

* remove accidential unrelated change

* fix test

* recreate so we handle timezone changes
2023-02-10 11:26:46 -05:00
J. Nick Koston ea356ad260
Optimize fetching weekly/monthly/yearly statistics (#87747)
* Optimize fetching statistics

* speed up

* avoid double groupby

* avoid another loop

* tweak flow

* fixes

* tweak

* avoid a new dt object in the cache for week/month

* avoid a new dt object in the cache for week/month
2023-02-09 21:22:32 -05:00
Erik Montnemery 78c9b70c8d
Sort manifests 3 (#87024) 2023-02-08 20:19:19 +01:00
Franck Nijhof 939eef3b28
Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
GitHub Action 0f80932709 [ci skip] Translation update 2023-02-02 00:25:01 +00:00
GitHub Action be73e43989 [ci skip] Translation update 2023-02-01 00:27:42 +00:00
GitHub Action 072f228e4d [ci skip] Translation update 2023-01-28 00:23:36 +00:00
SgtBatten 0ccab19d2c
Add Mega Joule as valid unit of energy (#86055)
* Add Mega joule

* Reorder valid energy types

Alphabetical

* Add Mega Joule

* Add Mega Joule as valid energy unit

* Add Mega Joule

* Add Mega Joule as a Unit of Measurement to Energy

* Update tests

* Update tests

* Update number docstring

Co-authored-by: Roving Ronin <108674933+Roving-Ronin@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-01-25 14:13:42 +01:00
GitHub Action 613aa6f43a [ci skip] Translation update 2023-01-24 00:24:57 +00:00
Marc Mueller 8abce25948
Update Union typing (4) [Py310] (#86427) 2023-01-23 09:04:40 +01:00
GitHub Action 771e07c68b [ci skip] Translation update 2023-01-22 00:25:52 +00:00
GitHub Action e1483ff746 [ci skip] Translation update 2023-01-21 00:24:12 +00:00
GitHub Action d1ecc418bb [ci skip] Translation update 2023-01-19 00:25:04 +00:00
GitHub Action 87b2a73460 [ci skip] Translation update 2023-01-18 00:24:40 +00:00
lunmay 8485588aca
Fix typo in energy: misplaced closing brace (#86027) 2023-01-17 14:34:27 +01:00
GitHub Action d2e11797f8 [ci skip] Translation update 2023-01-17 00:24:30 +00:00
GitHub Action b81453cb6b [ci skip] Translation update 2023-01-16 00:24:22 +00:00
GitHub Action 77f9548e51 [ci skip] Translation update 2023-01-15 00:25:52 +00:00
Erik Montnemery 8418a30cc0
Refactor energy validation issue reporting (#85523)
* Refactor energy validation issue reporting

* Update English translations

* Adjust translations
2023-01-12 12:50:43 +01:00
epenet b578d08e8a
Adjust valid energy units (#85190) 2023-01-05 13:00:46 +01:00
epenet 9a488cf250
Use unit enums in energy and sensor (#84343) 2022-12-21 10:49:51 +01:00
epenet f4c13645d2
Add support for CCF volume unit (#84029) 2022-12-19 14:57:04 +01:00
epenet b63359b186
Use UnitOfVolume in energy integration (#83641) 2022-12-09 10:39:40 -05:00
GitHub Action 230b50d099 [ci skip] Translation update 2022-11-29 00:26:01 +00:00
Erik Montnemery 607a0e7697
Reduce size of get_statistics_during_period WS API response (#82131) 2022-11-16 17:36:30 +01:00
Paulus Schoutsen a8c527f6f3
Add unit conversion for energy costs (#81379)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-11-02 12:18:50 +01:00
Erik Montnemery 95fc641949
Add support to the energy integration for tracking water usage (#80888) 2022-10-26 21:20:52 +02:00
epenet 842cb18d39
Migrate energy units to an enum (#80998) 2022-10-26 13:56:51 +02:00
Erik Montnemery 727eccfec4
Add GJ as supported unit for energy sensors (#80870)
* Add GJ as supported unit for energy sensors

* Update homeassistant/const.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-10-25 16:43:00 +02:00
epenet 2c43606922
Add websocket type hints in components (#80654)
* Add websocket type hints in components

* Adjust

* Apply suggestion

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-10-20 13:41:14 +02:00
epenet 5442d6af01
Improve msg type hint in websocket commands (#80530) 2022-10-18 16:41:17 +02:00
Erik Montnemery 5d7756885b
Normalize to kWh when handling WS energy/fossil_energy_consumption (#79649)
* Normalize to kWh when handling WS energy/fossil_energy_consumption

* Improve test
2022-10-05 16:27:08 +02:00
Franck Nijhof 2b27cfdabb
Set system & entity integration types (#79593) 2022-10-04 10:36:42 -04:00
Erik Montnemery 6b0c9b6a6a
Simplify energy settings (#78947) 2022-09-22 21:58:15 -04:00
Erik Montnemery 8a9edea2c1
Fix calculating gas cost for gas measured in ft3 (#78327) 2022-09-12 21:24:49 -04:00
Erik Montnemery 687ac91947
Support MWh for gas consumption sensors (#76016) 2022-08-01 14:22:24 +02:00
Marc Mueller 3193ea3359
Fix type narrowing in energy integration (#75462) 2022-07-20 04:00:14 +02:00
GitHub Action 1d2e64e3dc [ci skip] Translation update 2022-07-14 00:27:41 +00:00
epenet 16900dcef1
Make Store a generic class (#74617) 2022-07-09 22:32:57 +02:00
Jaroslav Hanslík 5b73cb10c1
MWh is valid unit for energy dashboard (#73929)
MWh is valid unit for energy
2022-06-29 11:42:52 +02:00
GitHub Action 4005af99aa [ci skip] Translation update 2022-06-14 00:26:59 +00:00
Franck Nijhof 5c1be2f99d
Add unique ID to energy sensors (#70378) 2022-04-26 23:14:16 -07:00
J. Nick Koston 97aa65d9a4
Run energy db calls in the db executor (#69544)
Fixes #69537
2022-04-07 11:50:49 +02:00