24393 Commits

Author SHA1 Message Date
Tudor Sandu
d9b077154e
Blueprints for template entities (#126971)
* Template domain blueprints

* Default blueprint for templates

* Some linting

* Template entity updates

* Load and use blueprints in config

* Added missing mapping methods for templates

* Linting

* Added tests

* Wrong schema type

* Hassfest errors

* More linting issues

* Refactor based on desired schema

In the [architecture discussion](https://github.com/home-assistant/architecture/discussions/1027), the template blueprint instance did not specify the platform (e.g. `binary_sensor`), but the initial implementation assumed that schema.

* Create default template blueprints on first run

* Moved TemplateConfig definition

This is to avoid circular references

* Corrected methods to find templates based on blueprints

* Corrected missing entity config information

* Added tests

* Don't use hass.data

Address comments https://github.com/home-assistant/core/pull/126971/#discussion_r1780097187

* Prevent creating blueprints during testing

* Combine 2 ifs

Address comment https://github.com/home-assistant/core/pull/126971/#discussion_r1780160870

* Improve test coverage

* Prevent template component from dirtying test env

* Remove useless hard-coded validation

* Improve code coverage to 100%

* Address review comments

* Moved helpers in helpers.py

As per comment https://github.com/home-assistant/core/pull/126971#discussion_r1786539889

* Fix blueprint source URL

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-10-04 16:47:29 +02:00
epenet
8bbbaae290
Use HassKey in backup (#127546)
* Use HassKey in backup

* Use DATA_MANAGER
2024-10-04 16:01:50 +02:00
Joost Lekkerkerker
ebfa2fb1d0
Strip the NYT Games token (#127548) 2024-10-04 12:53:35 +02:00
epenet
8b9b65d3f1
Use reauth helpers in spotify config flow (#127532)
Use async_update_reload_and_abort in spotify
2024-10-04 11:13:03 +02:00
Joost Lekkerkerker
07704b8511
Add more fixtures to the matter fixture (#126761)
* Add more fixtures to the matter fixture

* Add Valve
2024-10-04 09:24:06 +02:00
epenet
6a44d66fed
Fix reolink tests (#127525) 2024-10-04 09:16:49 +02:00
Maciej Bieniek
1290f18ed4
Add support for Shelly CCT light (#126989)
* Initial support for cct lights

* Move properties to the RpcShellyCctLight class

* Fix entity names

* Add async_remove_orphaned_entities() function

* Do not return

* Fix tests

* Combine async_remove_orphaned_virtual_entities and async_remove_orphaned_entities

* Remove SHELLY_PLUS_RGBW_CHANNELS from const

* Add tests

* Use _attr*

* Check ColorMode.COLOR_TEMP

* Add sensors for CCT light

* Remove removal condition

* Remove orphaned sensors

* Cleaning

* Add device temperature sensor for CCT light

* Simplify async_remove_orphaned_entities()

* Comment

* Add COMPONENT_ID_PATTERN const

* Call async_add_entities once

* Suggested change

* Better type for keys

* Do not call keys()
2024-10-04 08:49:35 +02:00
David Bonnes
49e634a62f
Convert evohome's test factory into an async generator (#126925) 2024-10-04 08:29:36 +02:00
Erik Montnemery
8754b54d81
Fix config entry unique_id collision in tplink tests (#127522) 2024-10-04 08:24:56 +02:00
epenet
c191a7cfdb
Fix lingering tasks in snooz tests (#127523) 2024-10-04 08:24:01 +02:00
J. Nick Koston
6eb49991a4
Add pylint rule for cached_property (#127482) 2024-10-03 17:53:55 -05:00
Michael
1dd59375f6
Add re-authemtication flow to AVM FRITZ!Box Call Monitor (#127497) 2024-10-03 22:36:41 +02:00
Erik Montnemery
48a07d531c
Remove assumption in ConfigEntryItems about unique unique_id (#127399) 2024-10-03 22:27:15 +02:00
J. Nick Koston
db494de809
Restore __slots__ to core objects (#127441) 2024-10-03 22:23:47 +02:00
Joost Lekkerkerker
48a6dabc5b
Remove Spider integration (#127346) 2024-10-03 21:44:30 +02:00
Erik Montnemery
0ae0047246
Fix config entry unique_id collision in lamarzocco tests (#127484) 2024-10-03 21:39:39 +02:00
J. Nick Koston
0f29fd3e10
Switch to using fast cached_property implementation in propcache (#127339) 2024-10-03 13:11:02 -05:00
J. Nick Koston
e2b1ef053f
Cache serialization of config entry storage (#127435) 2024-10-03 19:51:09 +02:00
Erik Montnemery
a2c85a0ac2
Remove test workaround from snooz (#127465) 2024-10-03 18:18:08 +02:00
epenet
f837369ef0
Use reauth helpers in electric_kiwi config flow (#127414)
* Mark electric_kiwi as single_config_entry

* Adjust

* Use reauth helpers in electric_kiwi config flow
2024-10-03 18:02:55 +02:00
J. Nick Koston
41fcf58b80
Fix bluetooth tests to not create the same config entry twice (#127461) 2024-10-03 10:37:34 -05:00
Allen Porter
c38f23400c
Don't add the same config entry id twice in google tests (#127457)
Don't add the same config entry id twice in the test
2024-10-03 17:23:58 +02:00
Erik Montnemery
62b449e52c
Fix config entry unique_id collision in proximity (#127456) 2024-10-03 17:22:40 +02:00
starkillerOG
85ae66d276
Reolink auto add new cameras/chimes (#126268) 2024-10-03 16:51:27 +02:00
epenet
045d96cdd1
Use async_update_reload_and_abort in aseko_pool_live config flow (#127433)
* Use async_update_reload_and_abort in aseko_pool_live config flow

* block_till_done
2024-10-03 14:39:17 +02:00
Stefan Agner
abf3da2fa1
Set default Matter fabric label (#127252) 2024-10-03 12:36:24 +02:00
epenet
7d3d693fe8
Align config flow reconfigure step test helper with frontend (#127329)
* Align config flow reconfigure step with frontend

* Update common.py

* Update common.py

* Adjust

* Adjust

* Fix test

* Adjust
2024-10-03 10:21:23 +02:00
Robert Resch
04860ae1d2
Add go2rtc and extend camera integration for better WebRTC support (#124410) 2024-10-03 09:20:03 +02:00
Erik Montnemery
a0a90f03a8
Improve generic camera preview tests (#127382) 2024-10-03 09:13:54 +02:00
G Johansson
0fde5c21b7
Add reconfigure flow to trafikverket_camera (#127355) 2024-10-03 01:25:47 +02:00
polgarc
c4cc9f8489
Add line numbers to swiss-public-transport (#127332)
* add line numbers

* keep only one line sensor

* fix unt tests
2024-10-03 01:25:17 +02:00
Stefan Agner
88ad7e98e0
Store instance name in Thread router discovery (#127253)
* Store instance name in Thread router discovery

Store the DNS-SD instance name in the Thread router discovery message.
The instance name is the actual name given to a Thread border router,
e.g. when configuring the name of a Thread border router in Apple Home
the name appears as the DNS-SD instance name. This will allow to make
the Thread border router list more user friendly.

* Use instance_name_from_service_info to get instance name
2024-10-02 21:41:55 +02:00
G Johansson
a3b1a30d06
Add reconfigure step to trafikverket weather (#127140)
* Add reconfigure step to trafikverket weather

* Use helper

* Fix

* Fix review comments
2024-10-02 21:04:00 +02:00
Steven Looman
f8b192bd94
Handle the correct exception type when subscribing to the router service returns an error in the upnp component (#127006)
* Catch the right exception when handling subscription errors

* Assert device is forced to poll
2024-10-02 20:55:25 +02:00
Erik Montnemery
4c6ab3921a
Store modern_forms flow data in flow handler attributes (#127175) 2024-10-02 19:59:44 +02:00
Erik Montnemery
1dc1fd421b
Use ConfigFlow.has_matching_flow to deduplicate tplink flows (#127164) 2024-10-02 19:59:24 +02:00
Paul Bottein
c306ebed49
Fix device id support for alarm control panel template (#127340) 2024-10-02 19:04:36 +02:00
Mark Grandi
c265c91ef2
Add protocol upload / download sensors to Deluge (#119203)
* Add Protocol Upload/Download for Deluge

* add unit test and fix typo in sensor.py

* remove unneeded import

* rename/unify the translation keys and entries in const.py

* split out const.py items into DelugeSensorType to avoid confusion with DelugeGetSessionStatusKeys

* change DelugeGetSessionStatusKeys to be a regular enum to satisfy mypy
2024-10-02 16:44:56 +02:00
starkillerOG
3184951625
Add sensor for total installations and integrations to Analytics Insights (#127248)
* Add sensor for total installations and integrations

* Fix tests

* Use pytest fixture
2024-10-02 16:25:27 +02:00
Marc Mueller
ea115e0481
Fix telegram_bot tests for Python 3.13 (#127293) 2024-10-02 14:15:01 +02:00
Erik Montnemery
2fdde24024
Remove the Google Domains integration (#127278) 2024-10-02 13:58:19 +02:00
epenet
21266e1c68
Add config_flow helper to get reauth/reconfigure config entry (#127115)
* Add config_flow helper to get config entry from context

* Simplify

* Apply to aussie_broadband

* Another example

* Rename and adjust docstring

* Simplify

* Add test

* Refactor to hide context

* Raise

* Improve coverage

* Use AttributeError

* Use ValueError

* Raise UnknownEntry
2024-10-02 12:00:07 +02:00
Erik Montnemery
3f1acdc9ec
Make recorder WS command recorder/clear_statistics wait (#127120) 2024-10-02 10:43:40 +02:00
epenet
9873371413
Use start_reconfigure_flow in config flow tests (#127191)
* Use start_reconfigure_flow in config flow tests

* Adjust fritz
2024-10-02 10:01:15 +02:00
Erik Montnemery
2a2af01d12
Make recorder WS command recorder/update_statistics_metadata wait (#127179) 2024-10-02 09:56:36 +02:00
functionpointer
5bd2d27488
Fix Tibber get_prices when called with aware datetime (#123289)
* Tibber: Add extra test to expose aware/naive datetime issue

* Tibber: Fix get_prices action not working with aware datetimes

* Tibber: Simplify comparison

* Tibber: Combine timezone tests into single parametrized one

* Tibber: Split test again to prevent if statement
2024-10-02 08:43:31 +02:00
Erik Montnemery
47985a589e
Ensure frontier_silicon config flow title_placeholders items are [str, str] (#127197) 2024-10-02 08:26:51 +02:00
Erik Montnemery
375d47ee3a
Use ConfigFlow.has_matching_flow to deduplicate yeelight flows (#127165) 2024-10-02 08:25:46 +02:00
Martin Hjelmare
e3e68dad36
Revert "Support Z-Wave JS dimming lights using color intensity (#122639)" (#127256)
This reverts commit c7cfd56b720be8212af2686ecfa5b8cad6ee299b.
2024-10-02 06:48:47 +02:00
Erik Montnemery
6d65d6bcf6
Don't create statistics issues when sensor is unavailable or unknown (#127226) 2024-10-01 22:08:48 +02:00