Commit Graph

75417 Commits (d8ae7d6955ae199589d57de6fda9e2199e6c7c38)

Author SHA1 Message Date
J. Nick Koston 13d6ebaabf
Avoid delaying automation/script startup for sample blueprints (#114277)
Avoid delaying automation/script startup to check if the blueprint folder exists

automations and script both populate sample blueprints if none exist

The check to see if the blueprint folder exists always had to create
an executor job which would delay startup a bit if the executor was
busy. Since we do not need the sample blueprints to be populated
until the start event, we can run this in a task.
2024-03-27 09:55:59 +01:00
Franck Nijhof da78dbb61f
Merge branch 'master' into dev 2024-03-27 09:43:52 +01:00
Robert Svensson 03ec1798e4
Bump aiounifi to v73 (#114278) 2024-03-27 09:43:08 +01:00
Franck Nijhof dd2d79b77e
Refactor/fix search component, including labels & floors support (#114206)
Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-03-27 09:39:05 +01:00
J. Nick Koston d8acd90370
Run recorder shutdown tasks eagerly (#113018) 2024-03-26 22:25:45 -10:00
Marc Mueller 1d2c2d2055
Move SignalTypes to util (#114236) 2024-03-27 08:41:44 +01:00
JeromeHXP fbb590ea1f
Bump ondilo_ico to 0.4.0 (#114022) 2024-03-27 08:41:11 +01:00
dependabot[bot] 4d7da61e99
Bump actions/setup-python from 5.0.0 to 5.1.0 (#114276)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-27 08:39:56 +01:00
Lenn 480b2ec84a
Add Motionblinds brand (#114235) 2024-03-27 08:02:25 +01:00
J. Nick Koston 1697b116e4
Combine tts cache init executor jobs (#114271) 2024-03-26 23:58:46 -04:00
tronikos a6fabdc115
Fix Opower accounts that report cost less regularly than usage (#114034)
* Update coordinator.py

* Update coordinator.py
2024-03-26 17:20:16 -04:00
Michael Hansen 72fed878b4
Add Ollama conversation agent (#113962)
* Add ollama conversation agent

* Change iot class

* Much better default template

* Slight adjustment to prompt

* Make casing consistent

* Switch to ollama Python fork

* Add prompt to tests

* Rename to "ollama"

* Download models in config flow

* Update homeassistant/components/ollama/config_flow.py

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-03-26 16:15:20 -05:00
Jan-Philipp Benecke f94f1fb826
Use `setup_test_component_platform` func for number entity component tests instead of `hass.components` (#114017)
* Use `setup_test_component_platform` fixture for number entity component tests instead of `hass.components`

* Now function

* Ruff format
2024-03-26 21:56:38 +01:00
Jan-Philipp Benecke e80d73783c
Do not late import config_entry in `setup_test_component_platform` test helper (#114260) 2024-03-26 21:54:09 +01:00
J. Nick Koston a0d43aeba2
Remove unused code in ESPHome entry_data (#114263) 2024-03-26 10:32:16 -10:00
J. Nick Koston 6599b9a36d
Restore scapy pin to >=2.5.0 (#114253) 2024-03-26 10:31:52 -10:00
J. Nick Koston 2649dfaa11
Fix ruff-format on energy sensor (#114261) 2024-03-26 10:05:55 -10:00
Mr. Bubbles 8955ef7fc6
Bump bring-api to 0.5.7 (#114252) 2024-03-26 20:53:45 +01:00
J. Nick Koston f982473e53
Small performance improvements to energy sensors (#114149) 2024-03-26 09:40:06 -10:00
Franck Nijhof 9a32d1bbd5
Add label selector (#111029)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-03-26 20:31:06 +01:00
Jan-Philipp Benecke dce3bde0ab
Use `setup_test_component_platform` helper for update entity component tests instead of `hass.components` (#114203)
* Use `setup_test_component_platform` helper for update entity component tests instead of `hass.components`

* Run ruff format
2024-03-26 20:20:08 +01:00
Franck Nijhof 9a1906322b
Allow numeric state trigger/condition against zone entities (#114221) 2024-03-26 19:41:46 +01:00
Ron Weikamp e1036b3af0
Refactor Riemann sum integral sensor to prepare for time based trigger (#113932)
* Refactor Integration sensor.

* Use local simple function to verify the State is numeric.

* Merge two methods to one.

* Method renaming: _handle_state_change

* Move async_write_ha_state to the caller.

* Add comment on why attr_icon is set to None

* Remove possible None type of State in validation methods.

* Use a dict to map method name to method class.

* Explain derived unit after integration.

* Renaming to _multiply_unit_with_time and elaborate in docstring.

* Set integral unit_of_measurement explicitly to None if source unit_of_measurement is None

* One function for unit of measurement related steps.

* Improve docstring of _multiply_unit_with_time

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

* Apply f-string suggestions from code review

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

* Be more clear in comment about removing the sensors icon default.

* Apply suggestions from code review

Co-authored-by: Diogo Gomes <diogogomes@gmail.com>

* Update homeassistant/components/integration/sensor.py

* Update homeassistant/components/integration/sensor.py

* Update homeassistant/components/integration/sensor.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Diogo Gomes <diogogomes@gmail.com>
2024-03-26 19:09:48 +01:00
Franck Nijhof c247534731
Default floor level to None (and allow unsetting it) (#114249) 2024-03-26 18:58:25 +01:00
Marc Mueller c8260a5966
Remove test cases for task eager_start <3.12 (#114243) 2024-03-26 15:52:38 +01:00
Lenn 53944b260c
Bump motionblindsble to 0.0.9 (#114232) 2024-03-26 08:17:29 -04:00
Franck Nijhof 2388e2dda9
Drop Python 3.11 support (#114220) 2024-03-26 12:51:14 +01:00
Marc Mueller 31f5576b6e
Add ruff commit to git-blame-ignore-revs (#114229) 2024-03-26 12:16:55 +01:00
Marc Mueller eb81a4204e
Allow string formatting for dispatcher SignalType (#114174) 2024-03-26 10:38:29 +01:00
Erik Montnemery dd43947ca0
Add test to ensure non callback event filter is rejected (#114182) 2024-03-26 10:36:08 +01:00
Erik Montnemery bac527f289
Don't allow listening to state_reported in event triggers (#114191)
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2024-03-26 10:35:47 +01:00
Duco Sebel 788813aad6
Implement Identify button and Cloud connection toggle for HomeWizard Watermeter (#113814) 2024-03-26 10:34:36 +01:00
Franck Nijhof 5c69e0d2c6
Add label template functions (#111024) 2024-03-26 10:32:29 +01:00
Cyrill Raccaud e136847b89
Add more timestamp sensors to swiss_public_transport (#107916)
* add more timestamp sensors

* more generic definition for future sensors

* add entity descriptor

* use enable property to prevent sensors from getting added

* set legacy attribute flag for first sensor

* remove departure from extra attributes

* remove breaking changes again and keep for next pr

* fix multiline statements

* outsource the multiline ifs into function

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-26 10:17:25 +01:00
Robert Resch 0338aaf577
Allow pre-releases for "Adjust nightly version" only (#114219) 2024-03-26 10:05:13 +01:00
Joost Lekkerkerker ddee999843
Fix motion blinds formatting (#114222) 2024-03-26 09:57:19 +01:00
Lenn 70c4fa8475
Add Motionblinds BLE integration (#109497)
* initial fork

* intial tests

* Initial test coverage

* extra coverage

* complete config flow tests

* fix generated

* Update CODEOWNERS

* Move logic to PyPi library and update to pass config_flow test and pre-commit

* Remove Button, Select and Sensor platform for initial PR

* Update manifest.json

* Change info logs to debug in cover

* Use _abort_if_unique_id_configured instead of custom loop checking existing entries

* Change platforms list to PLATFORMS global

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Remove VERSION from ConfigFlow

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Replace all info logs by debug

* Use instance attributes in ConfigFlow

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Add return type and docstring to init in ConfigFlow

* Add recovery to tests containing errors

* Make NoBluetoothAdapter and NoDevicesFound abort instead of show error

* Change info logs to debug

* Add and change integration type from hub to device

* Use CONF_ADDRESS from homeassistant.const

* Move cover attributes initialization out of constructor

* Change CONF_ADDRESS in tests from const to homeassistant.const

* Remove unused part of tests

* Change 'not motion_device' to 'motion_device is None'

* Change _attr_connection_type to _connection_type

* Add connections to DeviceInfo

* Add model to DeviceInfo and change MotionBlindType values

* Remove identifiers from DeviceInfo

* Move constants from const to library

* Move calibration and running to library, re-add all platforms

* Remove platforms from init

* Remove button platform

* Remove select platform

* Remove sensor platform

* Bump motionblindsble to 0.0.4

* Remove closed, opening and closing attribute default values

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Remove CONFIG_SCHEMA from init

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Remove unused platform attributes and icons

* Re-add _attr_is_closed to GenericBlind to fix error

* Use entry.async_create_background_task for library instead of entry.async_create_task

* Move updating of position on disconnect to library

* Remove type hints, keep for _attr_is_closed

* Use DISPLAY_NAME constant from library for display name

* Add TYPE_CHECKING condition to assert in config_flow

* Re-add CONFIG_SCHEMA to __init__ to pass hassfest

* Change FlowResult type to ConfigFlowResult

* Fix import in tests

* Fix ruff import

* Fix tests by using value of enum

* Use lowercase name of MotionBlindType enum for data schema selector and translation

* Fix using name instead of value for MotionBlindType

* Improve position None handling

Co-authored-by: starkillerOG <starkiller.og@gmail.com>

* Improve tilt None handling

Co-authored-by: starkillerOG <starkiller.og@gmail.com>

* Change BLIND_TO_ENTITY_TYPE name

* Set entity name of cover to None and use DeviceInfo name

* Add base entity

* Move async_update to base entity

* Move unique ID with suffix to base class

* Add entity.py to .coveragerc

* Remove extra state attribute connection type

* Remove separate line hass.data.setdefault(DOMAIN, {})

* Remove use of field for key and translation_key in MotionCoverEntityDescription

* Remove entity translation with extra state_attributes from strings.json

* Use super().__init__(device, entry)

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Change if block in async_update_running

* Use if blocks in async_update_position

* Add additional scanner check before show_form

* Remove default value of device_class in MotionCoverEntityDescription

* Fix entry.data[CONF_BLIND_TYPE] uppercase

* Fix device info model name

* Bump motionblindsble to 0.0.5

* Fix tests

* Move entity_description to MotionblindsBLEEntity

* Change double roller blind name

* Bump motionblindsble to 0.0.6

* Fix ruff

* Use status_query for async_update

* Bump motionblindsble to 0.0.7

* Change bluetooth local name

* Set kw_only=True for dataclass

* Change name of GenericBlind

* Change scanner_count conditional

* Wrap async_register_callback in entry.async_on_unload

* Bump motionblindsble to 0.0.8

* Use set_create_task_factory and set_call_later_factory

* Update bluetooth.py generated

* Simplify COVER_TYPES dictionary

* Move registering callbacks to async_added_to_hass

* Remove check for ATTR_POSITION and ATTR_TILT_POSITION in kwargs

* Add naming consistency for device and entry

* Use if block instead of ternary for _attr_unique_id

* Improve errors ternary in config_flow

* Use set instead of list for running_type

* Improve errors ternary in config_flow

* Remove init from MotionblindsBLECoverEntity and move debug log to async_added_to_hass

* Update debug log create cover

* Fix ruff

* Use identity check instead of equals

* Use identity check instead of equals

* Change MotionblindsBLECoverEntityDescription name

* Change debug log text

* Remove ATTR_CONNECTION from const

* Add types for variables in async_setup_entry

* Add types for variables in async_setup_entry

* Change PositionBlind class name to PositionCover etc

* Improve docstrings

* Improve docstrings

---------

Co-authored-by: starkillerOG <starkiller.og@gmail.com>
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-26 09:52:04 +01:00
Arie Catsman b9fdd56f01
Bump pyenphase to 1.20.1 (#114218) 2024-03-25 22:42:19 -10:00
Matrix 63b4fd09c1
Add YoLink Water Meter Support (#114148)
* Add YS-5006/5007/5008 Water Meter Support

* Add YoLink Water Meter Support

* Update .coveragerc

* fix as suggestion
2024-03-26 09:29:14 +01:00
J. Nick Koston 54a69a2687
Remove async_get_device_class_lookup from entity_registry (#114212)
This function was only ever used in homekit, and since there is
now an index of devices in the entity registry, homekit no longer
uses it.

I searched github code for all references to async_get_device_class_lookup
and the only think I could find using it were forks of core. It seems
unlikely that any custom components are affected by removing this
function
2024-03-26 09:22:53 +01:00
Robert Svensson 3f545cb3d3
Rework Axis entity loader to have a better internal storage structure (#114114)
* Make one single subscribe containing all topics at once

* Update homeassistant/components/axis/hub/entity_loader.py

Co-authored-by: J. Nick Koston <nick@koston.org>

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 07:55:07 +01:00
Marc Mueller d0ecad78ac
Revert "Update typing-extensions to 4.11.0rc1 (#114116)" (#114216) 2024-03-25 20:44:57 -10:00
J. Nick Koston cabc4f797a
Preload storage for integrations we know we are going to setup (#114192) 2024-03-25 15:49:54 -10:00
J. Nick Koston 345fa75562
Bump SQLAlchemy to 2.0.29 (#114208) 2024-03-25 14:39:16 -10:00
Jan-Philipp Benecke 9580adfde9
Use new `setup_test_component_platform` helper instead of test fixture for light platform (#114200) 2024-03-26 00:17:16 +01:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
J. Nick Koston 27219b6962
Bump anyio to 4.3.0 (#114198) 2024-03-25 23:52:28 +01:00
Jan-Philipp Benecke 2f0cfc8b61
Remove deprecated `hass.components` from system_health tests (#114207) 2024-03-26 00:39:31 +02:00
Jan Bouwhuis 18174ad47d
Improve test coverage mqtt discovery test (#114188) 2024-03-25 22:41:11 +01:00
Shay Levy 121182167f
Fix Shelly reauth flow (#114180)
* Fix Shelly reauth flow

* Rename shutdown_device to async_shutdown_device
2024-03-25 23:27:44 +02:00