Commit Graph

20480 Commits (61a359e4d21140b7147abd006e07ee70689110b4)

Author SHA1 Message Date
Jan-Philipp Benecke 34cf0c5721
Use `setup_test_component_platform` func for cover entity component tests instead of `hass.components` (#114010)
* Use `mock_platform` for cover entity component tests instead of `hass.components`

* Remove setup fixture and use helper function

* Remove is_on from MockCover

* Run ruff

* Do not override state in `MockCover` in cover tests

* Remove is_on from MockCover
2024-03-27 12:20:19 +01:00
Marc Mueller 3929273b41
Allow float for int argument type [pylint plugin] (#114105) 2024-03-27 11:51:27 +01:00
Jan-Philipp Benecke 5c97049f2e
Do not override state property in `MockEntity` (#114231)
Do not override state in `MockEntity`
2024-03-27 11:36:00 +01:00
Marc Mueller 44eeb2eb5e
Allow Humidifier.current_humidity to be a float (#111297)
* Allow Humidifier.current_humidity to be a float

* Code review

* Allow climate humidity values to be float

* Update demo integration
2024-03-27 11:19:20 +01:00
G Johansson b190cdceaf
Remove hourly weather entity from metoffice (#112452) 2024-03-27 11:06:31 +01:00
Shai Ungar 69356300f0
Address late review of 17track config flow (#114283)
* some fixes for 17track

* remove await

* fix test
2024-03-27 11:06:13 +01:00
J. Nick Koston 2421b42f10
Refactor yeelight scanner to avoid creating tasks to wait for scanner start (#113919) 2024-03-27 10:17:35 +01:00
Franck Nijhof dd2d79b77e
Refactor/fix search component, including labels & floors support (#114206)
Co-authored-by: TheJulianJES <TheJulianJES@users.noreply.github.com>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-03-27 09:39:05 +01:00
Marc Mueller 1d2c2d2055
Move SignalTypes to util (#114236) 2024-03-27 08:41:44 +01:00
Michael Hansen 72fed878b4
Add Ollama conversation agent (#113962)
* Add ollama conversation agent

* Change iot class

* Much better default template

* Slight adjustment to prompt

* Make casing consistent

* Switch to ollama Python fork

* Add prompt to tests

* Rename to "ollama"

* Download models in config flow

* Update homeassistant/components/ollama/config_flow.py

---------

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

* Now function

* Ruff format
2024-03-26 21:56:38 +01:00
Jan-Philipp Benecke e80d73783c
Do not late import config_entry in `setup_test_component_platform` test helper (#114260) 2024-03-26 21:54:09 +01:00
Franck Nijhof 9a32d1bbd5
Add label selector (#111029)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-03-26 20:31:06 +01:00
Jan-Philipp Benecke dce3bde0ab
Use `setup_test_component_platform` helper for update entity component tests instead of `hass.components` (#114203)
* Use `setup_test_component_platform` helper for update entity component tests instead of `hass.components`

* Run ruff format
2024-03-26 20:20:08 +01:00
Ron Weikamp e1036b3af0
Refactor Riemann sum integral sensor to prepare for time based trigger (#113932)
* Refactor Integration sensor.

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

* Merge two methods to one.

* Method renaming: _handle_state_change

* Move async_write_ha_state to the caller.

* Add comment on why attr_icon is set to None

* Remove possible None type of State in validation methods.

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

* Explain derived unit after integration.

* Renaming to _multiply_unit_with_time and elaborate in docstring.

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

* One function for unit of measurement related steps.

* Improve docstring of _multiply_unit_with_time

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

* Apply f-string suggestions from code review

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

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

* Apply suggestions from code review

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

* Update homeassistant/components/integration/sensor.py

* Update homeassistant/components/integration/sensor.py

* Update homeassistant/components/integration/sensor.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Diogo Gomes <diogogomes@gmail.com>
2024-03-26 19:09:48 +01:00
Franck Nijhof c247534731
Default floor level to None (and allow unsetting it) (#114249) 2024-03-26 18:58:25 +01:00
Marc Mueller c8260a5966
Remove test cases for task eager_start <3.12 (#114243) 2024-03-26 15:52:38 +01:00
Marc Mueller eb81a4204e
Allow string formatting for dispatcher SignalType (#114174) 2024-03-26 10:38:29 +01:00
Erik Montnemery dd43947ca0
Add test to ensure non callback event filter is rejected (#114182) 2024-03-26 10:36:08 +01:00
Erik Montnemery bac527f289
Don't allow listening to state_reported in event triggers (#114191)
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2024-03-26 10:35:47 +01:00
Duco Sebel 788813aad6
Implement Identify button and Cloud connection toggle for HomeWizard Watermeter (#113814) 2024-03-26 10:34:36 +01:00
Franck Nijhof 5c69e0d2c6
Add label template functions (#111024) 2024-03-26 10:32:29 +01:00
Joost Lekkerkerker ddee999843
Fix motion blinds formatting (#114222) 2024-03-26 09:57:19 +01:00
Lenn 70c4fa8475
Add Motionblinds BLE integration (#109497)
* initial fork

* intial tests

* Initial test coverage

* extra coverage

* complete config flow tests

* fix generated

* Update CODEOWNERS

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

* Remove Button, Select and Sensor platform for initial PR

* Update manifest.json

* Change info logs to debug in cover

* Use _abort_if_unique_id_configured instead of custom loop checking existing entries

* Change platforms list to PLATFORMS global

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

* Remove VERSION from ConfigFlow

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

* Replace all info logs by debug

* Use instance attributes in ConfigFlow

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

* Add return type and docstring to init in ConfigFlow

* Add recovery to tests containing errors

* Make NoBluetoothAdapter and NoDevicesFound abort instead of show error

* Change info logs to debug

* Add and change integration type from hub to device

* Use CONF_ADDRESS from homeassistant.const

* Move cover attributes initialization out of constructor

* Change CONF_ADDRESS in tests from const to homeassistant.const

* Remove unused part of tests

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

* Change _attr_connection_type to _connection_type

* Add connections to DeviceInfo

* Add model to DeviceInfo and change MotionBlindType values

* Remove identifiers from DeviceInfo

* Move constants from const to library

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

* Remove platforms from init

* Remove button platform

* Remove select platform

* Remove sensor platform

* Bump motionblindsble to 0.0.4

* Remove closed, opening and closing attribute default values

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

* Remove CONFIG_SCHEMA from init

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

* Remove unused platform attributes and icons

* Re-add _attr_is_closed to GenericBlind to fix error

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

* Move updating of position on disconnect to library

* Remove type hints, keep for _attr_is_closed

* Use DISPLAY_NAME constant from library for display name

* Add TYPE_CHECKING condition to assert in config_flow

* Re-add CONFIG_SCHEMA to __init__ to pass hassfest

* Change FlowResult type to ConfigFlowResult

* Fix import in tests

* Fix ruff import

* Fix tests by using value of enum

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

* Fix using name instead of value for MotionBlindType

* Improve position None handling

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

* Improve tilt None handling

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

* Change BLIND_TO_ENTITY_TYPE name

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

* Add base entity

* Move async_update to base entity

* Move unique ID with suffix to base class

* Add entity.py to .coveragerc

* Remove extra state attribute connection type

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

* Remove use of field for key and translation_key in MotionCoverEntityDescription

* Remove entity translation with extra state_attributes from strings.json

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

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

* Change if block in async_update_running

* Use if blocks in async_update_position

* Add additional scanner check before show_form

* Remove default value of device_class in MotionCoverEntityDescription

* Fix entry.data[CONF_BLIND_TYPE] uppercase

* Fix device info model name

* Bump motionblindsble to 0.0.5

* Fix tests

* Move entity_description to MotionblindsBLEEntity

* Change double roller blind name

* Bump motionblindsble to 0.0.6

* Fix ruff

* Use status_query for async_update

* Bump motionblindsble to 0.0.7

* Change bluetooth local name

* Set kw_only=True for dataclass

* Change name of GenericBlind

* Change scanner_count conditional

* Wrap async_register_callback in entry.async_on_unload

* Bump motionblindsble to 0.0.8

* Use set_create_task_factory and set_call_later_factory

* Update bluetooth.py generated

* Simplify COVER_TYPES dictionary

* Move registering callbacks to async_added_to_hass

* Remove check for ATTR_POSITION and ATTR_TILT_POSITION in kwargs

* Add naming consistency for device and entry

* Use if block instead of ternary for _attr_unique_id

* Improve errors ternary in config_flow

* Use set instead of list for running_type

* Improve errors ternary in config_flow

* Remove init from MotionblindsBLECoverEntity and move debug log to async_added_to_hass

* Update debug log create cover

* Fix ruff

* Use identity check instead of equals

* Use identity check instead of equals

* Change MotionblindsBLECoverEntityDescription name

* Change debug log text

* Remove ATTR_CONNECTION from const

* Add types for variables in async_setup_entry

* Add types for variables in async_setup_entry

* Change PositionBlind class name to PositionCover etc

* Improve docstrings

* Improve docstrings

---------

Co-authored-by: starkillerOG <starkiller.og@gmail.com>
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-26 09:52:04 +01:00
J. Nick Koston 54a69a2687
Remove async_get_device_class_lookup from entity_registry (#114212)
This function was only ever used in homekit, and since there is
now an index of devices in the entity registry, homekit no longer
uses it.

I searched github code for all references to async_get_device_class_lookup
and the only think I could find using it were forks of core. It seems
unlikely that any custom components are affected by removing this
function
2024-03-26 09:22:53 +01:00
J. Nick Koston cabc4f797a
Preload storage for integrations we know we are going to setup (#114192) 2024-03-25 15:49:54 -10:00
Jan-Philipp Benecke 9580adfde9
Use new `setup_test_component_platform` helper instead of test fixture for light platform (#114200) 2024-03-26 00:17:16 +01:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Jan-Philipp Benecke 2f0cfc8b61
Remove deprecated `hass.components` from system_health tests (#114207) 2024-03-26 00:39:31 +02:00
Jan Bouwhuis 18174ad47d
Improve test coverage mqtt discovery test (#114188) 2024-03-25 22:41:11 +01:00
Jan-Philipp Benecke 9b682388f5
Add generic test component platform setup function (#114016)
* Add generic entity platform setup fixture

* rename fixture

* No need for passing hass

* Make function instead of fixture

* Improve typing

* Use Sequence instead

* Migrate flux to use the new helper

* Use list instead

* Use Sequence instead
2024-03-25 21:36:17 +01:00
Erik Montnemery e2ee623d23
Add restrictions for listening to event_reported events (#114183)
* Add restrictions for listening to event_reported events

* Update homeassistant/core.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-25 19:16:50 +01:00
J. Nick Koston c3f4aca4e3
Add reauth support to NUT (#114131) 2024-03-25 07:59:46 -10:00
Robert Resch 135c40cad8
Add Ecovacs last job event entity (#113826)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-25 18:31:04 +01:00
G Johansson 5e70faca5f
Refactor options flow in dnsip (#114058)
* Refactor options flow in dnsip

* Mods
2024-03-25 17:38:02 +01:00
Robert Svensson c1e1db9863
Adapt to Axis library file structure changes (#114181)
* Adapt to axis library file structure changes

* Bump axis to v59
2024-03-25 12:16:41 -04:00
Thomas55555 b71cbeff51
Bump aioautomower to 2024.3.4 (#114127)
* Bump aioautomower to 2024.3.4

* Update homeassistant/components/husqvarna_automower/sensor.py

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

* adjust imports

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-25 16:11:12 +01:00
Kevin Stillhammer 3d6600364b
Bump pywaze to 1.0.0 (#108613) 2024-03-25 16:08:57 +01:00
Marc Mueller 81c34ac952
Fix spelling [docstrings + comments] (#114168) 2024-03-25 11:33:00 +01:00
Marc Mueller 9b7cc088be
Fix spelling [runtime] (#114169) 2024-03-25 11:32:50 +01:00
G Johansson 3ba1b82723
Remove hourly weather entity from met_eireann (#112449) 2024-03-25 11:30:50 +01:00
J. Nick Koston ada781025b
Avoid homekit random id generation for existing entries (#114144) 2024-03-25 11:28:26 +01:00
Bouwe Westerdijk ace21c876c
Bump plugwise to v0.37.1 (#113245) 2024-03-25 11:15:33 +01:00
Álvaro Fernández Rojas 33d9947a70
Add climate fan modes for Airzone Cloud Aidoo devices (#103574)
* airzone_cloud: climate: add Aidoo speeds support

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

* Add suggested changes

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

* airzone_cloud: climate: rename _set_fan_speeds()

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

* airzone_cloud: climate: drop BASE_FAN_SPEEDS

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

* airzone_cloud: climate: refactor FAN_AUTO speed

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

* airzone_cloud: climate: document standard speeds replacement

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

* airzone_cloud: climate: fix Homekit comment

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

* airzone_cloud: climate: consistent fan speed names

Instead of mixing "low", "medium" and "high" with percentages, let's use only
percentages if there are more speeds.

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-03-25 10:50:04 +01:00
Jan Bouwhuis 19fa39d556
Generate ConfigValidationError message from English translations (#113844)
* Fetch ConfigValidationError message from translation cache

* Sync error logmessages with translation cache

* More sync

* Cleanup

* Remove unrelated change

* Follow up comments

* Rebase and improve contructor

* Improve name

* Rename to MULTIPLE_INTEGRATION_CONFIG_ERRORS
2024-03-25 10:39:30 +01:00
Christopher Bailey 3e01085c91
Add repair for UniFi Protect if RTSP is disabled on camera (#114088)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-24 17:30:52 -10:00
Yuxin Wang 76052a5385
Implement diagnostics platform for APCUPSD (#112284)
* Implement diagnostic platform for APCUPSd

* Put APCUPSd in gold quality scale

* Revert quality scale update

* Use snapshot testing for apcupsd

* Prettify the code
2024-03-24 23:40:41 +01:00
Jan Bouwhuis c94d8c541b
Fix google assistant diagnostics test (#114111)
Improve google assistant diagnostics test
2024-03-24 19:05:47 +01:00
Jan Bouwhuis 67ab49b825
Fetch ServiceNotFound message from translation cache and fix super (#114084)
* Fetch ServiceNotFound message from translation cache and fix super

* Fix tests trace component

* Fix script errors
2024-03-24 07:41:13 -10:00
J. Nick Koston 6371b344b9
Ensure discovery can setup legacy device tracker platforms (#114101) 2024-03-24 07:38:05 -10:00
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