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

63 Commits

Author SHA1 Message Date
GitHub Action
7746715590 [ci skip] Translation update 2022-06-02 00:27:51 +00:00
Erik Montnemery
78cb0e24bc
Improve integration sensor's time unit handling (#72759) 2022-05-31 15:51:38 +02:00
GitHub Action
7a0657c386 [ci skip] Translation update 2022-05-29 00:23:25 +00:00
RoboMagus
c1ddde3764
Check if attributes are present in new_state before accessing them (#71967)
* Check if attributes are present in new_state before accessing them.

* Early return if new state is None|Unknown|Unavailable

* Removed whitespace at line endings. +black run

* Update test for coverage
2022-05-25 08:44:08 +02: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
9b10658d01 [ci skip] Translation update 2022-05-02 00:22:04 +00:00
Diogo Gomes
852eaa062c
update unit_of_measurement even if unit_of_measurement is known (#69699) 2022-04-30 02:16:05 +03:00
GitHub Action
348016dbbf [ci skip] Translation update 2022-04-29 00:22:21 +00:00
Diogo Gomes
fa28ee1f14
Remove deprecated unit configuration option from integration integration (#69157) 2022-04-13 19:19:34 +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
8fe9e364e1
Update integration Riemann sum to use _attr* (#69769)
* move to _attr

* improve debug

* review comment

Co-authored-by: Shay Levy <levyshay1@gmail.com>

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-04-10 20:09:33 +03:00
Erik Montnemery
fcad10dd0d
Improve integration translation strings (#69246)
* Improve integration translation strings

* Update
2022-04-05 20:08:17 +02:00
Erik Montnemery
c79b361927
Unsubscribe from listeners when removing integration sensor (#69235) 2022-04-04 11:09:38 +02:00
Erik Montnemery
514e08c8fe
Drop unsupported SI-prefix peta from integration sensor (#69229) 2022-04-04 09:48:28 +02:00
Raman Gupta
15fc7349ed
Fix unit prefixes for derivative and integration (#69109) 2022-04-02 09:36:56 +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
48187cebad
Mark integration as a helper integration (#68778) 2022-03-28 10:35:52 +02:00
Erik Montnemery
c44d7205cf
Rename HelperFlowStep to HelperFlowFormStep (#68583) 2022-03-23 14:43:11 -07:00
Erik Montnemery
a50bac5cc2
Make initial group config flow step a menu (#68565) 2022-03-23 08:34:44 -07:00
Diogo Gomes
0cbc29caca
Add unique_id through YAML to the integration component (#68435) 2022-03-20 22:48:11 +01:00
Erik Montnemery
0655ebbd84
Add config flow for integration sensor (#68288) 2022-03-18 09:52:17 +01:00
Franck Nijhof
fa09cf663e
Update black to 22.1.0 (#65788) 2022-02-05 14:19:37 +01:00
Ryan Steckler
b541e91885
Fix units not being pulled from source sensor (#63639) 2022-01-24 15:15:34 +01:00
epenet
178d2848f3
Add setup type hints [i-k] (#63444)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-05 12:14:13 +01:00
epenet
1692fab664
Use new enums in integration (#61803)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-14 18:32:33 +01:00
Diogo Gomes
ec9b5df7b3
Ignore None state in state_change_event (#59485) 2021-11-10 22:31:56 -08:00
Marc Mueller
a48ddcadd4
Use assignment expressions 31 (#58715) 2021-10-30 16:29:07 +02:00
Diogo Gomes
84140a547b
deprecated unit_of_measurement (#55876) 2021-09-08 16:33:53 +02:00
Diogo Gomes
d705b35ea1
Address comment in integration Riemann sum PR #55875 (#55895)
* https://github.com/home-assistant/core/pull/55875\#discussion_r703334504

* missing test update
2021-09-07 19:40:20 +02:00
Diogo Gomes
1ca9deb520
Integration Sensor Initial State (#55875)
* initial state is UNAVAILABLE

* update tests
2021-09-07 08:12:54 +02:00
Erik Montnemery
b1dbdec2ea
Set state class to total for Integration sensors (#55872) 2021-09-07 00:27:31 +02:00
Diogo Gomes
34d54511e8
Integration Sensor unit of measurement overwrite (#55869) 2021-09-06 13:41:01 -07:00
Thomas Lovén
8d37fd08c7
Fix integration sensors sometimes not getting device_class or unit_of_measurement (#54802) 2021-08-18 08:59:31 -07:00
Daniel Hjelseth Høyer
27849426fe
Remove last_reset attribute and set state class to total_increasing for Integration sensors (#54815) 2021-08-18 15:54:11 +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
Diogo Gomes
b88f0adbe9
Restores unit_of_measurement (#54335) 2021-08-09 19:48:01 +02:00
Marc Mueller
0815eede4b
Replace lists with tuples (2) (#53685) 2021-07-30 01:20:03 +02:00
Daniel Hjelseth Høyer
6590e464af
Integration. Add device class, last_reset, state_class (#53698)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-29 20:05:53 +02:00
Franck Nijhof
055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
Erik Montnemery
fdf97eaca3
Migrate integrations i-m to extend SensorEntity (#48213) 2021-03-22 19:59:03 +01:00
Erik Montnemery
af4d06b12e
Update integrations f-i to override extra_state_attributes() (#47757) 2021-03-11 16:57:47 +01:00
tkdrob
ad400d91bc
Use core constants for sensor integration (#46290) 2021-02-10 08:36:05 -05:00
springstan
513f03eb1f
Return attribute dict directly without temporary variable v2 (#41271) 2020-10-06 16:55:16 +02:00
J. Nick Koston
b430496b13
Switch async_track_state_change to the faster async_track_state_change_event part 4 (#37863)
* Switch async_track_state_change to the faster async_track_state_change_event part 4

Calling async_track_state_change_event directly is faster than async_track_state_change (see #37251) since async_track_state_change is a wrapper around async_track_state_change_event now

* pylint
2020-07-14 22:25:48 -07: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
bangom
1f9f5bfaa8
Fix wrong SI unit_prefix in Integration component (#33227) (#33228)
* wrong SI metric prefixes
2020-03-29 11:17:53 +01:00
springstan
157f972d72
Use f-strings in integrations starting with "H" - "L" (#32265)
* Use f-strings in integrations starting with "H"

* Use f-strings in integrations starting with "I"

* Use f-strings in integrations starting with "J"

* Use f-strings in integrations starting with "K"

* Use f-strings in integrations starting with "L"

* Fix lint error

* Use join instead of f-string in homekit_controller

* Use local variables with f-strings

* Fix lint error

* Escape the characters in f-string

* Sort imports with isort in homeworks light

* Fix pylint error

* Fix broken tests

* Fix broken tests v2
2020-02-28 12:39:29 +01:00