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

96 Commits

Author SHA1 Message Date
epenet
d8b2563b3d
Use _attr_should_poll in components [u-z] (#77371) 2022-08-26 21:22:27 +02:00
epenet
8619df5294
Improve type hints in utility_meter select entity (#76447) 2022-08-17 16:38:41 +02:00
Diogo Gomes
ef6b6e7850
Remove deprecated utility_meter entity (#76480)
* remove deprecated utility_meter domain

* remove select_tariff
2022-08-17 16:25:34 +02:00
GitHub Action
519d478d61 [ci skip] Translation update 2022-08-11 00:26:23 +00:00
GitHub Action
1d2e64e3dc [ci skip] Translation update 2022-07-14 00:27:41 +00:00
J. Nick Koston
cd03c49fc2
Wait for config entry platform forwards (#73806) 2022-07-09 17:27:42 +02:00
GitHub Action
269e414e84 [ci skip] Translation update 2022-07-04 00:27:42 +00:00
GitHub Action
7746715590 [ci skip] Translation update 2022-06-02 00:27:51 +00:00
Diogo Gomes
f6517884b1
Fix #72749 (#72794) 2022-05-31 20:40:42 -07:00
GitHub Action
3a13ffcf13 [ci skip] Translation update 2022-05-19 00:26:11 +00:00
GitHub Action
37f81b261d [ci skip] Translation update 2022-05-16 00:24:28 +00:00
GitHub Action
c7e8428daa [ci skip] Translation update 2022-05-13 00:26:47 +00:00
GitHub Action
07706fa62a [ci skip] Translation update 2022-05-06 00:22:16 +00:00
GitHub Action
348016dbbf [ci skip] Translation update 2022-04-29 00:22:21 +00:00
Erik Montnemery
9e213caefc
Tweak utility_meter service descriptions (#70338) 2022-04-20 22:07:16 +02:00
Diogo Gomes
03874d1b65
Correct state restoring for Utility Meter sensors (#66851)
* fix merge

* backward compatability

* add status

* increase coverage

* increase further the coverage

* adds support for Decimal in SensorExtraStoredData

* more precise

* review

* don't restore broken last_reset

* increase coverage

* address review comments

* stale

* coverage increase

* Update homeassistant/components/utility_meter/sensor.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* catch corrupt files and respective tests

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-04-19 09:01:52 +02:00
Diogo Gomes
9dfd37c60b
Use CONF_NAME consistently in utility meter sensors with and without tariffs (#69152)
* apply name to tariff based sensors too

* change name without breaking entity_id

* address comments
2022-04-19 09:00:36 +02:00
Diogo Gomes
8e64ae8478
Add unique_id to utility_meter sensors (#68596)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-04-13 23:58:15 +02:00
Raman Gupta
b325c112b4
Add SelectorType enum and TypedDicts for each selector's data (#68399)
* rebase off current

* rearrange

* Overload selector function

* Update/fix all selector references

* better typing?

* remove extra option

* move things around

* Switch to Sequence type to avoid ignoring mypy error

* Get rid of ...'s

* Improve typing to reduce number of ignores

* Remove all typing ignores

* Make config optional for selectors that don't need a config

* add missing unit prefixes

* Rename TypedDicts

* Update homeassistant/helpers/selector.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* review feedback

* remove peta from integration integration

* Fix min_max

* Revert change to selector function

* Fix logic

* Add typing for selector classes

* Update selector.py

* Fix indent

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-04-11 09:20:56 +02:00
Diogo Gomes
a3cfb6d4ae
Fix utility_meter reset service (#69612) 2022-04-07 23:55:34 +02:00
epenet
2cf3057ff1
Add basic type hints to utility_meter (#69325)
Co-authored-by: Diogo Gomes <diogogomes@gmail.com>
2022-04-05 15:43:10 +02:00
Erik Montnemery
e830032b33
Remove deprecated temperature conversion of non temperature sensors (#69069) 2022-04-04 20:02:40 +02:00
Erik Montnemery
82af314678
Improve utility_meter translation strings (#69252) 2022-04-04 14:24:56 +02:00
Erik Montnemery
d7992c1e87
Unsubscribe listeners when entity meter sensor is removed (#69172) 2022-04-03 13:15:22 +02:00
Diogo Gomes
6389959fb7
Makes sure YAML defined tariffs are unique (#69151) 2022-04-02 20:41:03 -07:00
Erik Montnemery
bda997efe9
Fix utility_meter startup (#69064) 2022-04-01 08:28:50 -07:00
Diogo Gomes
2963aea3ec
Ignore old_state when using delta_values (#68402)
* delta value updates don't require old_state

* add test

* merge
2022-04-01 12:08:00 +03:00
Erik Montnemery
400943ce99
Make utility_meter tariffs a list (#68967) 2022-03-31 13:57:26 +02:00
Erik Montnemery
4327d3aef9
Improve utility_meter services.yaml (#68960) 2022-03-31 11:32:11 +02:00
Erik Montnemery
3be689baf4
Improve utility_meter services.yaml (#68930) 2022-03-31 00:47:15 +02:00
Erik Montnemery
f9f360c64e
Rename helper_config_entry_flow to schema_config_entry_flow (#68924) 2022-03-30 14:36:47 -07:00
epenet
ecd43f391f
Prettify json (manifest.json) (#68886) 2022-03-30 10:56:37 +02:00
Erik Montnemery
bdb61e0222
Add config flow for utility_meter (#68457) 2022-03-29 14:46:17 +02:00
Diogo Gomes
ba814af701
Adopt SelectEntity in Utility Meter (#55690)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-03-21 08:21:26 +01:00
Diogo Gomes
b211a1faa7
Fix utility meter restore state (#66490)
* Address #63874

* avoid setting _last_period to None

* name is always set in discovery

* ValueError never happens only DecimalException

* async_tariff_change tracks state change - state machine will not pass a None

* test we only reset one utility_meter

* test corrupted restored state

* pretty sure _current_tariff doesn't change from init until here

* missing assert

* Revert "async_tariff_change tracks state change - state machine will not pass a None"

This reverts commit 24fc04a964.

* address review comment

* always a Decimal
2022-02-15 02:16:30 +01:00
J. Nick Koston
5b755b74fb
Add loggers to integration manifest.json (#65083) 2022-01-28 13:37:53 -08:00
epenet
58a53046f2
Move list to dict in utility-meter discovery (#63808)
* Move list to dict in utility-meter discovery

* Reuse name variable

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-17 14:23:12 +01:00
Erik Montnemery
3083f059cc
Drop last_reset attribute for non 'total' sensors (#63880)
* Drop last_reset attribute for non 'total' sensors

* Adjust MQTT tests

* Add exception for utility_meter

* Rewrite exception for utility_meter

* Add comment in utility_meter

* Tweak comment
2022-01-11 13:58:35 +01:00
Robert Hillis
44f4656fe6
Use enums in utility_meter (#62033) 2021-12-16 12:50:41 +01:00
Marc Mueller
a48ddcadd4
Use assignment expressions 31 (#58715) 2021-10-30 16:29:07 +02:00
Eddy G
4d5705c0fe
Add 'delta_values' option to utility_meter (#54964) 2021-10-28 19:00:31 -05:00
Diogo Gomes
ad48d78315
Simplify utility_meter code base with croniter (#55625) 2021-10-27 06:41:44 -05:00
Marc Mueller
4513ee4ea5
Use assignment expressions 12 (#57937) 2021-10-20 14:34:08 -07:00
Diogo Gomes
79b10c43d8
Ignore utility_meter restore state if state is invalid (#57010)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-10-03 21:59:36 -07:00
Diogo Gomes
ec9fc0052d
Define unit_of_measurement of all utility_meter sensors on HA start (#56112)
* define unit_of_measurement on hass start

* delay utility_meter state

* check state

* store siblings

* don't check unit_of_measurement
2021-09-28 00:42:27 +02:00
Diogo Gomes
b05c1b516e
restore float and not string (#56406) 2021-09-20 07:31:58 +02:00
Erik Montnemery
0d1412ea17
Set state class to total for net utility_meter sensors (#55877)
* Set state class to total for net utility_meter sensors

* Update tests
2021-09-07 08:13:14 +02:00
Diogo Gomes
fb28665cfa
Add "cron patterns" to define utility_meter cycles (#46795)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-08-25 14:52:39 -05:00
Erik Montnemery
517fda1383
Fix last_reset in utility_meter (#55209) 2021-08-25 15:24:51 +02:00
Daniel Hjelseth Høyer
7dd169b48e
Utility meter, add STATE_CLASS_TOTAL_INCREASING (#54871)
* Utility meter, STATE_CLASS_TOTAL_INCREASING

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* update test

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* update test

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>
2021-08-25 14:03:30 +02:00