Commit graph

18468 commits

Author SHA1 Message Date
J. Nick Koston
e9c1753f3a
Cache parsing the url for the device registry ()
* 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
ac175a4240
Fix flakey test_reading_yaml_config test () 2024-03-20 10:39:31 -10:00
Erik Montnemery
426f73b1f4
Add State.last_reported ()
* 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 () 2024-03-20 15:40:46 +01:00
Martin Hjelmare
c5f6925948
Add matter device serial number () 2024-03-20 15:31:48 +01:00
Henning Claßen
25be71e05b
Bump numato-gpio to v0.13.0 () 2024-03-20 11:42:01 +01:00
Floris272
249f708071
Bump bluecurrent-api to 1.2.2 () 2024-03-20 11:28:27 +01:00
Martin Hjelmare
ac008a4c6d
Deprecate cloud tts gender ()
* 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 ()
* 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 () 2024-03-20 08:45:50 +01:00
J. Nick Koston
c5eacf55c2
Fix flapping stream hls test () 2024-03-20 08:27:05 +01:00
Joakim Sørensen
96694878fb
Redact the area of traccar server geofences () 2024-03-20 08:23:16 +01:00
J. Nick Koston
fff590d738
Fix flapping device tracker test ()
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 ()
* 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 () 2024-03-19 15:27:40 -10:00
J. Nick Koston
417b491b78
Reduce overhead to write dlna_dmr state ()
* 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 ()
* 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 () 2024-03-20 01:13:05 +01:00
Jan-Philipp Benecke
685468d845
Use mock_platform for light entity component tests instead of hass.components ()
* 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 () 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 () 2024-03-19 10:38:27 -10:00
Jan-Philipp Benecke
c52ee2a898
Remove deprecated hass.components from person test () 2024-03-19 22:33:40 +02:00
Jan-Philipp Benecke
ff03c9db19
Remove deprecated hass.components from cloud client test () 2024-03-19 22:33:11 +02:00
Jan-Philipp Benecke
f96bb6754b
Remove deprecated hass.components from http test () 2024-03-19 22:32:27 +02:00
J. Nick Koston
32c64855b2
Fix duplicate events in live logbook () 2024-03-19 09:17:23 -10:00
J. Nick Koston
15c0422837
Fix flakey profiler object growth tests () 2024-03-19 09:17:12 -10:00
Jan-Philipp Benecke
b35b4e8bfd
Do not patch asyncio.timeout in govee light local test () 2024-03-19 18:24:36 +01:00
Franck Nijhof
670bd97777
Find referenced labels in automations & scripts () 2024-03-19 16:28:37 +01:00
Thomas55555
ea443af557
Add device_tracker platform for husqvarna_automower ()
* 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 ()
* 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 () 2024-03-19 14:18:53 +01:00
Joost Lekkerkerker
44211dc761
Migrate Harmony to has entity name ()
* 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 ()
* 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 () 2024-03-19 10:22:58 +01:00
Sid
00ec7f11f0
Enable Ruff rule PT007 ()
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 () 2024-03-19 08:50:11 +01:00
J. Nick Koston
2582172ad1
Create tasks eagerly with core create_task () 2024-03-19 08:41:39 +01:00
J. Nick Koston
c615b52840
Refactor integration startup time to show wall clock time ()
* 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
541d4b78ac
Add WebSocket support for handling labels on areas registry () 2024-03-18 22:17:13 +01:00
Robert Svensson
506240be10
Streamline naming in deCONZ integration () 2024-03-18 22:08:06 +01:00
Franck Nijhof
e20cc4f8b9
Add WebSocket support for assigning labels to entities () 2024-03-18 22:03:37 +01:00
Franck Nijhof
51b8ffc69d
Add WebSocket support for handling labels on device registry () 2024-03-18 21:19:27 +01:00
Jan-Philipp Benecke
f73f93913f
Remove deprecated hass.components from netatmo webhook tests () 2024-03-18 19:31:13 +01:00
Gido
1ed8232b02
Add config flow to Rova ()
* 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 () 2024-03-18 16:49:39 +01:00
Xitee
7065625d28
Add additional buttons to OctoPrint ()
* 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 ()
* 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 ()
* 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 ()
* 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 ()
Get HomeAssistant error message from translation cache only
2024-03-18 14:39:41 +01:00