Commit Graph
104 Commits
Author SHA1 Message Date
Erik MontnemeryandGitHub c4c8f88765 Simplify helper_integration.async_handle_source_entity_changes (#146516) 2025-06-11 12:27:51 +02:00
2afdec4711 Do not remove derivative config entry when input sensor is removed (#146506)
* Do not remove derivative config entry when input sensor is removed

* Add comments

* Update homeassistant/helpers/helper_integration.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-06-11 11:19:44 +02:00
Erik MontnemeryandGitHub 16a0b7f44e Handle changes to source entity in derivative helper (#146407)
* Handle changes to source entity in derivative helper

* Rename helper function, improve docstring

* Add tests

* Improve derivative tests

* Deduplicate tests

* Rename helpers/helper_entity.py to helpers/helper_integration.py

* Rename tests
2025-06-10 14:31:18 +02:00
Norbert RittelandGitHub 09515bf174 Add missing hyphen to "time-weighted" in derivative (#144637) 2025-05-11 13:58:04 +03:00
Juan GrandeandGitHub 8e7960fa0e Fix bug in derivative sensor when source sensor's state is constant (#139230)
Previously, when the source sensor's state remains constant, the derivative
sensor repeats its latest value indefinitely.

This patch fixes this bug by consuming the state_reported event and updating
the sensor's output even when the source sensor doesn't change its state.
2025-03-01 09:10:35 +01:00
Erik MontnemeryandGitHub f83c8de8d3 Update signature of platforms' async_setup_entry (#138201) 2025-02-10 21:08:03 +01:00
Joost LekkerkerkerandGitHub 53ad02a1eb Enable RUF032 (#135836) 2025-01-20 08:05:33 +01:00
Norbert RittelandGitHub a67c5e1fba Change "Add …" to "Create …" for consistency (#131197) 2024-11-21 21:27:54 +01:00
G JohanssonandGitHub 6ff2ce1895 Use shorthand attribute in derivative sensor (#128610) 2024-10-18 09:33:02 +02:00
156a88a3a3 Ignore negative derivative when the input is total_increasing (#119141)
* if the derivative is negative, ignore it

* add option to ignore the negatives or not

* add tests for a new ignore negative derivative

* add missing description when editing

* rename to ignore_negative_derivative
to increase clarity of which negative I mean
in case in the future we want a ignore_negative_value...

* use state_class=total_increasing to ignore the negative derivative

* remove ignore negative from the config

* add test for total_increasing_reset case

* add comments

* update test_total_increasing_reset with history tests
Also remove the last comment because the test is already clear
My existing comment there isn't unique to this unit test but applies to the entire component. The existing web documentation pointing to Wikipedia should suffice.

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-09-16 10:49:15 +02:00
epenetandGitHub c49fce5541 Force alias when importing sensor PLATFORM_SCHEMA (#120536) 2024-06-26 12:14:13 +02:00
dougiteixeiraandGitHub 89b7bf2108 Add the ability to change the source entity of the Derivative helper (#119754) 2024-06-22 15:03:43 +02:00
Marc MuellerandGitHub 3c5089bc3f Update import for EventStateChangedData [a-h] (#114899) 2024-04-04 11:48:36 -10:00
Marc MuellerandGitHub 25237e0377 Replace EventType with Event [a-g] (#112739) 2024-03-08 19:35:17 +01:00
Marc MuellerandGitHub 0e3945ca6c Add empty line after module docstring [d-f] (#112698) 2024-03-08 14:15:26 +01:00
Joost LekkerkerkerandGitHub 0b3ed92a6e Add icon translations to derivative (#109650) 2024-02-04 23:20:46 +01:00
SLaksandGitHub 9be9bbad61 Allow selecting of counter entities in derivative/integration config flow (#105321) 2024-01-05 16:46:12 +01:00
Robert ReschandGitHub bb90c1f168 Fix multilevel reference translations (#102338) 2023-10-20 08:12:53 +02:00
Robert ReschandGitHub eab4c24f7f Fix KeyError in derivative and integration (#102294) 2023-10-19 18:22:22 +02:00
Robert ReschandGitHub 7db2fdd68c Remove "none" in favor of optional select in derivate (#101312) 2023-10-11 17:36:15 +02:00
tronikosandGitHub c70c2f4be4 Allow derivative/integration on input_number via the UI (#101439) 2023-10-06 21:27:31 +02:00
Erik MontnemeryandGitHub 045c327928 Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
Marc MuellerandGitHub 0cc396b863 Use EventType for state changed [a-h] (#97116) 2023-07-24 08:04:13 +02:00
7859be6481 Add deduplicate translations script (#96384)
* Add deduplicate script

* Fix forecast_solar incorrect key with space

* Fix utf-8

* Do not create references to other arbitrary other integrations

* Add commented code to only allow applying to referencing integrations

* Tweak

* Bug fix

* Add command line arg for limit reference

* never suggest to update common keys

* Output of script

* Apply suggestions from code review

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2023-07-13 11:52:50 -04:00
dougiteixeiraandGitHub 11146ff40b Fix device source for Derivative (#95621)
Fix Device Source
2023-06-30 14:29:44 -04:00
dougiteixeiraandGitHub 403496eb92 Add the device of the source entity in the helper entities for Derivative (#94751)
* Adds the device of the original entity in the helper entities for Derivative

* Update

* Update
2023-06-26 18:06:25 +02:00
d173590477 Remove combined translations in integrations (#91337)
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2023-04-15 15:51:04 +02:00
G JohanssonandGitHub b7cc42d135 Use RestoreSensor in derivative (#91071)
RestoreSensor
2023-04-12 08:46:55 +02:00
Erik MontnemeryandGitHub 9ab95b6348 Revert "Add state_class = MEASUREMENT to Derivative sensor (#88408)" (#88952) 2023-03-01 08:53:05 +01:00
Carlos Gustavo SarmientoandGitHub fa2e7aa592 Add state_class = MEASUREMENT to Derivative sensor (#88408)
* Add `state_class = MEASUREMENT` to Derivative sensor

One line change per title.

* Update sensor.py

* Update tests for Derivative Sensor
2023-02-20 21:57:58 +01:00
Erik MontnemeryandGitHub 87420e949d Sort manifests 2 (#87023) 2023-02-08 20:16:39 +01:00
939eef3b28 Remove translations from Core (#87543)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-02-06 15:06:43 +01:00
GitHub Action ce79b26ab6 [ci skip] Translation update 2023-02-03 00:25:31 +00:00
Franck NijhofandGitHub 5e81d28116 Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +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 0f6f63da64 [ci skip] Translation update 2023-01-29 00:26:29 +00:00
GitHub Action 7ab88fa713 [ci skip] Translation update 2023-01-26 00:23:39 +00:00
GitHub Action 9636fe4602 [ci skip] Translation update 2023-01-25 00:24:21 +00:00
Jan BouwhuisandGitHub 8d678209db Add translation support for select selectors of derivative config and option flow (#86190)
* Add translation support for derivative config flow

* Revert translation support for SI units

* Undo test changes

* Remove redundant labels
2023-01-24 13:49:07 +01:00
GitHub Action 4d215e573c [ci skip] Translation update 2023-01-23 00:23:13 +00:00
GitHub Action 5169721916 [ci skip] Translation update 2023-01-04 00:22:58 +00:00
epenetandGitHub 68857dc272 Use UnitOfTime in integrations (a-g) (#84288) 2022-12-20 13:22:20 +01:00
GitHub Action 1e0345a377 [ci skip] Translation update 2022-12-10 00:21:35 +00:00
GitHub Action 03154e1d83 [ci skip] Translation update 2022-12-03 00:21:50 +00:00
GitHub Action 230b50d099 [ci skip] Translation update 2022-11-29 00:26:01 +00:00
G JohanssonandGitHub db480191ad Strict typing derivative (#82785) 2022-11-28 15:12:22 +01:00
GitHub Action b65d8cc1b3 [ci skip] Translation update 2022-11-28 00:23:09 +00:00
Erik MontnemeryandGitHub 9995cef0f9 Pass sensor DOMAIN constant to EntitySelectorConfig (#82670) 2022-11-24 22:19:47 +01:00
epenetandGitHub 9f9114cb4a Simplify SchemaFlowStep typing (#82661)
* Simplify SchemaFlowStep typing

* Adjust accuweather
2022-11-24 21:59:41 +01:00