Commit Graph

737 Commits (7433d2eca998a20a1d79b84ece81fdda76a4da48)

Author SHA1 Message Date
epenet c81d104822
Sort values in Platform enum (#126259) 2024-09-19 13:12:37 +02:00
Sergey Dudanov dcd7830a35
Add calories to energy sensor device class (#122796)
* added calories to energy class

* changes

* temporarily solving the problem with conversion accuracy

* add tests

* added calories to energy class

* changes

* add tests

* Update homeassistant/util/unit_conversion.py

Co-authored-by: Robert Resch <robert@resch.dev>

* Update homeassistant/util/unit_conversion.py

Co-authored-by: Robert Resch <robert@resch.dev>

* apply suggestions

* Update homeassistant/util/unit_conversion.py

---------

Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-09-10 12:22:15 +02:00
karwosts 056e6eae82
Add a syntax for merging lists of triggers (#117698)
* Add a syntax for merging lists of triggers

* Updating to the new syntax

* Update homeassistant/helpers/config_validation.py

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

* fix suggestion

* update test and add comments

* not actually json

* move test to new file

* update tests

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-09-09 13:51:32 +02:00
Michael Hansen 60b0f0dc53
Add assist satellite entity component (#125351)
* Add assist_satellite

* Update homeassistant/components/assist_satellite/manifest.json

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Update homeassistant/components/assist_satellite/manifest.json

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Add platform constant

* Update Dockerfile

* Apply suggestions from code review

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

* Address comments

* Update docstring async_internal_announce

* Update CODEOWNERS

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-09-05 21:16:30 -04:00
Robert Resch 2dce876a86
Bump version to 2024.10.0dev0 (#124808) 2024-08-28 18:51:50 +02:00
G Johansson dd52f4c84a
Remove deprecated mailbox platform (#123740)
* Remove deprecated mailbox platform

* Remove from const

* Remove from type hints

* Remove from pyproject
2024-08-28 16:41:23 +02:00
Christian Neumeier 3e53cc175f
Change POWER_VOLT_AMPERE_REACTIVE to UnitOfReactivePower (#117153)
* Refactoring: exchange POWER_VOLT_AMPERE_REACTIVE with UnitOfReactivePower

* updated iotawatt and mysensors from VOLT_AMPERE_REACTIVE to UnitOfReactivePower.VOLT_AMPERE_REACTIVE

* deprecation period for POWER_VOLT_AMPERE_REACTIVE changed to one year.

* POWER_VOLT_AMPERE_REACTIVE changed to UnitOfReactivePower in blebox integration

* Update homeassistant/const.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-08-21 15:36:45 +02:00
Maciej Bieniek a9d8e47979
Support `DeviceInfo.model_id` in MQTT integration (#123152)
Add support for model_id
2024-08-04 23:02:41 +02:00
Franck Nijhof bdd6f57975
Bump version to 2024.9.0dev0 (#122975) 2024-07-31 23:24:30 +02:00
Franck Nijhof 8b96c7873f
Rename 'service' to 'action' in automations and scripts (#122845) 2024-07-31 14:36:53 +02:00
Franck Nijhof 33b4f40b2a
Bump version to 2024.8.0dev0 (#120577) 2024-06-26 16:55:08 +02:00
Erik Montnemery d589eaf440
Simplify EVENT_STATE_REPORTED (#120508) 2024-06-26 11:23:26 +02:00
dontinelli 0dd5391cd7
Add Siemes and Millisiemens as additional units of conductivity and enable conversion between conductivity units (#118728) 2024-06-21 11:10:15 +02:00
Franck Nijhof eca8dd93c5
Bump version to 2024.7.0dev0 (#118399) 2024-05-29 20:54:49 +02:00
J. Nick Koston 33ff84469a
Align max expected entities constant between modules (#118102) 2024-05-27 14:06:16 -10:00
J. Nick Koston e12d23bd48
Speed up async_get_loaded_integrations (#117851)
* Speed up async_get_loaded_integrations

Use a setcomp and difference to find the components to split
to avoid the loop. A setcomp is inlined in python3.12 so its
much faster

* Speed up async_get_loaded_integrations

Use a setcomp and difference to find the components to split
to avoid the loop. A setcomp is inlined in python3.12 so its
much faster

* simplify

* fix compat

* bootstrap

* fix tests
2024-05-21 09:08:49 -04:00
Denis Shulyaka c3196a5667
LLM Tools support for Google Generative AI integration (#117644)
* initial commit

* Undo prompt chenges

* Move format_tool out of the class

* Only catch HomeAssistantError and vol.Invalid

* Add config flow option

* Fix type

* Add translation

* Allow changing API access from options flow

* Allow model picking

* Remove allowing HASS Access in main flow

* Move model to the top in options flow

* Make prompt conditional based on API access

* convert only once to dict

* Reduce debug logging

* Update title

* re-order models

* Address comments

* Move things

* Update labels

* Add tool call tests

* coverage

* Use LLM APIs

* Fixes

* Address comments

* Reinstate the title to not break entity name

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-05-19 22:11:25 -04:00
Marc Mueller c50a340cbc
Use HassKey for setup and bootstrap (#116998) 2024-05-07 11:18:20 -05:00
Franck Nijhof f2fe62d159
Bump version to 2024.6.0dev0 (#116120) 2024-04-24 23:16:48 +02:00
J. Nick Koston 53a179088f
Add debug mode to catch unsafe thread operations using core helpers (#115390)
* adjust

* adjust

* fixes

* one more

* test

* debug

* move to config

* cover

* Update homeassistant/core.py

* set debug from RuntimeConfig

* reduce

* fix message

* raise

* Update homeassistant/core.py

* Update homeassistant/core.py

* no flood check for raise

* cover
2024-04-24 03:36:05 +02:00
Marc Mueller 6116f11e6c
Use EventType for system events (#115190) 2024-04-08 08:25:34 -10:00
Paulus Schoutsen f9a7e6bb9f
Add migration logic to assist_pipeline (#115172) 2024-04-08 11:29:55 -04:00
Marc Mueller a0e6fd6ec5
Add improved typing for event fire and listen methods (#114906)
* Add EventType implementation

* Update integrations for EventType

* Change state_changed to EventType

* Fix tests

* Remove runtime impact

* Add tests

* Move to stub file

* Apply pre-commit to stub files

* Fix ruff PYI checks

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-07 13:28:24 -10:00
Franck Nijhof 3d4733a026
Bump version to 2024.5.0dev0 (#114324) 2024-03-27 19:43:38 +01:00
Marc Mueller 1d2c2d2055
Move SignalTypes to util (#114236) 2024-03-27 08:41:44 +01:00
Franck Nijhof 2388e2dda9
Drop Python 3.11 support (#114220) 2024-03-26 12:51:14 +01:00
Erik Montnemery 426f73b1f4
Add State.last_reported (#113511)
* Add State.last_reported

* Update tests

* Update test snapshots

* Call state_reported listeners when firing state_changed event

* Add tests
2024-03-20 21:05:07 +01:00
Franck Nijhof 167e66d45c
Add labels to service target (#113753) 2024-03-18 22:32:23 +01:00
Erik Montnemery a5cde8a61e
Improve typing of State.as_compressed_state (#113540) 2024-03-16 00:01:46 -04:00
Franck Nijhof 2aadd643ed
Add floors to service target (#110850) 2024-03-14 19:02:23 +01:00
Marc Mueller 19ab3d6daf
Add empty line after module docstring [helpers + other] (#112707) 2024-03-08 10:36:11 -05:00
fwestenberg 385b29bdf5
Add Beaufort to wind_speed (#105795)
* Add Beaufort to wind_speed

* Add Bft to UnitOfSpeed

* Update tests with Bft

* Remove check for unit

* Fix test_deprecated_constants

* Test depricated constant Beaufort

* Fix test_unit_system.py for Beaufort

* Remove _DEPRECATED_SPEED_FEET_BEAUFORT

* Remove maxsize from lru_cache

* Update test_deprecated_constants

* Update comment

* Add missing docstring

* Apply suggestions from code review

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-03-05 14:55:59 +01:00
J. Nick Koston 5bf7a00989
Move DATA_LOGGING constant to homeassistant.const (#111763) 2024-02-28 14:09:51 -10:00
Bram Kragten 09c16ffb3d
Bump version to 2024.4.0.dev0 (#111755) 2024-02-29 00:46:32 +01:00
Franck Nijhof d1c61c911d
Bump version to 2024.3.0dev0 (#109238) 2024-01-31 22:05:13 +01:00
Joakim Plate cece117c93
Flow rate unit conversions and device class (#106077)
* Add volume flow rate conversions

* Add missing translations

* Adjust liter unit and add gallons per minute

* Adjust to min instead of m for minutes

* Add matching class for number

* Add some tests for number and sensor platform

* Add deprecated constants

* Add explicit list of flow rate for check

This reverts commit 105171af31.
2024-01-30 15:01:08 +01:00
Erik Montnemery 9bff039d17
Add set_conversation_response script action (#108233)
* Add set_conversation_response script action

* Update homeassistant/components/conversation/trigger.py

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

* Revert accidental change

* Add test

* Ignore mypy

* Remove incorrect callback decorator

* Update homeassistant/helpers/script.py

* Add test with templated set_conversation_response

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-01-23 09:13:42 -05:00
Franck Nijhof 0a758882e1
Deprecate Python 3.11 (#108160) 2024-01-16 22:07:22 +01:00
Jan Bouwhuis 1a4d1907c9
Make ATTR_SERIAL_NUMBER a generic homeassistant constant (#108106) 2024-01-15 20:33:15 +01:00
Erik Montnemery c805ea7b4f
Include deprecated constants in wildcard imports (#107114) 2024-01-05 11:46:45 +01:00
Erik Montnemery 9eefd95e91
Deduplicate handling of duplicated constants (#107074)
* Deduplicate handling of duplicated constants

* Use DeprecatedConstant + DeprecatedConstantEnum

* Fixup

* Remove test cases with unnamed tuples
2024-01-04 13:25:09 +01:00
Franck Nijhof 7ad44a02b7
Bump version to 2024.2.0dev0 (#106504) 2023-12-28 02:08:16 +01:00
Robert Resch fbcb31b103
Deprecate deprecated unit of measurement constants (#106455) 2023-12-27 09:04:25 +01:00
Robert Resch ebdf7b9c8c
Deprecate some deprecated const constants (#106230)
* Deprecate some deprecated const constants

* Improve code

* fix typing

* Apply suggestions from code review

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-12-23 20:18:51 +01:00
Miguel Camba 5175737b60
Add Valve integration (#102184)
* Add Valve integration.

This adds the valve integration discussed in https://github.com/home-assistant/architecture/discussions/975
Most of the code is taken from the cover integration but simplified since valves
can't tilt.

There are a couple outstanding errors I'm not sure how to solve and prevents
me from even making this commit without `--no-verify`.

* Apply PR feedback

* Apply more feedback: Intruduce the bare minimum

* Remove file commited by mistake

* Hopefully this fixes tests

* Match cover's typing and mypy settings

* Change some configuration files

* Fix test

* Increase code coverage a little

* Code coverate inproved to 91%

* 95% code coverage

* Coverate up to 97%

* Coverage 98%

* Apply PR feedback

* Even more feedback

* Add line I shouldn't have removed

* Derive closed/open state from current position

* Hopefully last feedback

* Update homeassistant/components/valve/__init__.py

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

* Update homeassistant/components/valve/__init__.py

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

* Remove unnecesary translation

* Remove unused method arguments

* Complete code coverage

* Update homeassistant/components/valve/__init__.py

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

* Simplify tests

* Update homeassistant/components/valve/__init__.py

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

* Apply last feedback

* Update tests/components/valve/test_init.py

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

* Update tests/components/valve/test_init.py

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

* Update tests/testing_config/custom_components/test/valve.py

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

* More feedback

* Apply suggestion

* And more feedback

* Apply feedback

* Remove commented code

* Reverse logic to unindent

* Update homeassistant/components/valve/__init__.py

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

* Update homeassistant/components/valve/__init__.py

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

* Implement stop valve for Mock valve

* Fix tests now that I've implemented stop_valve

* Assert it's neither opening nor closing

* Use current position instead

* Avoid scheduling executor when opening or closing

* Fix incorrect bitwise operation

* Simplify toggle

* Remove uneeded partial functions

* Make is_last_toggle_direction_open private

* Remove valve from test custom integration

* Improve test coverage

* Address review comments

* Address review comments

* Address review comments

* Update homeassistant/components/valve/__init__.py

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

* Update tests

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
2023-12-18 19:48:00 +01:00
Joost Lekkerkerker e4453ace88
Add country code constant (#105640) 2023-12-13 16:50:46 +01:00
Franck Nijhof 0a98a648bb
Bump version to 2024.1.0dev0 (#104746) 2023-11-29 21:29:11 +01:00
Franck Nijhof f28c9221e6
Bump version to 2023.12.0dev0 (#102798) 2023-10-25 20:37:16 +02:00
Allen Porter 5d430f53cd
Add todo component (#100019) 2023-10-23 22:53:00 +02:00
Erik Montnemery 7a009ed6cd
Don't duplicate core services in hassio (#102593) 2023-10-23 20:26:56 +02:00