Commit Graph

20480 Commits (61a359e4d21140b7147abd006e07ee70689110b4)

Author SHA1 Message Date
J. Nick Koston d4b180cf75
Fix flapping device_tracker test_bad_platform test (#114102)
https://github.com/home-assistant/core/actions/runs/8408079861/job/23023835074
2024-03-24 13:23:12 +01:00
Robert Svensson 2e2b40f77e
Add reconfigure flow to Axis integration (#114067) 2024-03-24 12:48:19 +01:00
Dave T 579084a21e
Add more sensors to aurora_abb_powerone (part 2) (#114097) 2024-03-24 11:04:12 +00:00
Floris272 d14a442ac3
Improve blue current integration code (#114004) 2024-03-23 22:35:53 -10:00
J. Nick Koston e8cb6a8e29
Optimize loading of translations (#114089) 2024-03-23 22:22:09 -10:00
J. Nick Koston 4ac439ef88
Migrate nut to use aionut (#114078) 2024-03-23 12:02:02 -10:00
G Johansson d4f158d079
Add reconfigure step to holiday (#114057) 2024-03-23 22:55:05 +01:00
Dave T c82c295eed
Add more sensors to aurora_abb_powerone (#114074) 2024-03-23 21:52:22 +00:00
Joost Lekkerkerker ce12d45b50
Catch Mill timeout error (#114068)
* Catch Mill timeout error

* Catch Mill timeout error

* Catch Mill timeout error
2024-03-23 20:57:22 +01:00
J. Nick Koston 82016ff528
Refactor recorder states tests (#114073)
https://github.com/home-assistant/core/pull/113985#discussion_r1536596573
2024-03-23 15:41:12 -04:00
J. Nick Koston 4f18f0d902
Fix setup timings when config entry platform loads are not awaited (#113959)
* Move setup time logging into the context manager

We were fetching the time twice but since the context
manager already has the timing, move it there

* remove log setup assertions from integration test

* tweak logging to give us better data for tracking issues

* redundant

* adjust

* preen

* fixes

* adjust

* make api change internal so nobody uses it

* coverage

* fix test

* fix more tests

* coverage

* more tests assuming internal calls

* fix more

* adjust

* adjust

* fix axis tests

* fix broadlink -- it does not call async_forward_entry_setup

* missed some

* remove useless patch

* rename, detect it both ways

* clear

* debug

* try to fix

* handle phase finishing out while paused

* where its set does not need to know its late as that is an implemenation detail of setup

* where its set does not need to know its late as that is an implemenation detail of setup

* tweak

* simplify

* reduce complexity

* revert order change as it makes review harder

* revert naming changes as it makes review harder

* improve comment

* improve debug

* late dispatch test

* test the other way as well

* Update setup.py

* Update setup.py

* Update setup.py

* simplify

* reduce
2024-03-23 15:26:38 -04:00
Jan Bouwhuis a4f52cc622
Use a constant to reference `homeassistant` domain (#113889)
* Use CONF_CORE to reference `homeassistant` domain

* Just use DOMAIN

* USE DOMAIN for `homeasistant` domain in config_schema.py

* Use DOMAIN_HA as constant for homeassistant domain

* Rename CONF_CORE to DOMAIN_HA

* Rename DOMAIN_HA to HA_DOMAIN

* Use relative import

* Use direct imports
2024-03-23 19:58:39 +01:00
On Freund c661622332
Add Risco system binary sensors (#114062)
* Add Risco system binary sensors

* Remove leading underscore

* Address code review commments
2024-03-23 19:35:12 +01:00
G Johansson 7b0abb00aa
Show correct ipv6 address in System Monitor (#114024) 2024-03-23 11:24:17 +01:00
J. Nick Koston 31fb02a71d
Fix after deps not being considered for integrations before stage 1 (#114045) 2024-03-23 11:21:56 +01:00
J. Nick Koston ac80d38871
Fix flakey stream hls test (#114046) 2024-03-23 11:11:42 +01:00
G Johansson ebe6c35b4c
Smhi add reconfigure step to config flow (#114044)
* Add reconfigure step to SMHI

* Check location

* Add test

* Add test entity and device
2024-03-23 11:01:59 +01:00
kingy444 c2771791a3
Add Powerview Type 11 (#114047) 2024-03-22 17:09:36 -10:00
J. Nick Koston 952f47ab18
Combine recorder and frontend bootstrap step (#113985) 2024-03-22 13:50:39 -10:00
Robert Svensson bf8d880e5f
Improve axis tests (#114035)
* Combine binary sensor tests into more logical groups

* Improve light tests

* Clean up switch tests

* Improve typing in conftest

* Add typing to camera

* Improve binary sensor

* Improve light

* Improve switch
2024-03-23 00:44:06 +01:00
kingy444 26b6bd83fc
Move powerview timeout logic to the upstream api (#113984) 2024-03-22 13:38:33 -10:00
Marc Mueller efc54971d3
Update empty line formatting after module docstring (#114040) 2024-03-23 00:27:57 +01:00
Marc Mueller 1dbc94162d
Update byte string formatting (2) (#114039) 2024-03-23 00:22:15 +01:00
alexsydell 9e86f82a1b
Add ecobee indefinite away preset, remove unusable/broken presets (#108636)
* Add ecobee indefinite away preset, remove unusable/broken presets

* Revert cleanup of presets which no longer work
2024-03-22 22:45:54 +01:00
Robert Svensson d3c68303b0
Improve deCONZ test_non_color_light_reports_color (#114021) 2024-03-22 22:18:22 +01:00
Arie Catsman 205c457a77
Add home battery storage entities for enphase_envoy (#114015) 2024-03-22 08:46:39 -10:00
Jan-Philipp Benecke cd0c9e1c4f
Remove deprecated `hass.components` from conversation tests and use light setup fixture (#114012) 2024-03-22 17:52:10 +01:00
Jan-Philipp Benecke 01acbc8bba
Remove deprecated `hass.components` from zeroconf tests (#114013) 2024-03-22 17:51:39 +01:00
Jan-Philipp Benecke edc19328c0
Remove deprecated `hass.components` from scene tests (#114014) 2024-03-22 17:48:53 +01:00
Jan-Philipp Benecke 08529b3806
Remove deprecated `hass.components` from frontend tests (#114011) 2024-03-22 17:35:43 +01:00
Duco Sebel cad3be8213
Add new HomeWizard Energy Socket to tests (#113406) 2024-03-22 16:48:27 +01:00
G Johansson 7df0d3b140
Remove hourly weather entity from NWS (#112503) 2024-03-22 16:32:29 +01:00
G Johansson 4fb11dc4f3
Remove hourly weather entity from Aemet (#110764) 2024-03-22 16:31:43 +01:00
Duco Sebel 48553ece68
Remember entered IP when error happend while setting up HomeWizard (#113815) 2024-03-22 16:10:03 +01:00
Robert Svensson a9e857202d
Axis use entity descripton binary sensor platform (#113705) 2024-03-22 15:49:51 +01:00
Jan Bouwhuis 9ca253213c
Correct HomeAssistantError __str__ implementation and test (#113991)
Correct HomeAssistant sub class implementation and test
2024-03-22 13:39:36 +01:00
Joakim Sørensen a2143a7c1a
Return default repairs flow for cloud TTS issues (#113981)
* Set TTS repairs as not fixable

* Return default confirm flow for fixable cloud issues

* Depend on repairs

* Test default repair flow

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-22 11:20:47 +01:00
Erik Montnemery 79f2eaaf41
Deprecate the panel_iframe integration (#113410)
* Deprecate the panel_iframe integration

* Address review comments

* Customize issue text

* Update test
2024-03-22 02:48:52 +01:00
Jan Bouwhuis 4da701a8e9
Add guard to HomeAssistantError `__str__` method to prevent a recursive loop (#113913)
* Add guard to HomeAssistantError `__str__` method to prevent a recursive loop

* Use repr of class instance instead

* Apply suggestion to explain __str__ method is missing

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-21 23:12:25 +01:00
Dave T a6d98c1857
Improve user error messages for generic camera (#112814)
* Generic camera: Insufficient error message when configuration fails
Fixes #112279

* Add tests

* Fix typo in string

* Add new error strings to options flow.

* Group and improve error strings following PR review
2024-03-21 21:54:45 +00:00
J. Nick Koston 9a863638f6
Avoid writing HomeKit state to disk unless its missing (#111970) 2024-03-21 09:19:55 -10:00
Shay Levy 63275d61a5
Add Shelly RGB/RGBW profiles support (#113808)
* Add Shelly RGB/RGBW profiles support

* Update homeassistant/components/shelly/light.py

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* Use walrus in rgbw_key_ids

* Use walrus in light_key_ids

---------

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2024-03-21 21:04:50 +02:00
Simone Chemelli 8728057b1b
Add support for Shelly RPC devices custom TCP port (#110860)
* First coding

* add port to config_entry + gen1 not supported msg

* fix async_step_credentials

* strings

* fix reauth

* fix visit device link

* increased MINOR_VERSION

* apply review comments

* align to latest aioshelly

* missing tests

* introduce port parameter

* update tests

* remove leftover

* remove "port" data_description key

* missing key

* apply review comments

* apply more review comments

* Add tests

* apply review comment

* apply review comment (part 2)

* description update

* fine tuning description

* fix test patching

---------

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2024-03-21 19:58:56 +01:00
J. Nick Koston 8141a246b0
Remove unrelated patching from scrape test (#113951)
https://github.com/home-assistant/core/pull/105516#discussion_r1534459365

The fixture already is designed to go unavailable on the 3rd update
2024-03-21 19:54:24 +01:00
Thomas55555 63221356f6
Add select platform to Husqvarna Automower (#113816)
* Add select platform to Husqvarna Automower

* docstring

* address review

* pin headlight_modes list

* Apply suggestions from code review

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

* Apply review

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-21 17:07:09 +01:00
G Johansson 9289fa23a1
Add availability to Scrape config flow (#105516) 2024-03-21 13:13:25 +01:00
Josef Zweck e5fa6f0176
Add Bluetooth support to La Marzocco integration (#108287)
* init

* init tests

* linting

* checks

* tests, linting

* pylint

* add tests

* switch tests

* add water heater tests

* change icons

* extra args cleanup

* moar tests

* services tests

* remove extra platforms

* test for unique id

* back to single instance

* add diagnostics

* remove extra platforms

* test for unique id

* back to single instance

* Add better connection management for Idasen Desk (#102135)

* Return 'None' for light attributes when off instead of removing them (#101946)

* Bump home-assistant-bluetooth to 1.10.4 (#102268)

* Bump orjson to 3.9.9 (#102267)

* Bump opower to 0.0.37 (#102265)

* Bump Python-Roborock to 0.35.0 (#102275)

* Add CodeQL CI Job (#102273)

* Remove unused dsmr sensors (#102223)

* rebase messed up conftest

* more tests for init

* add client to coveragerc

* add client to coveragerc

* next lmcloud version

* strict typing

* more typing

* allow multiple machines

* remove unneeded var

* Update homeassistant/components/lamarzocco/coordinator.py

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

* Update homeassistant/components/lamarzocco/diagnostics.py

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

* Update homeassistant/components/lamarzocco/__init__.py

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

* PR suggestions

* remove base exception

* Update manifest.json

* update lmcloud

* update lmcloud

* remove ignore

* selection bugfix for machines with space in name

* bugfix temps

* add options flow

* send out full user input

* remove options flow

* split the tests to avoid timeouts

* use selectoptionsdict for selection

* removing rccoleman

* improve test coverage to 100%

* Update config_flow.py

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

* Update config_flow.py

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

* Update config_flow.py

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

* autoselect cloud machine for discovered machine

* move default values to 3rd party lib

* bring property changes from lmcloud

* moving things to lmcloud

* move validation to method

* move more things to lmcloud

* remove unused const

* Update homeassistant/components/lamarzocco/coordinator.py

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

* Update homeassistant/components/lamarzocco/coordinator.py

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

* Update homeassistant/components/lamarzocco/__init__.py

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

* Update homeassistant/components/lamarzocco/__init__.py

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

* remove callback from coordinator

* remove waterheater, add switch

* improvement to background task

* next lmcloud

* adapt to lib changes

* Update homeassistant/components/lamarzocco/strings.json

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

* Update homeassistant/components/lamarzocco/entity.py

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

* Update homeassistant/components/lamarzocco/entity.py

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

* Update homeassistant/components/lamarzocco/switch.py

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

* Update homeassistant/components/lamarzocco/switch.py

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

* Update homeassistant/components/lamarzocco/entity.py

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

* Update homeassistant/components/lamarzocco/strings.json

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

* requested changes

* Update homeassistant/components/lamarzocco/switch.py

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

* Update homeassistant/components/lamarzocco/entity.py

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

* Update tests/components/lamarzocco/test_config_flow.py

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

* Update tests/components/lamarzocco/test_config_flow.py

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

* some requested changes

* changes

* requested changes

* move steam boiler to controls

* fix: remove entities from GS3MP model + tests

* remove dataclass decorator

* next lmcloud version

* improvements

* move reauth to user step

* improve config flow

* remove asserts in favor of runtimeerrors

* undo conftest comment

* make duc return none

* Update homeassistant/components/lamarzocco/switch.py

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

* Update homeassistant/components/lamarzocco/entity.py

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

* Update homeassistant/components/lamarzocco/config_flow.py

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

* remove diagnostics, changes

* refine config flow

* remove runtimeerrors in favor of asserts

* move initialization of lm_client to coordinator

* remove things from lmclient

* remove lm_client

* remove lm_client

* bump lm version

* correctly set initialized for tests

* move exception handling inside init + tests

* add test for switch without bluetooth on

* bump lmcloud

* pass httpx client to LMLocalAPI

* add call function to reduce code

* switch to snapshot testing

* remove bluetooth

* bump version

* cleanup import

* remove unused const

* set correct integration_type

* correct default selection in CF

* reduce unnecessary tests by fixture change

* use other json loads helpers

* move prebrew/infusion to select entity

* bump lmcloud

* Update coordinator.py

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

* Update coordinator.py

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

* Update coordinator.py

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

* Update entity.py

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

* Update entity.py

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

* requested feedback

* step description, bump lmcloud

* create init integration functino

* revert

* ruff

* remove leftover BT test

* make main switch main entity

* bump lmcloud

* re-add bluetooth

* improve

* bump firmware (again)

* correct test

* Update homeassistant/components/lamarzocco/coordinator.py

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

* Update homeassistant/components/lamarzocco/entity.py

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

* Update homeassistant/components/lamarzocco/strings.json

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

* separate device test

* add BT to entites

* fix import

* docstring

* minor

* fix rebase

* get device from discovered devices

* tweak

* change tests

* switch to dict

* switch to options

* fix

* fix

---------

Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: tronikos <tronikos@users.noreply.github.com>
Co-authored-by: Luke Lashley <conway220@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: dupondje <jean-louis@dupond.be>
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-21 13:08:11 +01:00
Jan-Philipp Benecke e23943debf
Remove deprecated `hass.components` from flux switch tests and use fixture (#113875) 2024-03-21 11:44:05 +01:00
Erik Montnemery 25fe74aec5
Remove AUX heating from demo climate (#113929) 2024-03-21 11:35:27 +01:00
Ingmar Delsink 67a14d0463
Add transmission-integration path and protocol (#104334)
This updates the config_flow migration from v1.1 to v1.2
including migration tests
2024-03-21 11:05:36 +01:00
Jan-Philipp Benecke ff6812a798
Split light fixture from implementation to only import when fixture is actually used (#113892)
* Split light fixture from implementation to only import when fixture is actually used

* Non-local import
2024-03-21 10:49:32 +01:00
Thomas55555 80c8b94021
Add diagnostics to Husqvarna Automower (#111857) 2024-03-21 10:06:40 +01:00
Sid 8e1f57f663
Enable Ruff PT023, disable PT011, PT012, PT018 (#113900)
* Enable Ruff PT023

* Set mark parantheses to False

* Disable PT011, PT012, PT018
2024-03-21 09:43:27 +01:00
Jan Bouwhuis dc38d152df
Fetch ServiceNotFound message from translation cache (#113893) 2024-03-21 06:54:29 +01:00
Jan Bouwhuis 8edbf88da1
Fetch MaxLengthExceeded exception mesage from the translation cache (#113904)
* Fetch MaxLengthExceeded exception mesage from the translation cache

* Update homeassistant/components/homeassistant/strings.json

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

* Add case without homeassistant integration

* Fix test

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-21 06:53:26 +01:00
Jesse Hills 6ddef7bbff
ESPHome: Add Time Entity support (#113852) 2024-03-21 16:59:43 +13:00
J. Nick Koston b574220247
Refactor rate limit helper to track time in seconds (#113898)
* Refactor rate limit helper to track time in seconds

Currently we created datetime and timedelta objects to enforce the
rate limit. When the rate limit was being hit hard, this got expensive.

We now use floats everywhere instead as they are much cheaper which
is important when we are running up against a rate limit, which is
by definition a hot path

The rate limit helper is currently only used for templates and
we do not have any code in the code base that directly passes
in a rate limit so the impact to custom components is expected
to be negligible if any

* misesd two
2024-03-20 19:49:37 -04:00
J. Nick Koston e9c1753f3a
Cache parsing the url for the device registry (#113910)
* Cache parsing the url for the device registry

There are lots of hub integrations that use the same url for every
sub-device which results in a lot of url parsing at startup. The
logic can be simplified quite a bit here by only using yarl
for URLs

* fix onvif
2024-03-20 19:35:01 -04:00
J. Nick Koston 267fe3dc34
Fix system_info importing hassio in the event loop (#113903) 2024-03-20 12:06:40 -10:00
J. Nick Koston ac175a4240
Fix flakey test_reading_yaml_config test (#113902) 2024-03-20 10:39:31 -10: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
Joakim Sørensen 83cf59e6a8
Provide better debug capabilities for the Traccar Server integration (#113868) 2024-03-20 15:40:46 +01:00
Martin Hjelmare c5f6925948
Add matter device serial number (#113878) 2024-03-20 15:31:48 +01:00
Franck Nijhof fc6a83559f
Add floor template functions (#110847) 2024-03-20 11:58:04 +01:00
Henning Claßen 25be71e05b
Bump numato-gpio to v0.13.0 (#113182) 2024-03-20 11:42:01 +01:00
Floris272 249f708071
Bump bluecurrent-api to 1.2.2 (#110483) 2024-03-20 11:28:27 +01:00
Martin Hjelmare ac008a4c6d
Deprecate cloud tts gender (#112256)
* Deprecate cloud tts gender option

* Update http api and prefs

* Test migration of prefs to minor version 4

* Adjust breaking date

* Add test for bad voice in http api

* Flatten tts info

* Fix comments

* Fix comment date

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

* Clarify voice validator

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-03-20 09:42:40 +01:00
Erik Montnemery d31124d5d4
Avoid creating unneeded Context and Event objects when firing events (#113798)
* Avoid creating unneeded Context and Event objects when firing events

* Add test

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-20 09:40:06 +01:00
Jan-Philipp Benecke 638020f168
Remove deprecated `hass.components` from group light tests and use fixture (#113862) 2024-03-20 08:45:50 +01:00
J. Nick Koston c5eacf55c2
Fix flapping stream hls test (#113858) 2024-03-20 08:27:05 +01:00
Joakim Sørensen 96694878fb
Redact the area of traccar server geofences (#113861) 2024-03-20 08:23:16 +01:00
J. Nick Koston fff590d738
Fix flapping device tracker test (#113859)
seen in https://github.com/home-assistant/core/actions/runs/8353028595/job/22864148890?pr=113854
2024-03-20 07:21:26 +01:00
Joost Lekkerkerker 23353812a9
Add icon translations to Github (#111614)
* Add icon translations to Github

* Fix
2024-03-20 07:06:34 +01:00
J. Nick Koston 06f356a038
Avoid expensive db queries at startup to check if data is migrated (#113773) 2024-03-19 15:27:40 -10:00
J. Nick Koston 417b491b78
Reduce overhead to write dlna_dmr state (#113776)
* Reduce overhead to write dlna_dmr state

- Only update supported_features once per state write cycle
- Use a dict lookup for state

* useless dispatch

* fix tests

* remove unreachable code
2024-03-19 21:13:34 -04:00
Jessica Smith 02c1088596
Upgrade whirlpool integration to add shared appliances and allow brand selection (#111687)
* update to 1.18.5 and add Brand to config, required for getting shared appliances

* update version to 0.18.6

* start fixing tests

* fix typo

* check for falsy values instead of explicit None

* move CONF_BRAND from global constants to whirlpool constants

* add test for no brand, fix __init__ import

* add brand to string.json

* add brand to re-auth

* add title/description, add brand info to description

* add reauth strings

* pass already initialized data dict

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

* remove trailing comma

* Update strings again

* fix reauth tests to add brand

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-20 02:02:45 +01:00
Jan-Philipp Benecke 9add4aea70
Remove deprecated `hass.components` from vilfo config flow tests (#113821) 2024-03-20 01:13:05 +01:00
Jan-Philipp Benecke 685468d845
Use `mock_platform` for light entity component tests instead of `hass.components` (#113845)
* Use `mock_platform` for light entity component tests instead of `hass.components`

* Move pytest_plugins to top

* Fix comment
2024-03-20 01:09:48 +01:00
J. Nick Koston 6b5518b2bf
Fix template sensor test relying on event bus debug logging (#113842) 2024-03-19 10:44:04 -10:00
J. Nick Koston 879e5bc961
Only wait for import flows in setup of there is a config flow (#113780) 2024-03-19 10:38:27 -10:00
Jan-Philipp Benecke c52ee2a898
Remove deprecated `hass.components` from person test (#113822) 2024-03-19 22:33:40 +02:00
Jan-Philipp Benecke ff03c9db19
Remove deprecated `hass.components` from cloud client test (#113820) 2024-03-19 22:33:11 +02:00
Jan-Philipp Benecke f96bb6754b
Remove deprecated `hass.components` from http test (#113823) 2024-03-19 22:32:27 +02:00
J. Nick Koston 32c64855b2
Fix duplicate events in live logbook (#113828) 2024-03-19 09:17:23 -10:00
J. Nick Koston 15c0422837
Fix flakey profiler object growth tests (#113825) 2024-03-19 09:17:12 -10:00
Jan-Philipp Benecke b35b4e8bfd
Do not patch `asyncio.timeout` in govee light local test (#113819) 2024-03-19 18:24:36 +01:00
Franck Nijhof 670bd97777
Find referenced labels in automations & scripts (#113812) 2024-03-19 16:28:37 +01:00
Thomas55555 ea443af557
Add device_tracker platform for husqvarna_automower (#111403)
* Add device_tracker platform for husqvarna_automower

* ruff

* Add snapshot test

* State test

* Fix description

* ruff

* Optimize some docstrings

* Update homeassistant/components/husqvarna_automower/device_tracker.py

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

* Adress review

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-19 15:46:35 +01:00
Thomas55555 3a8494cb88
Add binary sensor platform for Husqvarna Automower (#113248)
* Add binary sensor platform for Husqvarna Automower

* revert changes in sensor.py

* use == instead of is

* remove the parantheses

* Apply suggestions from code review

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

* Docstring

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-19 15:30:30 +01:00
Franck Nijhof 38d0854b70
Find referenced floors in automations & scripts (#113802) 2024-03-19 14:18:53 +01:00
Joost Lekkerkerker 44211dc761
Migrate Harmony to has entity name (#104737)
* Migrate Harmony to has entity name

* Fix tests

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-19 14:02:50 +01:00
Dave T 318b6e3a8b
Allow retries on communication exceptions for Aurora ABB Powerone solar inverter (#104492)
* Allow retries on SerialException, AuroraError

* Add test to verify that retry is occuring

* Fix tests and indents

* Only log to info level for normal on/offline

* Review comment: don't log warning, debug and raise UpdateFailed

* Fix tests
2024-03-19 12:21:32 +01:00
Erik Montnemery 4381780936
Add WS command cloud/remove_data (#109821) 2024-03-19 10:22:58 +01:00
Sid 00ec7f11f0
Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
Lucas Mindêllo de Andrade 089a3ab6d7
Bump sunweg to 2.1.1 (#113767) 2024-03-19 08:50:11 +01:00
J. Nick Koston 2582172ad1
Create tasks eagerly with core create_task (#113781) 2024-03-19 08:41:39 +01:00
J. Nick Koston c615b52840
Refactor integration startup time to show wall clock time (#113707)
* Refactor setup time tracking to exclude time waiting on other operations

We now exclude the import time and th time waiting on
base platforms to setup from the setup times

* tweak

* tweak

* tweak

* tweak

* adjust

* fixes

* fixes

* preen

* preen

* tweak

* tweak

* adjust

* tweak

* reduce

* do not count integrtion platforms against their parent integration

* handle legacy tts platforms

* stt as well

* one more wait

* use the same pattern in all the legacy

* fix tts and stt legacy

* fix

* fix

* reduce

* preen

* entity comp does not wait for platforms

* scene blocks as well

* fix test

* test fixes

* coverage

* coverage

* coverage

* fix test

* Update tests/test_setup.py

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

* Update tests/test_setup.py

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

* Update homeassistant/setup.py

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

* strip

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* strip WAIT_PLATFORM_INTEGRATION

* remove complexity

* Apply suggestions from code review

* no longer works that way

* fixes

* fixes

* fixes

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-18 21:45:34 -04:00
Franck Nijhof 167e66d45c
Add labels to service target (#113753) 2024-03-18 22:32:23 +01:00
Franck Nijhof 541d4b78ac
Add WebSocket support for handling labels on areas registry (#113755) 2024-03-18 22:17:13 +01:00
Robert Svensson 506240be10
Streamline naming in deCONZ integration (#111977) 2024-03-18 22:08:06 +01:00
Franck Nijhof e20cc4f8b9
Add WebSocket support for assigning labels to entities (#113757) 2024-03-18 22:03:37 +01:00
Franck Nijhof 51b8ffc69d
Add WebSocket support for handling labels on device registry (#113758) 2024-03-18 21:19:27 +01:00
Jan-Philipp Benecke f73f93913f
Remove deprecated `hass.components` from netatmo webhook tests (#113691) 2024-03-18 19:31:13 +01:00
Gido 1ed8232b02
Add config flow to Rova (#113596)
* Add Config Flow for Rova component

* Add tests for Rova config flow

* Fix data type

* Add rova to requirements for tests

* Removed seperate function for area check and global variable

* Add unique name and id to rova entities

* Add support for multiple rova entries

* Fix correct error after connection timeout or http error

* Revert SENSOR_TYPES update

* Add existing rova configuration from yaml as new entity

* Add tests for import configuration.yaml flow

* Cleanup code

* Update valid rova area check in config flow

* Changed abort keys and messages

* Updated using self.add_suggested_values_to_schema

* Update to pass tests

* Added missing strings

* Update sensor unique_ids

* Fix service name formatting

* Update tests for Rova entry

* Update tests to recover after error

* Update test name

* Apply suggestions from code review

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-18 18:00:54 +01:00
Joost Lekkerkerker aba5dcb63e
Patch Discovery timeout in govee light local (#113692) 2024-03-18 16:49:39 +01:00
Xitee 7065625d28
Add additional buttons to OctoPrint (#103139)
* Add 3 new buttons

- System shutdown button
- System reboot button
- Octoprint restart button

* Enable buttons by default

* Add tests

* Fix tests

* Remove accidentally committed unused code

* Add RESTART device class to RestartOctoprint and RebootSystem buttons

* Apply suggestions to octoprint test_button

* Freeze time for OctoPrint button tests

* Make new button base class to prevent implementing the availability check multiple times
2024-03-18 16:20:22 +01:00
Jack Boswell 34b0ff40f3
Allow configuring Starlink sleep schedule (#103057)
* Expose sleep config getters and setters

* Add a switch for toggling sleep schedule

* Add Time platform

* Add frozen to dataclasses

* Update tests

* Add starlink time to coveragerc

* No more mixin

* Update time.py

* Update time.py

* Run data collectors asynchronously

* Fix timezone handling
2024-03-18 16:18:32 +01:00
Erwin Douna e882d47cde
Add Downloader config flow, including tests (#98722)
* Adding base line, including tests

* Adding validatge input and expanding tests

* Updating manifest

* Minor patch

* Revert minor patch, wrong nesting

* Adding proper translations

* Including abort message

* Update homeassistant/components/downloader/config_flow.py

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

* Rename exception class

* Refactor import

* Update strings

* Apply suggestions from code review

* Update homeassistant/components/downloader/__init__.py

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

* Update homeassistant/components/downloader/__init__.py

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

* Update homeassistant/components/downloader/__init__.py

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

* Update homeassistant/components/downloader/__init__.py

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

* Update homeassistant/components/downloader/__init__.py

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

* Update homeassistant/components/downloader/__init__.py

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

* Update homeassistant/components/downloader/__init__.py

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

* Reverting back filename and fix typing

* Reverting back mutex/lock

* Upgrade version

* Adding typing

* Removing coroutine

* Removing unload entry (for now)

* Removing comment

* Change type

* Putting download back in setup_entry

* Revert back code

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-03-18 16:16:24 +01:00
Jan Bouwhuis 3dc8df2403
Get ServiceValidationError message from translation cache only (#113704)
* Get ServiceValidationError message from translation cache only

* Remove message for NotValidPresetModeError
2024-03-18 14:42:21 +01:00
Jan Bouwhuis ec7aecef84
Get HomeAssistantError message from translation cache only (#113688)
Get HomeAssistant error message from translation cache only
2024-03-18 14:39:41 +01:00
Sid 727581eea3
Add first batch of Ruff PT rules (#113665)
* Add first batch of Ruff PT rules

* fix weather test

* Fix pilight test

* Update test_intent.py

* Update pilight test_init.py

* Update test_init.py
2024-03-18 13:26:14 +01:00
J. Nick Koston 8f33bad4ef
Move legacy tts setup to use tracked tasks (#113717)
* Move legacy tts setup to a tracked task

* comment

* fix test

* fix test

* fix more tests

* tweak
2024-03-18 13:11:22 +01:00
J. Nick Koston 10f2d8b4b1
Move legacy notify setup to use tracked tasks (#113716)
* Move legacy notify setup to a tracked task

* fix test

* fix test

* comment
2024-03-18 13:09:21 +01:00
J. Nick Koston 8a144d16f5
Move legacy device_tracker setup to a tracked task (#113715)
* Move legacy device_tracker setup to a tracked task

Legacy platforms are now loaded in a tracked task which
allows anything waiting on device_tracker (such as
a config entry that uses the device_tracker
platform) to proceed.

This also allows us to remove the workaround
of adding device_tracker to
hass.config.components in its setup

* tweak

* tweak

* fix tests
2024-03-18 10:39:59 +01:00
epenet 3844ade572
Fix unknown values in onewire (#113731)
* Fix unknown values in onewire

* Update tests
2024-03-18 10:12:46 +01:00
Sid 82a60fe8ad
Enable Ruff RSE (#113695) 2024-03-18 00:40:38 +01:00
J. Nick Koston 93497dde8b
Run registry cleanup listeners immediately (#113646) 2024-03-17 08:15:55 -10:00
Jan-Philipp Benecke 324c922c0d
Remove deprecated `hass.components` from withings webhook tests (#113687)
* Remove deprecated `hass.components` from withings webhook tests

* Use patch.object
2024-03-17 17:48:58 +01:00
Jan-Philipp Benecke 681705394d
Remove deprecated `hass.components` from network helper function (#113615)
* Remove deprecated `hass.components` from network helper function

* Remove deprecated use of `hass.components` in alexa camera tests
2024-03-17 17:42:48 +01:00
Jan-Philipp Benecke 25c4ab070b
Use `mock_platform` for event entity component tests instead of `hass.components` (#113667) 2024-03-17 17:32:16 +01:00
MarkGodwin 75a489deb9
Add WAN port connection control to TP-Link Omada gateways (#111431)
* Add gateway connection switches

* Add unit tests

* tplink_omada code review feedback

* Rebase and move icons and strings into json
2024-03-17 16:06:57 +01:00
Jan Bouwhuis 81ab29a38e
Freeze time on zwave_js update test (#113625)
Freeze time on jwave_js update test
2024-03-17 16:02:45 +01:00
Jan-Philipp Benecke b8e1862746
Remove deprecated `hass.components` from image_processing platform (#113613)
* Remove deprecated `hass.components` from image_processing platform

* Add test and change log

* D'oh.. use updated error text
2024-03-17 15:59:29 +01:00
Michael 0643ff1cfe
Improve debug logging in Tankerkoenig (#113674) 2024-03-17 13:44:32 +01:00
Sid 6113b99ddd
Replace pylint pointless-statement with ruff B018 (#113582)
* Replace pylint pointless-statement with ruff B018

* fix occurrences of B018

* disable pylint expression-not-assigned as well

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-17 10:58:14 +01:00
Erik Montnemery 7b20641651
Add tests of homeworks __init__ (#113581) 2024-03-17 10:22:08 +01:00
Erik Montnemery 398c38b50d
Add tests of homeworks button (#113578) 2024-03-17 10:06:57 +01:00
Sid d5fd005db8
Add ruff rule PIE808 (#113621) 2024-03-17 09:56:26 +01:00
Erik Montnemery 1a70dbfd94
Add tests of homeworks light (#113579) 2024-03-17 09:46:36 +01:00
Erik Montnemery 8f6c4f8b33
Add tests of homeworks binary sensor (#113577) 2024-03-17 09:45:49 +01:00
Sid 69564b1a17
Add ruff rule PIE800 (#113619)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-16 16:31:30 -10:00
Christopher Bailey 43652a4ace
Deprecate UniFi Protect HDR switch and package sensor (#113636)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-16 16:15:32 -10:00
J. Nick Koston 6a6f3d46a9
Create config entry async_on_unload tasks eagerly (#113626) 2024-03-16 14:43:49 -10:00
J. Nick Koston fa68c5633c
Fix zeroconf shutting down too early (#113638) 2024-03-16 14:42:27 -10:00
Christopher Bailey e703baba0a
Add new fields from UniFi Protect v3 (#113631) 2024-03-16 13:17:23 -10:00
Jan-Philipp Benecke 73f11064d7
Use `mock_platform` for button entity component tests instead of `hass.components` (#113627) 2024-03-16 12:47:59 -10:00
Sid fe9cc6705c
Add ruff rule PIE804 (#113620)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-16 12:45:18 -10:00
Erik Montnemery d0352ed91d
Fix missing context when running script from template entity (#113523)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-16 12:37:24 -10:00
Allen Porter a9da9ee443
Bump ical to 7.0.3 to fix local-todo persisted with invalid DTSTART values (#113526) 2024-03-16 12:03:26 -10:00
Jan Bouwhuis 554aefed42
Generate HomeAssistantError message from English translations (#113305)
* Fetch exception message from translation cache

* Improve tests

* Return translation key without path, cleanup

* Fetch translations when string variant is requested

* Move import

* revert changes ConfigValidationError

* mypy

* Remove _str__ method instead

* Type _message for mqtt template exception classes

* Revert changes made to test_config.py

* Undo changes TemplateError

* Follow up comments and test coverage
2024-03-16 22:56:48 +01:00
Lex Li 2bc4a5067d
snmp: Better sensor support to resolve previous issues (#113624)
Co-authored-by: Christian Kühnel <christian.kuehnel@gmail.com>
Co-authored-by: jan iversen <jancasacondor@gmail.com>
2024-03-16 22:56:21 +01:00
Sid 0b9c9aff62
Add ruff rules PIE790, PIE794, PIE807, PIE810 (#113617) 2024-03-16 11:04:58 -10:00
J. Nick Koston 7d58be1a6a
Gather loading platforms in async_process_component_config (#113573) 2024-03-16 10:57:10 -10:00
J. Nick Koston bb12d2e865
Avoid creating tasks in homeassistant_alerts when the debouncer will not fire (#113580) 2024-03-16 16:20:06 -04:00
J. Nick Koston 4174d88ad7
Add a guard to handle unhashable platforms in config (#113607)
Someone might set the platform to [fitbit] instead of fitbit

I have not seen anyone do this, but its good to guard against
it
2024-03-16 16:19:07 -04:00
Jan Bouwhuis 5dccd8204c
Freeze time on profile test (#113618) 2024-03-16 21:16:18 +01:00
Sid 6ee273a548
Clean up unneeded ruff noqa directives (#113616) 2024-03-16 09:48:37 -10:00
Sid ccd2e989c3
Enable ruff RUF005 and fix occurrences (#113589) 2024-03-16 07:37:20 -10:00
Massimo Savazzi 2a5c85a020
Add JVC Projector Sensors (#108949)
* Add JVC Projector Sensors - Power Status, Input

* Removed commented line, removed name in icons.json

* fixed icons.json file

* fixed tests

* Update homeassistant/components/jvc_projector/sensor.py

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

* Fixed as requested

* Fixed code as requested

* added fixes

* Fixed sensor creation

* fixed const

* fixed icons

* Added test for both sensors

* Added ha state stest

* fixed commented line and removed useless ones

* Changed time FAST - SLOW to be more responsive

* Rolled back to previous values 6/60

* Update sensor.py

removed off

* Update icons.json

* Removed the Input Sensor entity

* Update tests/components/jvc_projector/test_sensor.py

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

* Update tests/components/jvc_projector/test_sensor.py

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

* Update tests/components/jvc_projector/test_sensor.py

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

* Update tests/components/jvc_projector/test_sensor.py

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

* Update tests/components/jvc_projector/test_sensor.py

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

* Update tests/components/jvc_projector/test_sensor.py

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

* Updated unique id of sensor

Co-authored-by: Steve Easley <steve.easley@gmail.com>

* Added translation and string for Power Status

* Update homeassistant/components/jvc_projector/strings.json

Co-authored-by: Steve Easley <steve.easley@gmail.com>

* Update homeassistant/components/jvc_projector/strings.json

Co-authored-by: Steve Easley <steve.easley@gmail.com>

* Update strings.json

* Update strings.json

added missing ,

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Steve Easley <steve.easley@gmail.com>
2024-03-16 16:52:51 +01:00
Maciej Bieniek 6191b25563
Catch `TimeoutError` in `Brother` config flow (#113593)
* Catch TimeoutError in Brother config flow

* Update tests

* Remove unnecessary parentheses

---------

Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
2024-03-16 16:01:48 +01:00