Commit Graph

23481 Commits (aab939cf6cdfed1b8dbe38021a00b704d6967b22)

Author SHA1 Message Date
Álvaro Fernández Rojas faefe624f6
Add Airzone Cloud Aidoo HVAC indoor/outdoor sensors (#125013)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-09-02 22:17:24 +02:00
Erik Montnemery 606524f9e7
Test string timestamps are wiped after migration to schema version 32 (#125091)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-02 21:33:35 +02:00
J. Nick Koston cd89db9bb6
Add coverage for late unifiprotect person detection events (#125103) 2024-09-02 09:26:02 -10:00
Martin Hjelmare 687cd32142
Handle telegram polling errors (#124327) 2024-09-02 09:23:24 -10:00
Artur Pragacz fb27297df9
Fix area registry indexing when there is a name collision (#125050) 2024-09-02 09:23:07 -10:00
Erik Montnemery 0b14f0a379
Add test of statistics timestamp migration (#125100) 2024-09-02 09:13:26 -10:00
Maciej Bieniek 3206979488
Add separate entities for temperature, humidity and pressure in AccuWeather integration (#125041)
* Add temperature, humidity and pressure sensors

* Make uv index sensor disabled by default

* Fix type
2024-09-02 20:46:32 +02:00
dontinelli 7c4fd9473c
Add diagnostics to solarlog (#125072)
* Add diagnostics to solarlog

* Fix wrong comment
2024-09-02 20:08:44 +02:00
dontinelli 5300eddf33
Remove roundig in Solarlog and add suggested_display_precision (#125094)
* Remove roundig and add suggested_display_precision

* Add suggested_unit_of_measurement

* Put lamda in parentheses
2024-09-02 19:50:09 +02:00
Erik Montnemery 9f558d13e6
Correct start version in recorder schema migration tests (#125090)
* Correct start version in recorder schema migration tests

* Remove default from states.last_updated_ts
2024-09-02 19:32:01 +02:00
Erik Montnemery df4bd721b5
Deprecate template.attach (#124843) 2024-09-02 15:33:10 +02:00
Erik Montnemery 114e254aa6
Don't raise when registering entity service with invalid schema (#125057)
* Don't raise when registering entity service with invalid schema

* Update homeassistant/helpers/service.py

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

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2024-09-02 14:20:50 +02:00
tronikos d40e3145fe
Setup Google Cloud from the UI (#121502)
* Google Cloud can now be setup from the UI

* mypy

* Add BaseGoogleCloudProvider

* Allow clearing options in the UI

* Address feedback

* Don't translate Google Cloud title

* mypy

* Revert strict typing changes

* Address comments
2024-09-02 04:30:18 -07:00
epenet 72d5146a3e
Improve renault tests (#125064) 2024-09-02 10:46:35 +02:00
Erik Montnemery 8f679fcbf3
Fix motionblinds_ble tests (#125060) 2024-09-02 09:51:05 +02:00
G Johansson 78cf7dc873
New template merge_response (#114204)
* New template merge_response

* Extending

* Extend comment

* Update

* Fixes

* Fix comments

* Mods

* snapshots

* Fixes from discussion
2024-09-02 08:13:10 +02:00
Michael 07e251d488
Add diagnostics platform to modern forms (#125032) 2024-09-01 22:04:29 +02:00
mvn23 56667ec2bc
Migrate opentherm_gw climate entity unique_id (#125024)
* Migrate climate entity unique_id to match the format used by other opentherm_gw entities
* Add test to verify migration
2024-09-01 17:22:03 +02:00
mvn23 2f7a396778
Split opentherm_gw entities between different devices (#124869)
* * Add migration from single device to multiple devices, removing all old entities
* Create new devices for Boiler and Thermostat
* Add classes for new entities based on the new devices

* Split binary_sensor entities into devices

* Split sensor entities into different devices

* Move climate entity to thermostat device

* Fix climate entity away mode

* Fix translation placeholders

* Allow sensor values with capital letters

* * Add EntityCategory
* Update and add device_classes

* Fix translation keys

* Fix climate entity category

* Update tests

* Handle `available` property in `entity.py`

* Improve GPIO state binary_sensor translations

* Fix: Updates are already subscribed to in the base entity

* Remove entity_id generation from sensor and binary_sensor entities

* * Use _attr_name on climate class instead of through entity_description
* Add type hints

* Rewrite to derive entities for all OpenTherm devices from a single base class

* Improve type annotations

* Use OpenThermDataSource to access status dict

* Move entity_category from entity_description to _attr_entity_category

* Move entity descriptions with the same translation_key closer together

* Update tests

* Add device migration test

* * Add missing sensors and binary_sensors back
* Improve migration, do not delete old entities from registry

* Add comments for migration period

* Use single lists for entity descriptions

* Avoid changing sensor values, remove translations

* * Import only required class from pyotgw
* Update tests
2024-09-01 13:28:08 +02:00
Jeef 12336f5c15
Bump Intellifire to 4.1.9 (#121091)
* rebase

* Minor patch to fix duplicate DeviceInfo beign created - if data hasnt updated yet

* rebase

* Minor patch to fix duplicate DeviceInfo beign created - if data hasnt updated yet

* fixing formatting

* Update homeassistant/components/intellifire/__init__.py

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

* Update homeassistant/components/intellifire/__init__.py

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

* Removing cloud connectivity sensor - leaving local one in

* Renaming class to something more useful

* addressing pr

* Update homeassistant/components/intellifire/__init__.py

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

* add ruff exception

* Fix test annotations

* remove access to private variable

* Bumping to 4.1.9 instead of 4.1.5

* A renaming

* rename

* Updated testing

* Update __init__.py

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

* updateing styrings

* Update tests/components/intellifire/conftest.py

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

* Testing refactor - WIP

* everything is passing - cleanup still needed

* cleaning up comments

* update pr

* unrename

* Update homeassistant/components/intellifire/coordinator.py

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

* fixing sentence

* fixed fixture and removed error codes

* reverted a bad change

* fixing strings.json

* revert renaming

* fix

* typing inother pr

* adding extra tests - one has a really dumb name

* using a real value

* added a migration in

* Update homeassistant/components/intellifire/config_flow.py

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

* Update tests/components/intellifire/test_init.py

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

* cleanup continues

* addressing pr

* switch back to debug

* Update tests/components/intellifire/conftest.py

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

* some changes

* restore property mock cuase didnt work otherwise

* cleanup has begun

* removed extra text

* addressing pr stuff

* fixed reauth

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-01 12:48:38 +02:00
dontinelli 1661304f10
Bump solarlog_cli to 0.2.2 (#124948)
* Add inverter-devices

* Minor code adjustments

* Update manifest.json

Seperate dependency upgrade to seperate PR

* Update requirements_all.txt

Seperate dependency upgrade to seperate PR

* Update requirements_test_all.txt

Seperate dependency upgrade to seperate PR

* Update homeassistant/components/solarlog/sensor.py

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

* Split up base class, document SolarLogSensorEntityDescription

* Split up sensor types

* Update snapshot

* Bump solarlog_cli to 0.2.1

* Add strict typing

* Bump fyta_cli to 0.6.3 (#124574)

* Ensure write access to hassrelease data folder (#124573)

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

* Update a roborock blocking call to be fully async (#124266)

Remove a blocking call in roborock

* Add inverter-devices

* Split up sensor types

* Update snapshot

* Bump solarlog_cli to 0.2.1

* Backport/rebase

* Tidy up

* Simplyfication coordinator.py

* Minor adjustments

* Ruff

* Bump solarlog_cli to 0.2.2

* Update homeassistant/components/solarlog/sensor.py

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

* Update homeassistant/components/solarlog/config_flow.py

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

* Update homeassistant/components/solarlog/sensor.py

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

* Update persentage-values in fixture

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Allen Porter <allen@thebends.org>
2024-09-01 12:47:52 +02:00
Álvaro Fernández Rojas 68162e1a27
Update aioairzone-cloud to v0.6.4 (#125007)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-09-01 12:45:59 +02:00
Allen Porter 30772da0e1
Add Google Photos media source support for albums and favorites (#124985) 2024-08-31 14:39:18 -07:00
Allen Porter ef84a8869e
Add Google Photos service for uploading content (#124956)
* Add Google Photos upload support

* Fix format

* Merge in scope/reauth changes

* Address PR feedback

* Fix blocking i/o in async
2024-08-31 21:16:14 +02:00
Allen Porter 93afc9458a
Update nest to only include the image attachment payload for cameras that support fetching media (#124590)
Only include the image attachment payload for cameras that support fetching media
2024-08-31 11:38:45 -07:00
Joost Lekkerkerker 30aa3a26ad
Merge coordinators in Airgradient (#124714) 2024-08-31 07:40:12 -07:00
epenet 9da5dd0090
Improve config flow type hints in cast (#124861) 2024-08-31 07:38:06 -07:00
Brett Adams 65f007ace7
Remove HVAC Modes when no scopes in Teslemetry (#124612)
* Remove modes when not scoped

* Fix inits

* Re-add raise

* Remove unused raise_for_scope

* Set hvac_modes when not scoped

* tests
2024-08-31 07:28:35 -07:00
J. Nick Koston 7210cc1da6
Bump yarl to 1.9.6 (#124955)
* Bump yarl to 1.9.5

changelog: https://github.com/aio-libs/yarl/compare/v1.9.4...v1.9.5

* remove default port since mocker does exact matching and yarl now normalizes this

* 1.9.6
2024-08-31 11:03:08 +02:00
Allen Porter 2cab9f7fe9
Address additional Google Photos integration feedback (#124957)
* Address review feedback

* Fix typing for  arguments
2024-08-31 10:10:45 +02:00
Allen Porter c1eb5f8b74
Fix Google Photos get media calls (#124958) 2024-08-31 10:01:51 +02:00
Alex Yao 26281662b5
Enable config flow for html5 (#112806)
* html5: Enable config flow

* Add tests

* attempt check create_issue

* replace len with call_count

* fix config flow tests

* test user config

* more tests

* remove whitespace

* Update homeassistant/components/html5/issues.py

Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>

* Update homeassistant/components/html5/issues.py

Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>

* fix config

* Adjust issues log

* lint

* lint

* rename create issue

* fix typing

* update codeowners

* fix test

* fix tests

* Update issues.py

* Update tests/components/html5/test_config_flow.py

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

* Update tests/components/html5/test_config_flow.py

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

* Update tests/components/html5/test_config_flow.py

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

* update from review

* remove ternary

* fix

* fix missing service

* fix tests

* updates

* adress review comments

* fix indent

* fix

* fix format

* cleanup from review

* Restore config schema and use HA issue

* Restore config schema and use HA issue

---------

Co-authored-by: alexyao2015 <alexyao2015@users.noreply.github.com>
Co-authored-by: Steven B. <51370195+sdb9696@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Joostlek <joostlek@outlook.com>
2024-08-30 23:22:14 +02:00
Joost Lekkerkerker ac39bf991f
Rename lg_thinq domain name (#124926) 2024-08-30 22:34:34 +02:00
J. Nick Koston 0a9e20615e
Limit maximum template render output to 256KiB (#124946)
* Limit maximum template render output to 256KiB

fixes #124931

256KiB is likely to still block the event loop for an unreasonable amont of
time but its likely someone is using the template engine for large
blocks of data so we want a limit which still allows that but has
a reasonable safety to prevent the system from crashing down

* Update homeassistant/helpers/template.py
2024-08-30 22:33:57 +02:00
Joost Lekkerkerker 8c2e63807c
Make set_value required in number template (#124917)
* Make set_value required in number template

* Make set_value required in number template

* Fix tests
2024-08-30 22:02:10 +02:00
J. Nick Koston 460363c4ba
Bump aioshelly to 11.4.1 to accomodate shelly GetStatus calls that take a few seconds to respond (#124893)
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2024-08-30 09:05:16 -10:00
Steven B. 29a17edaa5
Exclude tplink firmware entities (#124935)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-08-30 08:56:30 -10:00
Louis Christ 7868ffac35
Enable strict typing checking for bluesound integration (#123821)
* Enable strict typing

* Fix types

* Update to pyblu 0.5.2 for typing support

* Update pyblu to 1.0.0

* Update pyblu to 1.0.1

* Update error handling

* Fix tests

* Remove return None from methods only returning None
2024-08-30 20:21:27 +02:00
Allen Porter cb742a677c
Add Google Photos reauth support (#124933)
* Add Google Photos reauth support

* Update tests/components/google_photos/test_config_flow.py

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-30 17:31:24 +02:00
Mr. Bubbles 50577883dc
Add option to login with username/email and password in Habitica integration (#117622)
* add login/password authentication

* add advanced config flow

* remove unused exception classes, fix errors

* update username in init

* update tests

* update strings

* combine steps with menu

* remove username from entry

* update tests

* Revert "update tests"

This reverts commit 6ac8ad6a26547b623e217db817ec4d0cf8c91f1d.

* Revert "remove username from entry"

This reverts commit d9323fb72df3f9d41be0a53bb0cbe16be718d005.

* small changes

* remove pylint broad-excep

* run habitipy init in executor

* Add text selectors

* changes
2024-08-30 17:08:06 +02:00
dontinelli 20f9b9e412
Add inverter-devices to solarlog (#123205)
* Add inverter-devices

* Minor code adjustments

* Update manifest.json

Seperate dependency upgrade to seperate PR

* Update requirements_all.txt

Seperate dependency upgrade to seperate PR

* Update requirements_test_all.txt

Seperate dependency upgrade to seperate PR

* Update homeassistant/components/solarlog/sensor.py

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

* Split up base class, document SolarLogSensorEntityDescription

* Split up sensor types

* Update snapshot

* Add all devices in config_flow

* Remove options flow

* Move devices in config_entry from options to data

* Correct mock_config_entry

* Minor adjustments

* Remove enabled_devices from config

* Remove obsolete test

* Update snapshot

* Delete obsolete code snips

* Update homeassistant/components/solarlog/sensor.py

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

* Remove obsolete test in setting up sensors

* Update homeassistant/components/solarlog/sensor.py

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

* Update homeassistant/components/solarlog/entity.py

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

* Update homeassistant/components/solarlog/config_flow.py

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

* Fix typing error

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-30 17:03:24 +02:00
Aidan Timson 1d05a917f9
Add work items per type and state counter sensors to Azure DevOps (#119737)
* Add work item data

* Add work item sensors

* Add icon

* Add test fixtures

* Add none return tests

* Apply suggestions from code review

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

* Apply suggestion

* Use icon translations

* Apply suggestions from code review

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

* Update test

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-30 16:45:46 +02:00
Joost Lekkerkerker 240bd6c3bf
Bump aiomealie to 0.9.0 (#124924)
* Bump aiomealie to 0.9.0

* Bump aiomealie to 0.9.0
2024-08-30 16:41:48 +02:00
Allen Porter c01bb44757
Add Google Photos integration (#124835)
* Add Google Photos integration

* Mark credentials typing

* Add code review suggestions to simpilfy google_photos

* Update tests/components/google_photos/conftest.py

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

* Apply suggestions from code review

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

* Fix comment typo

* Update test fixtures from review feedback

* Remove unnecessary test for services

* Remove keyword argument

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-30 07:27:19 -07:00
TimL 5e93394ae7
Ensure smilight fixtures select correct platform for tests (#124305)
* Fix return type hint for setup_integration

* Ensure platform fixture selects tested platform
2024-08-30 16:25:30 +02:00
starkillerOG a8b55a16fd
Add 100% coverage of Reolink host.py (#124577)
* Add 100% host test coverage

* Add missing test
2024-08-30 16:24:27 +02:00
LG-ThinQ-Integration d7fb245213
Add LG ThinQ Integration (#123860)
* Add manifest.json

* add switch entity

* Add tests

* fix function's name

* adjust the changes after running scipt

* Update homeassistant/components/lgthinq/__init__.py

Accept the suggested change about format.

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/lgthinq/__init__.py

Accept suggested change for log removal

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Delete homeassistant/components/lgthinq/services.yaml

* Update homeassistant/components/lgthinq/switch.py

Accpet suggested change for log removal

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/lgthinq/strings.json

Accept suggested change for service removal

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/lgthinq/manifest.json

Accept suggested change for spaces removal

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Delete homeassistant/components/lgthinq/icons.json

* Update __init__.py

Remove unnecessary check code

* Modification to pass ruff-format

* Modification for mypy issues

* Remove service registry and related code

* Update strings.json

Modification to pass the prettier issues

* Update manifest.json

Modification to pass the prettier issues

* Update homeassistant/components/lgthinq/__init__.py

Remove the unnecessary log.

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/lgthinq/__init__.py

Remove unnecessary log.

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/lgthinq/__init__.py

Remove unnecessary code.

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/lgthinq/__init__.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Modifications for the review and related autocheck

* Update homeassistant/components/lgthinq/config_flow.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/lgthinq/config_flow.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Modifications for reviews and autocheck

* Modifications for the reviews and autocheck

* Update homeassistant/components/lgthinq/const.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/lgthinq/const.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/lgthinq/const.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/lgthinq/device.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/lgthinq/device.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Remove type definition after Final

* Update const.py

Do not use Final for DOMAIN

* Refactoring for reviews
- remove thinq.py
- remove type definition
- remove entry name in config flow
- put config flow steps into a single step

* Update tests
- remove region

* Refactoring for reviews
- move property.py into PyPI library
- replace error_code handling with try/catch
- remove http response handling
- remove generic
- remove unnecessary class or map instance
- refactor adding entities logic

* Refactoring
- remove unused code
- change import path

* Update tests

* Refactoring for reviews
1. Use coordinator extended class instead of LGDevice
2. Rename entity_helper.py to entity.py
3. Move entity description to each entity file
4. Remove dynamic device creation code

* Refactoring for reviews

* Update requirements

* Fix for reviews

* Modify tests for reviews

* Update for reviews

* Remove property info and description class

* Update tests/components/lgthinq/test_config_flow.py

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

* Update tests/components/lgthinq/test_config_flow.py

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

* Update homeassistant/components/lgthinq/entity.py

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

* Update homeassistant/components/lgthinq/switch.py

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

* Update tests/components/lgthinq/test_config_flow.py

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

* Update for reviews

* Update homeassistant/components/lgthinq/switch.py

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

* Update homeassistant/components/lgthinq/switch.py

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

* Update for reviews

* Fix ruff issues

* Fix ruff check

* Fix for reviews

* Fix ruff check

* Fix for reviews

* Fix prettier failure and hassfest failure

---------

Co-authored-by: Jangwon Lee <jangwon.lee@lge.com>
Co-authored-by: yunseon.park <yunseon.park@lge.com>
Co-authored-by: nahyun.lee <nahyun.lee@lge.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-30 15:12:49 +02:00
puddly 6467c8d611
Bump ZHA to 0.0.32 (#124804)
* Always prefer XY color mode in ZHA

Remove a few more HS remnants

* Use new ZHA OTA format

* Bump ZHA to 0.0.32

* Fix existing OTA unit tests

* Fix schema conversion test to account for new command parameters

* Update snapshot with new `zcl_type` kwarg

* Migrate existing entities to icon translations

* Remove "no longer compatible" test

* Test that the library release summary is correctly exposed to ZHA

* Revert "Always prefer XY color mode in ZHA"

This reverts commit 8fb7789ea8.

* Test `release_notes`, not `release_summary`
2024-08-30 14:48:09 +02:00
Robert Svensson c47b37af4f
Use snapshot in Axis camera tests (#122677) 2024-08-30 14:40:28 +02:00
starkillerOG a5bacf5652
Add 100% coverage of Reolink switch platform (#124482)
* Add 100% switch test coverage

* use DOMAIN instead of const.DOMAIN

* Split tests and use parametrize

* Revert "Split tests and use parametrize"

This reverts commit 50d2184ce6.

* fixes
2024-08-30 14:39:12 +02:00
starkillerOG 6589216ed3
Add 100% coverage of Reolink camera platform (#124381)
* Add 100% camera test coverage

* review comments

* use DOMAIN instead of const.DOMAIN

* use entity_registry_enabled_by_default fixture

* fixes
2024-08-30 14:34:49 +02:00
starkillerOG b6dc410464
Add 100% coverage of Reolink light platform (#124382)
* Add 100% light test coverage

* review comments

* fix

* use STATE_ON

* split tests
2024-08-30 14:34:17 +02:00
starkillerOG 928ff7c78c
Add 100% coverage of Reolink sensor platform (#124472)
* Add 100% sensor test coverage

* use DOMAIN instead of const.DOMAIN

* snake_case

* better split tests

* styling

* Use entity_registry_enabled_by_default fixture
2024-08-30 14:32:57 +02:00
Lektri.co 5bd736029f
Add lektrico integration (#102371)
* Add Lektrico Integration

* Make the changes proposed by Lash-L: new coordinator.py, new entity.py; use: translation_key, last_update_sucess, PlatformNotReady; remove: global variables

* Replace FlowResult with ConfigFlowResult and add tests.

* Remove unused lines.

* Remove Options from condif_flow

* Fix ruff and mypy.

* Fix CODEOWNERS.

* Run python3 -m script.hassfest.

* Correct rebase mistake.

* Make modifications suggested by emontnemery.

* Add pytest fixtures.

* Remove meaningless patches.

* Update .coveragerc

* Replace CONF_FRIENDLY_NAME with CONF_NAME.

* Remove underscores.

* Update tests.

* Update test file with is and no config_entries. .

* Set serial_number in DeviceInfo and add return type of the async_update_data to DataUpdateCoordinator.

* Use suggested_unit_of_measurement for KILO_WATT and replace Any in value_fn (sensor file).

* Add device class duration to charging_time sensor.

* Change raising  PlatformNotReady to raising IntegrationError.

* Test the unique id of the entry.

* Rename PF Lx with Power factor Lx and remove PF from strings.json.

* Remove comment.

* Make state and limit reason sensors to be enum sensors.

* Use result variable to check unique_id in test.

* Remove CONF_NAME from entry and __init__ from LektricoFlowHandler.

* Remove session parameter from LektricoDeviceDataUpdateCoordinator.

* Use config_entry: ConfigEntry in coordinator.

* Replace Connected,NeedAuth with Waiting for Authentication.

* Use lektricowifi 0.0.29.

* Use lektricowifi 0.0.39

* Use lektricowifi 0.0.40

* Use lektricowifi 0.0.41

* Replace hass.data with entry.runtime_data

* Delete .coveragerc

* Restructure the user step

* Fix tests

* Add returned value of _async_update_data to class DataUpdateCoordinator

* Use hw_version at DeviceInfo

* Remove a variable

* Use StateType

* Replace friendly_name with device_name

* Use sentence case in translation strings

* Uncomment and fix test_discovered_zeroconf

* Add type LektricoConfigEntry

* Remove commented code

* Remove the type of coordinator in sensor async_setup_entry

* Make zeroconf test end in ABORT, not FORM

* Remove all async_block_till_done from tests

* End test_user_setup_device_offline with CREATE_ENTRY

* Patch the full Device

* Add snapshot tests

* Overwrite the type LektricoSensorEntityDescription outside of the constructor

* Test separate already_configured for zeroconf

---------

Co-authored-by: mihaela.tarjoianu <mihaela.tarjoianu@scada.ro>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-08-30 13:20:15 +02:00
Michael Arthur 54188b4128
Add returning activity to Husqvarna lawn mower (#124511)
* add returning activity to husqvarna lawn mower

* Update test, fix bug with comparison operator
2024-08-30 12:59:13 +02:00
Christopher Fenner 9e2360791d
Add hot water target temp number entity in ViCare integration (#123633)
* add DHW target temp number entity

* Update number.py

* Update strings.json

* Update strings.json

* update test snapshot

* fix snapshot
2024-08-30 11:22:48 +02:00
epenet df2ea1e875
Improve type hints in nina config flow (#124910)
* Improve type hints in nina config flow

* Apply suggestions from code review

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-30 11:21:05 +02:00
Willem-Jan van Rootselaar 252f05e0f7
Update diagnostics for BSBLan (#124508)
* update diagnostics to include static

and make room for multiple coordinator data objects

* fix mac address is not stored in config_entry but on device
2024-08-30 10:41:07 +02:00
J. Nick Koston df60e59a95
Address yale review comments part 2 (#124887)
* Remove some unneeded block till done

* Additional state check cleanups and snapshots

* Use more snapshots in yale tests
2024-08-30 09:37:19 +02:00
J. Nick Koston cf90e77e57
Add a repair issue for Yale Home users using the August integration (#124895)
The Yale Home brand will stop working with the August integration very
soon. Users must migrate to the Yale integration to avoid an interruption in service.
2024-08-30 09:35:19 +02:00
J. Nick Koston a04970bd54
Address august review comments (#124819)
* Address august review comments

Followup to https://github.com/home-assistant/core/pull/124677

* cleanup loop

* drop mixin name

* event entity add cleanup

* remove duplicate prop

* pep0695 type

* remove some not needed block till done

* cleanup august tests

* switch to freezegun

* snapshots for dev reg

* SOURCE_USER nit

* snapshots

* pytest.raises

* not loaded check
2024-08-29 19:32:13 +02:00
Jan Bouwhuis 1cb9690001
Cleanup unused `hass_storage` mocks in mqtt tests (#124846) 2024-08-29 10:52:57 +02:00
Tobias Sauerwein 3b6128d590
Bump pyatmo to 8.1.0 (#124340) 2024-08-29 07:59:07 +02:00
Jeremy Cook 7f4fca63ed
SmartThings edge driver for heatit thermostats does not require cooling setpoint (#123188)
* remove cooling setpoint requirement for thermostats. Air conditioning remains unchanged

* remove cooling setpoint requirement for thermostats. Air conditioning remains unchanged

* versions should not be set on core integrations.

* Added tests for minimal smartthings thermostat with no cooling.

* Added tests for minimal smartthings thermostat with no cooling.

* Formatted tests with ruff format
2024-08-29 07:49:05 +02:00
David Bonnes 3d39f6ce88
Fix evohome test by setting datetime to match snapshot (#124824)
* initial commit

* freeze time instead

* use fixture instead of API
2024-08-29 00:34:20 +02:00
J. Nick Koston 5f810d908f
Add missing dependencies to yale (#124821)
* Add missing dependencies to yale

* try another way

* Revert "try another way"

This reverts commit fbb731a334.

* patch out cloud setup
2024-08-29 00:28:41 +02:00
AlCalzone c7cfd56b72
Support Z-Wave JS dimming lights using color intensity (#122639)
* Z-Wave JS: support non-dimmable color lights

* remove black_is_off light, support on/off/color

* fix: tests for on/off light

* fix: typo

* remove commented out old test code

* add test for off and on

* support colored lights without separate brightness control

* add test for color-only light

* refactor: extract color only light

* fix: preserve color when changing brightness

* extend tests

* refactor again

* refactor scale check

* refactor: remove impossible check

* review feedback

* review feedback

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-08-29 00:01:53 +02:00
David Bonnes ada6b7875c
Add evohome test for setup (#123129)
* allow for different systems

* installation is a load_json_*fixture param

* allow installation to be parameterized

* test setup of various systems

* add more fixtures

* test setup of integration

* tweak test

* tweak const

* add expected state/services

* extend setup test

* tidy up

* tidy up tweaks

* code tweaks

* refactor expected results dicts

* woops

* refatcor serialize

* refactor test

* tweak

* tweak code

* rename symbol

* ensure actual I/O remains blocked

* tweak

* typo

* use constants

* Update conftest.py

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

* change filename

* add config fixture

* config is a fixture

* config is a fixture now 2

* lint

* lint

* refactor

* lint

* lint

* restore email addr

* use const

* use snapshots instead of helper class

* doctweak

* correct snapshot

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-08-28 22:40:57 +02:00
J. Nick Koston 70488ffd15
Address yale review comments (#124810)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-28 09:00:52 -10:00
epenet 2900fa733d
Use reauth_confirm in co2signal (#124781) 2024-08-28 20:43:11 +02:00
epenet 7d61dd13d9
Use reauth_confirm in discovergy (#124782) 2024-08-28 20:42:50 +02:00
Blake Bryant c049129147
Add Deako integration (#121132)
* Deako integration using pydeako

* fix: address feedback

- make unit tests more e2e
- use runtime_data to store connection

* fix: address feedback part 2

- added better type safety for Deako config entries
- refactored the config flow tests to use a conftest mock instead of directly patching
- removed pytest.mark.asyncio test decorators

* fix: address feedback pt 3

- simplify config entry type
- add test for single_instance_allowed
- remove light.py get_state(), only used once, no need to be separate function

* fix: ruff format

* Update homeassistant/components/deako/__init__.py

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-28 19:16:05 +02:00
Matthias Alphart 1650cee16c
Check KNX integration is loaded on websocket calls (#123178) 2024-08-28 18:10:38 +02:00
J. Nick Koston 03ead27f6c
Split august and yale integrations (#124677)
* Split august and yale integrations [part 1] (#122253)

* merge with dev

* Remove unused constant

* Remove yale IPv6 workaround (#123409)

* Convert yale to use oauth (#123806)

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

* Update yale for switch from pubnub to websockets (#124675)

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-28 17:46:03 +02:00
epenet edad766fd3
Use start_reauth helper method in integration tests (u-z) (#124796) 2024-08-28 16:51:16 +02:00
epenet 9bcc31a9fe
Use start_reauth helper method in integration tests (s) (#124793) 2024-08-28 16:49:05 +02:00
epenet 7652c35ee6
Use start_reauth helper method in integration tests (t) (#124794) 2024-08-28 16:47:10 +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
Robert Resch 45bb2cdd82
Build hassfest docker image and pushlish it on beta/stable releases (#124706) 2024-08-28 16:38:12 +02:00
epenet 26006f8036
Use start_reauth helper method in broadlink and bthome (#124783)
* Use start_reauth helper method in broadlink reauth tests

* Also include bthome
2024-08-28 16:34:09 +02:00
epenet ef4caa951c
Use start_reauth helper method in integration tests (p-r) (#124792) 2024-08-28 16:20:47 +02:00
Pete Sage 5824d06fd7
Add get_queue action for Sonos (#124707)
* initial commit

* use constants

* use constants

* update typing

* add queue fixture

* remove blank line

* update docstring

* update icons

* use list comprehension
2024-08-28 16:19:48 +02:00
epenet 57a73d1b1b
Use start_reauth helper method in integration tests (m-o) (#124790) 2024-08-28 16:19:31 +02:00
Aidan Timson 731aaaafe2
Update aioazuredevops to 2.2.1 (#124788)
* Update aioazuredevops to 2.2.1

* Update test
2024-08-28 16:01:32 +02:00
epenet bdd3aa8e39
Use start_reauth helper method in config flow tests (a-d) (#124780)
* Use start_reauth helper method in integration tests (a-d)

* Revert broadlink

* Revert bthome
2024-08-28 15:48:36 +02:00
epenet 99335a07e5
Use start_reauth helper method in integration tests (e-g) (#124785)
* Use start_reauth helper method in integration tests (e-g)

* Include fireservicerota
2024-08-28 15:47:57 +02:00
epenet 9d633f2087
Use start_reauth helper method in integration tests (h-l) (#124787) 2024-08-28 15:47:35 +02:00
Erik Montnemery 174f22aa2f
Prevent nesting sections in data entry flows (#124645) 2024-08-28 15:42:15 +02:00
Brett Adams e39b3796f3
Fix OAuth reauth in Tesla Fleet (#124744)
* Fix auth failure

* Test

* Fix test

* Only reauth on 401

* Cover 401 and others

* Update homeassistant/components/tesla_fleet/strings.json

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2024-08-28 14:58:16 +02:00
Erik Montnemery cff4e46694
Deduplicate TTS mocks (#124773) 2024-08-28 13:48:49 +02:00
epenet a0089685dd
Simplify aussie_broadband reauth flow (#124774)
* Simplify aussie_broadband config flow

* Apply suggestions from code review

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

* Update config_flow.py

* Update config_flow.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-28 13:19:58 +02:00
Matthias Alphart 633ff0ea42
Handle KNX expose conversion exceptions and unavailable states (#124776) 2024-08-28 13:14:34 +02:00
epenet 163795e73a
Use reauth_confirm in weatherflow_cloud (#124761) 2024-08-28 13:09:45 +02:00
epenet 45eebf3285
Use reauth_confirm in sharkiq (#124762) 2024-08-28 13:09:21 +02:00
epenet 14eec2e57a
Add start_reauth helper method to MockConfigEntry (#124767)
* Add start_reauth helper method to MockConfigEntry

* Two more
2024-08-28 13:08:26 +02:00
epenet 274d98f4d7
Standardize reauth step variable name in permobil (#124764) 2024-08-28 13:02:21 +02:00
epenet 8ff8ed7f76
Cleanup unused import in upb config flow (#124694)
* Cleanup unused import in upb config flow

* More cleanup
2024-08-28 13:00:10 +02:00
epenet 18b49a6f62
Cleanup unused import in solarlog config flow (#124713) 2024-08-28 12:59:53 +02:00
starkillerOG d1681fac72
Improve mediabrowser names for DUO lens Reolink cameras (#124766)
* Improve playback of DUO lens cameras like TrackMix

* fix styling

* Adjust tests accordingly
2024-08-28 12:54:30 +02:00
Matthias Alphart 41e66edd14
Set default name for KNX outgoing telegram source (#124439) 2024-08-28 12:31:30 +02:00
Erik Montnemery c772c4a2d5
Allow specifying icons for service sections (#124656)
* Allow specifying icons for service sections

* Improve kitchen_sink example
2024-08-28 11:15:26 +02:00
epenet bcc66c9a86
Standardize import step variable name (part 5) (#124698)
* Standardize import step variable name (part 5)

* Revert point

* Adjust soma tests
2024-08-28 09:51:49 +02:00
epenet b085ac9296
Standardize import step variable name in geonetnz_volcano (#124699) 2024-08-28 09:48:17 +02:00
Erik Montnemery 1add00a68d
Deduplicate STT mocks (#124754) 2024-08-28 09:25:56 +02:00
J. Nick Koston 42388450e1
Restore control4 integration (#124750)
* Revert "Disable control4 integration (#124746)"

This reverts commit 16dd6b1712.

* Restore control4 integration

reverts #124746 and updates the lib instead

changelog: https://github.com/lawtancool/pyControl4/compare/v1.1.0...v1.1.3

Note that there is no release yet, see https://github.com/lawtancool/pyControl4/pull/32

* Apply suggestions from code review
2024-08-28 07:54:28 +02:00
Jan Bouwhuis e720a14dc4
Cleanup removed `schema` option from mqtt vacuum platform (#124722) 2024-08-28 07:49:05 +02:00
J. Nick Koston 9d3895d69a
Bump yalexs to 8.5.4 (#124672) 2024-08-27 15:36:00 -10:00
J. Nick Koston 16dd6b1712
Disable control4 integration (#124746) 2024-08-27 15:12:52 -10:00
Jesse Hills e84d9e21f7
Handle single state requests from ESPHome (#124660)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-08-27 12:15:41 -10:00
puddly 5818e2c2d4
Yellow firmware selection options flow (#122868)
* Implement Yellow config flow for firmware selection

* Use the probed firmware type when setting up Yellow

* Add translation strings

* Ensure (most) existing `init` tests pass

* Remove multi-PAN setup config flow unit tests

* Get existing config flow unit tests passing

* Add unit tests for uninstalling multi-PAN and such

* Consolidate entity creation for Yellow and clean up steps

* Be explicit with multiple inheritance overrides

* Address review comments
2024-08-27 23:14:41 +02:00
Shay Levy 467749eb57
Fix Shelly sleepy RPC setup if device is already awake (#124734) 2024-08-27 10:48:13 -10:00
Jan Bouwhuis dd0c353afb
Fix nice_go integration tests (#124736) 2024-08-27 10:28:54 -10:00
Michael ea04269c49
Improve test coverage for nextcloud (#123148)
* add first data driven tests

* remove unused mock

* test unique_id migration

* test errors during setup

* test error during data update

* test update entity

* system_versionis always available

* make use of snapshot_platform helper

* use parametrize test for coordinator update errors

* apply suggestions

* don't touch internals on coordinator tests

* rework to use async_get_or_create instead of mock_registry
2024-08-27 19:48:39 +02:00
Erik Montnemery e2d84f9a58
Add support for multiple otbr config entries (#124289)
* Add support for multiple otbr config entries

* Fix test

* Drop useless fixture

* Address review comments

* Change unique id from xa to id

* Improve error text

* Store data in ConfigEntry.runtime_data

* Remove useless function
2024-08-27 19:07:35 +02:00
Erik Montnemery 52b6f00363
Adjust name of Google Translate TTS provider (#124688) 2024-08-27 19:07:04 +02:00
Erik Montnemery 55c42fde88
Improve validation of entity service schemas (#124102)
* Improve validation of entity service schemas

* Update tests/helpers/test_entity_platform.py

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-27 19:05:49 +02:00
epenet 0dc1eb8757
Cleanup unused import in zwave_js config flow (#124716) 2024-08-27 18:41:27 +02:00
Paulus Schoutsen 1936aeccb9
Add a test for async_converse (#124697) 2024-08-27 11:01:00 -05:00
Antoine Reversat de8bbaadd1
Fix review comments in fglair (#124710)
* Replace if len() == 0 with if not

* Replace list + filter with list comprehensions

* Move consts that are only used in one module to said module
2024-08-27 16:26:18 +02:00
Erik Montnemery 9cae786f40
Add ConfigEntries.async_get_loaded (#124705) 2024-08-27 14:20:57 +02:00
functionpointer 48292beec8
Update pyTibber to 0.30.1 (#124407)
Update to pyTibber==0.30.1
2024-08-27 13:19:15 +02:00
Matrix a45ba51f89
Update YoLink FlexFob Automation (#123631)
* Change FlexFob Trigger

* Update device trigger tests
2024-08-27 13:17:14 +02:00
Jon Seager 9119884e53
Add touchlinesl integration (#124557)
* touchlinesl: init integration

* integration(touchlinesl): address review feedback

* integration(touchlinesl): address review feedback

* integration(touchlinesl): add a coordinator to manage data updates

* integration(touchlinesl): address review feedback

* integration(touchline_sl): address feedback (and rename)

* integration(touchline_sl): address feedback

* integration(touchline_sl): address feedback

* integration(touchline_sl): update strings

* integration(touchline_sl): address feedback

* integration(touchline_sl): address feedback
2024-08-27 13:15:31 +02:00
J. Nick Koston d8161c431f
Add support for using an entityfilter to subscribe_entities (#124641)
* Add support for using an entityfilter to subscribe_entities

* filter init

* fix

* coverage
2024-08-27 11:17:05 +02:00
Erik Montnemery ef1d53c207
Include engine name in TTS WS responses (#124683) 2024-08-27 11:14:41 +02:00
Erik Montnemery 823b62d8ab
Include engine name in STT WS responses (#124684) 2024-08-27 11:14:17 +02:00
epenet dece7e0f9c
Cleanup unused import in proximity config flow (#124681)
* Cleanup unused import in proximity config flow

* Cleanup tests
2024-08-27 11:08:33 +02:00
Erik Montnemery 715f4bd2c3
Set deprecated flag on TTS engines replaced by entities in WS list (#124676) 2024-08-27 10:09:49 +02:00
Richard Kroegel 2fe19c04b9
Bump bimmer_connected to 0.16.2 (#124651) 2024-08-26 13:57:25 -10:00
Maciej Bieniek b960ebeb8b
Add WS outbound config to Shelly diagnostics (#124654)
Add WS Outbound config to diagnostics
2024-08-26 22:17:38 +03:00
starkillerOG 7334fb0125
Add Reolink chime play action (#123245)
* Add chime play service

* fix supported_feature

* finalize

* add tests

* Adjust to device service

* fix issue

* Add tests

* actions -> services

* fix styling

* Use conftest fixture for test_chime

* Update tests/components/reolink/test_services.py

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

* use ATTR_RINGTONE and rename chime_play to play_chime

* Add translatable exceptions

* fix styling

* Remove option to use entity_id

* fixes

* Fix translations

* fix

* fix translation key

* remove translation key

* use callback for async_setup_services

* fix styling

* Add test_play_chime_service_unloaded

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-08-26 21:12:32 +02:00
Maciej Bieniek d8fe3c5377
Add missing units for `xpercent`, `xfreq` and `xcounts` Shelly sensors (#124288) 2024-08-26 08:59:18 -10:00
J. Nick Koston 76182c246d
Auto configure outbound websocket for sleepy shelly RPC devices (#124545) 2024-08-26 08:37:36 -10:00
Erik Montnemery b9aaba0432
Prevent duplicating constraints during schema migration (#124616) 2024-08-26 08:35:54 -10:00
Paulus Schoutsen 156948c496
Fix defaults for cloud STT/TTS (#121229)
* Fix defaults for cloud STT/TTS

* Prefer entity over legacy provider

* Remove unrealistic tests

* Add tests which show cloud stt/tts entity is preferred

---------

Co-authored-by: Erik <erik@montnemery.com>
2024-08-26 19:39:09 +02:00
ilan 547dbf77aa
Use runtime data instead of hass.data in jvc projector (#124608)
* feat: use runtime data instead of hass.data

* fix: extend ConfigEntry
2024-08-26 19:26:53 +02:00
Álvaro Fernández Rojas 95fa123a0b
Add Airzone main zone mode select (#124566)
* airzone: select: add zone master mode

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone: select: use MAIN instead of MASTER

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone: select: call async_add_entities once

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone: select: add options lambda function

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone: select: implement requested changes

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* airzone: select: options_fn: return list

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-08-26 17:57:31 +02:00
Erik Montnemery f4528b288f
Fix overriding name in MockTTSEntity (#124639)
* Fix overriding name in MockTTSEntity

* Fix
2024-08-26 15:28:55 +02:00
Erik Montnemery 7b71f024fb
Prefer stt entity over legacy stt provider (#124625)
* Prefer stt entity over legacy stt provider

* Update assist_pipeline tests
2024-08-26 13:43:14 +02:00
Erik Montnemery cafd953f87
Add test showing we prefer tts entity over legacy tts provider (#124624) 2024-08-26 11:10:58 +02:00
Jan Bouwhuis 65216df3a5
Auto recover mqtt config entry secret if Mosquitto add-on was re-installed (#124514)
Auto recover mqtt config entry secret if Mosquitto add-on is re-installed
2024-08-26 09:40:25 +02:00
Christopher Fenner 0591b5e47b
Improve code quality for ViCare integration (#124613)
* move type to module

* set translation key outside of init

* align import alias

* align constructor parameter order/naming

* move static attr init outside init function

* add missing types

* fix test

* revert move of _attributes
2024-08-26 08:30:28 +02:00
Jeef 0dfe12840d
Add SimpleFin binary sensor for errors (#122554)
* Binary Sensor Support

* updated requirements

* ng ambr

* update strings.json

* update snapshot
2024-08-25 20:57:57 -07:00
Pete Sage 8bc9fd23bb
Add Sonos tests for announce and update error handling (#124539)
* initial commit

* update error message

* use match for error message
2024-08-25 21:25:20 +02:00
Allen Porter 18212052a4
Update nest events to include attachment image and video urls (#124554) 2024-08-25 21:24:06 +02:00
Allen Porter 3304e27fa3
Add ollama context window size configuration (#124555)
* Add ollama context window size configuration

* Set higher max context size
2024-08-25 21:22:57 +02:00
J. Nick Koston be206156b0
Fix shelly sleepy entities never being created (#124547) 2024-08-25 09:21:23 -10:00
J. Nick Koston 0628f96713
Ensure all chars are polling when requesting manual update in homekit_controller (#124582)
related issue #123963
2024-08-25 21:21:15 +02:00
Mr. Bubbles c9e7c76ee5
Fix missing id in Habitica completed todos API response (#124565)
* Fix missing id in completed todos API response

* Copy id only if none

* Update homeassistant/components/habitica/coordinator.py

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-08-25 15:15:47 +02:00
Jan Bouwhuis 5550b1a74e
Only support remote activity on Alexa if feature is set and at least one feature is in the activity_list (#124567)
Only support remote activity on Alexa if feaure is set and at least one feature is in the activity_list
2024-08-25 15:09:08 +02:00
IceBotYT fcf0bef2cd
Remove platform from unique ID in Nice G.O. (#124548)
* Remove domain from unique ID in Nice G.O.

* Snapshots
2024-08-25 14:13:50 +02:00
Michael Hansen 156e39ebb2
Add minimum command seconds to VAD (#124447) 2024-08-24 22:21:03 +02:00
Allen Porter c506188c13
Fix nest event entities to only register a single event per session (#124535) 2024-08-24 22:17:59 +02:00
Allen Porter 3e3d27f48d
Add nest event platform (#123042)
* Add nest event platform

* Translate entities

* Put motion events into a single entity type

* Remove none types

* Set event entity descriptions as kw only

* Update translations for event entities

* Add single event entity per trait type

* Update translation keys
2024-08-24 08:44:44 -07:00
red-island 32f75597a9
Fix tilt calculation for HomeKit cover devices (#123532) 2024-08-24 16:12:32 +01:00
Markus Jacobsen 5dc03752ca
Add type hinting to Bang & Olufsen test (#124423) 2024-08-24 12:59:08 +02:00
Robert Svensson 9e13184256
Add deCONZ Air Purifier Fan Mode select entity support (#124513)
* Add deCONZ Air Purifier Fan Mode select entity support

* Remove unused constants
2024-08-24 09:51:09 +02:00
Steven B. e26d363b5e
Convert ring integration to the async ring-doorbell api (#124365)
* Bump ring-doorbell to 0.9.0

* Convert ring integration to async ring-doorbell api

* Use mock auth fixture class to get token_updater

* Fix typo in fixture name
2024-08-24 08:23:31 +02:00
Joost Lekkerkerker 7ae8f4c9d0
Don't abort airgradient user flow if flow in progress (#124300) 2024-08-24 07:20:00 +02:00
Christophe Gagnier 79ba315008
Add `charging enabled` switch to TechnoVE (#121484)
* Add session_active switch to TechnoVE

* Replace multi-line lambda with function def

* Make lambda one line
2024-08-23 22:45:26 +02:00
Jan Bouwhuis 26e87509be
Cleanup hassio fixtures in home assistant hardware integration tests (#124500) 2024-08-23 19:40:35 +02:00
J. Nick Koston af2fec89d8
Bump yalexs to 8.3.3 (#124492)
* Bump yalexs to 8.2.0

changelog: https://github.com/bdraco/yalexs/compare/v8.1.4...v8.2.0

* bump to 8.3.1

* bump

* one more bump to ensure we do not hit the ratelimit/shutdown cleanly

* empty commit to restart ci since close/open did not work in flight
2024-08-23 19:23:05 +02:00
Steven B. 61cee043e6
Do not report tplink discovery failures as legacy connection failures (#124432)
* Do not report discovery failures as legacy connection failures

* Fix catching BaseException
2024-08-23 10:17:48 -05:00
Jan Bouwhuis fd57931cc9
Cleanup redundant fixtures on matter integration for addon tests (#124445) 2024-08-23 16:27:14 +02:00
Jan Bouwhuis 44b6bca89a
Refactor and cleanup zwave_js fixtures to share them (#124485)
Refactor and cleanup zwave_js fixtures to use
2024-08-23 15:42:57 +02:00
starkillerOG 0bd9386df2
Reolink add 100% coverage of siren platform (#124474) 2024-08-23 15:15:04 +02:00
Ino Dekker 611723e44b
Bump aiohue to version 4.7.3 (#124436) 2024-08-23 13:43:17 +02:00
starkillerOG ab064a7f36
Reolink add 100% coverage of number platform (#124465)
* Add 100% number test coverage

* review comments

* fix styling

* re-add AsyncMock for chime
2024-08-23 12:34:58 +02:00
Willem-Jan van Rootselaar 4e94ce0cc7
Refactor bsblan coordinator (#124308)
* chore: Refactor BSBLanUpdateCoordinator to improve code readability and maintainability

* feat: Add BSBLan integration models

This commit adds the models for the BSB-Lan integration. It includes a dataclass for the BSBLanCoordinatorData, which stores the state and sensor information.

* refactor: Update BSBLANClimate class to use DataUpdateCoordinator without specifying the State type

* chore: Remove unused Sensor import in BSBLan models

* feat: Refactor BSBLanEntity to use CoordinatorEntity

The BSBLanEntity class has been refactored to inherit from the CoordinatorEntity class, which provides better integration with the update coordinator. This change improves code readability and maintainability.

* refactor: Remove unused config_entry variable in BSBLanUpdateCoordinator

* refactor: Update BSBLANClimate class to use DataUpdateCoordinator

Refactor the BSBLANClimate class to use the Coordinator of the entity

* refactor: Update tests to use the new structure

* fix coverage

 it should be the same as before

* refactor: moved dataclass BSBLanCoordinatorData

* use the data class inside init

* refactor: Remove unused config_entry variable in BSBLanUpdateCoordinator

* refactor: use BSBLanData from init

* remove entry data from diagnostics

* fix: add random interval back

* refactor: Simplify coordinator_data assignment in async_get_config_entry_diagnostics

* revert back to original except dataclass import

* revert: Add MAC address back to device info in BSBLanEntity
2024-08-23 08:42:36 +02:00
Jan Bouwhuis 51dba1eec3
Cleanup redundant fixtures and move all other hassio addon fixtures to be shared (#124437) 2024-08-22 20:58:05 +02:00
Jan Bouwhuis e13f8996f2
Fix Import ReceivePayloadType (#124431)
* Fix Import ReceivePayloadType

* Do not assert export `ReceivePayloadType` on mqtt integration level as helper should be used.
2024-08-22 20:13:30 +02:00
Jan Bouwhuis 7887bcba89
Allow to set options for an MQTT enum sensor (#123248)
* Add options attribute support for MQTT sensor

* Add comment
2024-08-22 19:16:08 +02:00
Michael Arthur 3a92899081
Add LawnMowerActivity.RETURNING to Lawn Mower (#124261)
* Add returning activity state

* update tests

* update tests

* set can return to returning state

* update MQTT tests

* update mqtt back to docked

* fix up other tests that I broke again

* re-add mower_can_dock
2024-08-22 19:13:54 +02:00
Petro31 5d64155bb6
Add zip to template engine (#122460)
* add zip to template engine

* fix doc strings
2024-08-22 19:11:08 +02:00
J. Nick Koston 6f66f37fc7
Shutdown database engine before waiting for executor shutdown (#117339)
* Close database connection before stopping the executor

related issue #117004

* Close database connection before waiting for database executor to finish

related issue #117004

* fix test

* fix

* drop unused arg

* Revert "drop unused arg"

This reverts commit 8a9fe6a24a.

* docstring

* comment
2024-08-22 16:47:22 +02:00
Markus Jacobsen 890c6e97fd
Add Bang & Olufsen websocket testing (#123075)
* Add websocket.py testing
Convert media_player testing dispatch events to the proper websocket events

* Fix WebSocket testing by using callbacks

* Add typing

* Add caplog checking
Check dispatch events directly
Check event bus directly
Avoid using internals

* Fix event and / dispatch callbacks not necessarily being checked

* Remove unnecessary caplog log level handling
2024-08-22 16:31:15 +02:00
Erik Montnemery 404a7bab18
Wrap OSError in loader.load_yaml (#124406) 2024-08-22 09:06:41 -05:00
Markus Jacobsen 2337c3ff69
Improve Bang olufsen test typing and parameter order (#124419)
* Add proper media_player typing to tests

* Add proper typing to init tests

* Add proper typing to config_flow tests

* Fix order of parameters of tests

* Add more typing
Reorder parameters
2024-08-22 15:49:42 +02:00
J. Nick Koston df82567356
Fix shelly available check when device is not initialized (#124182)
* Fix shelly available check when device is not initialized

available needs to check for device.initialized or if the device
is sleepy as calls to status will raise NotInitialized which results
in many unretrieved exceptions while writing state

fixes
```
2024-08-18 09:33:03.757 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 453, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners
    update_callback()
  File "/config/custom_components/shelly/entity.py", line 374, in _update_callback
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state
    self.__async_calculate_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in __async_calculate_state
    state = self._stringify_state(available)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1011, in _stringify_state
    if (state := self.state) is None:
                 ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/binary_sensor/__init__.py", line 293, in state
    if (is_on := self.is_on) is None:
                 ^^^^^^^^^^
  File "/config/custom_components/shelly/binary_sensor.py", line 331, in is_on
    return bool(self.attribute_value)
                ^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/shelly/entity.py", line 545, in attribute_value
    self._last_value = self.sub_status
                       ^^^^^^^^^^^^^^^
  File "/config/custom_components/shelly/entity.py", line 534, in sub_status
    return self.status[self.entity_description.sub_key]
           ^^^^^^^^^^^
  File "/config/custom_components/shelly/entity.py", line 364, in status
    return cast(dict, self.coordinator.device.status[self.key])
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aioshelly/rpc_device/device.py", line 390, in status
    raise NotInitialized
aioshelly.exceptions.NotInitialized
```

* tweak

* cover

* fix

* cover

* fixes
2024-08-22 16:14:45 +03:00
epenet 403db6277f
Improve type hints in lcn tests (#124415) 2024-08-22 14:50:45 +02:00
Erik Montnemery ab6d0e3277
Handle !include without arguments in configuration.yaml (#124399)
* Prevent !include without arguments in configuration.yaml from crashing core

* Add test
2024-08-22 12:08:24 +02:00
Jan Bouwhuis b541d214ed
Fix lingering mqtt unload entry test (#124392) 2024-08-22 11:03:35 +02:00
G Johansson 0c8ed18ca5
Use setup_test_component_platform in Climate tests (#123941)
* Use setup_test_component_platform in Climate tests

* Rename mock integration helper

* Change name to register_test_integration

* Change name in tests

* Fix ruff format
2024-08-22 09:38:27 +02:00
Jan Bouwhuis 61114d8328
Install and start Mosquitto MQTT broker add on from MQTT config flow (#124106)
* Opt in to install Mosquitto broker add-on in MQTT config flow

* rephrase

* Tests with supervisor and running add-on

* Complete tests for success flows

* Also set up entry in success flow

* Use realistic names for addon and broker

* Finetuning and fail test cases

* Spelling

* Improve translation strings

* Update addon docstr

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

* Raise AddonError if add-on does not start

* Only show the option to use the add-on

* Simplify flow, rework and cleanup

* Revert unrelated cleanup, process suggestion

* Move ADDON_SLUG const to addon module

* Move fixture to component level

* Move back supervisor fixture

* Move addon_setup_time_fixture and superfixe to config flow model tests

* Refactor hassio fixture

* Rename helpers as they are no fixtures, remove fixture from their names

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-08-22 09:07:45 +02:00
Mr. Bubbles 67bc568db6
Add tests for Bring integration (#123087)
* Add tests to bring integration

* use more parametrization

* json fixture loading, move notification tests
2024-08-21 22:18:33 +02:00
Patrick Frazer 5f53d3f917
Add DROP Alert product support (#117867)
* Add DROP Alert product support

* Add DROP Alert to sensor selftest

* Fix Alert sensor naming ambiguity

* Reorder a constant

* Alphabetize strings

* Remove unnecessary translation key
2024-08-21 21:56:59 +02:00
Anrijs 4ef55e5088
Add Aranet Radon Plus support (#124197)
added aranet radon plus support
2024-08-21 22:12:20 +03:00
Pete Sage 9399a54c7a
Fix Spotify Media Browsing fails for new config entries (#124368)
* initial commit

* tests

* tests

* update tests

* update tests

* update tests
2024-08-21 21:05:09 +02:00
Markus Jacobsen d86b816491
Convert Bang & Olufsen testing logging patches to caplog (#124366)
* Convert logging patches to caplog

* Remove unnecessary caplog log level handling
2024-08-21 17:11:01 +02:00
mvn23 ec256166cc
Rename OpenThermGatewayDevice to OpenThermGatewayHub (#124361)
* Rename OpenThermGatewayDevice to OpenThermGatewayHub
Update references accordingly

* Update tests
2024-08-21 16:56:57 +02:00
Jeef 9de90ca7d5
Fix Weatherflow Cloud lightning (#124082)
* Adding a error condition and a fix for missing lightning epoch values

* adding parentheses around the lambda

* Updating PR

* removed the dumb test

* Updated tests to support good stuff

* Updated snapshots
2024-08-21 16:16:16 +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
Christopher Fenner 52c0a09107
Add test cases for ViCare entities (#122983)
* add test case

* add test case

* add test case

* add test case

* add test case

* add test case

* remove commented code

* test only fan platform

* add test case

* remove fan mock
2024-08-21 14:42:58 +02:00
Mr. Bubbles 8d97fafb2d
Add tests for IronOS integration (#123078)
Add tests
2024-08-21 14:03:40 +02:00
Michał Jaworski 316a57864a
Extend blebox shutterbox tilt support (#110547)
* blebox: extend shutterbox tilt support

* feat: add test for new open/close tilt code in blebox covers

* blebox: resign from using future compat branch for cover open/close tilt

* Update homeassistant/components/blebox/cover.py

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

* blebox: revert changes to BLEBOX_TO_HASS_COVER_STATES

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-08-21 12:53:40 +02:00
Andre Lengwenus c276cfc371
Add custom panel for LCN configuration (#108664)
* Add LCN panel using lcn-frontend module

* Move panel from sidebar to integration configuration

* Change OptionFlow to reconfigure step

* Change OptionFlow to reconfigure step

* Remove deprecation warning

* Fix docstring

* Add tests for lcn websockets

* Remove deepcopy

* Bump lcn-frontend to 0.1.3

* Add tests for lcn websockets

* Remove websocket command lcn/hosts

* Websocket scan tests cover modules not stored in config_entry

* Add comment to mock of hass.http

* Add a decorater to ensure the config_entry exists and return it

* Use entry_id instead of host_id

* Bump lcn-frontend to 0.1.5

* Use auto_id for websocket client send_json

* Create issues on yaml import errors

* Remove low level key deprecation warnings

* Method renaming

* Change issue id in issue creation

* Update tests for issue creation
2024-08-21 11:33:47 +02:00
Pete Sage d327ec904c
Add Sonos tests for media_player play Sonos Playlist and improve error handling (#124126)
* initial commit

* initial commit

* initial commit

* updates

* add json fixture

* use match on pytest.raises
2024-08-20 18:38:04 +02:00
Jan Bouwhuis b74aced6f3
Subscribe per component for MQTT discovery (#119974)
* Subscribe per component for MQTT discovery

* Use single assignment

* Handle wildcard subscriptions first

* Split subsRecription handling, update helper

* Fix help_all_subscribe_calls

* Fix import

* Fix test

* Update import order

* Undo move self._last_subscribe

* Recover removed test

* Revert not needed changes to binary_sensor platform tests

* Revert line removal

* Rework interation of discovery topics

* Reduce

* Add comment

* Move comment

* Chain subscriptions
2024-08-20 17:02:48 +02:00
Erik Montnemery a1e3e7f24f
Deduplicate OTBR test fixtures (#124293) 2024-08-20 14:58:34 +02:00
Erik Montnemery 15976b8207
Disable expensive pskc computation in all otbr tests (#124292)
* Disable expensive pskc computation in all otbr tests

* Update tests and fixtures which patched compute_pskc
2024-08-20 14:53:06 +02:00