Commit Graph

17351 Commits (b5bd91096359c9cd7f070bac8015b2ae084d6488)

Author SHA1 Message Date
Joost Lekkerkerker c7cb508896
Add diagnostics to ccm15 (#106329)
* Add diagnostics to ccm15

* Update homeassistant/components/ccm15/diagnostics.py

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

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-24 02:34:36 +01:00
J. Nick Koston f097e2a2f6
Add support for attribute caching to the media_player platform (#106257) 2023-12-23 13:33:11 -10:00
J. Nick Koston 6e6d7a0c92
Add support for attribute caching to the event platform (#106330) 2023-12-23 13:23:32 -10:00
J. Nick Koston e43f4412fa
Fix native_step in number not looking at _attr_native_step (#106327) 2023-12-23 13:20:24 -10:00
J. Nick Koston abd3c54cbe
Add support for attribute caching to the camera platform (#106256) 2023-12-23 13:01:47 -10:00
Kevin Worrel 4c912fcf1b
Update test data for screenlogic (#106325) 2023-12-23 11:57:27 -10:00
Oscar Calvo b2caf15434
New integration Midea ccm15 climate (#94824)
* Initial commit

* Correct settings for config flow

* Use scan interval

* Store proper data

* Remove circular dependency

* Remove circular dependency

* Integration can be initialized

* Fix defaults

* Add setup entry

* Add setup entry

* Dont block forever

* Poll during async_setup_entry

* Remove not needed async methods

* Add debug info

* Parse binary data

* Parse binary data

* Use data to update device

* Use data to update device

* Add CCM15DeviceState

* Use DataCoordinator

* Use DataCoordinator

* Use DataCoordinator

* Use CoordinatorEntity

* Use CoordinatorEntity

* Call update API

* Call update API

* Call update API

* Call update API

* Use dataclass

* Use dataclass

* Use dataclass

* Use dataclass

* Use dataclass

* Use dataclass

* Use dataclass

* Use dataclass

* Fix bugs

* Implement swing

* Support swing mode, read only

* Add unit test

* Swing should work

* Set swing mode

* Add DeviceInfo

* Add error code

* Add error code

* Add error code

* Add error code

* Initial commit

* Refactor

* Remove comment code

* Try remove circular ref

* Try remove circular ref

* Remove circular ref

* Fix bug

* Fix tests

* Fix tests

* Increase test coverage

* Increase test coverage

* Increase test coverrage

* Add more unit tests

* Increase coverage

* Update coordinator.py

* Fix ruff

* Set unit of temperature

* Add bounds check

* Fix unit tests

* Add test coverage

* Use Py-ccm15

* Update tests

* Upgrade dependency

* Apply PR feedback

* Upgrade dependency

* Upgrade dependency

* Upgrade dependency

* Force ruff

* Delete not needed consts

* Fix mypy

* Update homeassistant/components/ccm15/coordinator.py

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

* Apply PR Feedback

* Apply PR Feedback

* Apply PR Feedback

* Apply PR Feedback

* Apply PR Feedback

* Apply PR Feedback

* Fix unit tests

* Move climate instance

* Revert "Move climate instance"

This reverts commit cc5b9916b7.

* Apply PR feedback

* Apply PR Feedback

* Remove scan internal parameter

* Update homeassistant/components/ccm15/coordinator.py

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

* Remove empty keys

* Fix tests

* Use attr fields

* Try refactor

* Check for multiple hosts

* Check for duplicates

* Fix tests

* Use PRECISION_WHOLE

* Use str(ac_index)

* Move {self._ac_host}.{self._ac_index} to construtor

* Make it fancy

* Update homeassistant/components/ccm15/coordinator.py

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

* Move const to class variables

* Use actual config host

* Move device info to construtor

* Update homeassistant/components/ccm15/climate.py

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

* Set name to none, dont ask for poll

* Undo name change

* Dont use coordinator in config flow

* Dont use coordinator in config flow

* Check already configured

* Apply PR comments

* Move above

* Use device info name

* Update tests/components/ccm15/test_coordinator.py

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

* Update tests/components/ccm15/test_config_flow.py

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

* Apply feedback

* Remove logger debug calls

* Add new test to check for dupplicates

* Test error

* Use better name for test

* Update homeassistant/components/ccm15/config_flow.py

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

* Update homeassistant/components/ccm15/climate.py

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

* Update homeassistant/components/ccm15/config_flow.py

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

* Use prop data for all getters

* Fix tests

* Improve tests

* Improve tests, v2

* Replace log message by comment

* No need to do bounds check

* Update config_flow.py

* Update test_config_flow.py

* Update test_coordinator.py

* Update test_coordinator.py

* Create test_climate.py

* Delete tests/components/ccm15/test_coordinator.py

* Update coordinator.py

* Update __init__.py

* Create test_climate.ambr

* Update conftest.py

* Update test_climate.py

* Create test_init.py

* Update .coveragerc

* Update __init__.py

* We need to check bounds after all

* Add more test coverage

* Test is not None

* Use better naming

* fix tests

* Add available property

* Update homeassistant/components/ccm15/climate.py

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

* Use snapshots to simulate netwrok failure or power failure

* Remove not needed test

* Use walrus

---------

Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-23 21:24:52 +01:00
Robert Resch ebdf7b9c8c
Deprecate some deprecated const constants (#106230)
* Deprecate some deprecated const constants

* Improve code

* fix typing

* Apply suggestions from code review

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-12-23 20:18:51 +01:00
Brandon Rothweiler c629b434cd
Add energy usage sensor to A. O. Smith integration (#105616)
* Add energy usage sensor to A. O. Smith integration

* Address review comments

* Address review comment

* Address review comment

* Create device outside of the entity class

* Address review comment

* remove platinum
2023-12-23 17:24:49 +01:00
Matt 345f7f2003
Fix feedreader date comparison to allow RSS entries with identical timestamps (#104925)
Change feedreader publishdate comparison
2023-12-23 16:48:36 +01:00
Jan Bouwhuis e311a6835e
Add valve platform support to google_assistant (#106139)
* Add valve platform to google_assistant

* Use constant for domains set
2023-12-23 16:46:25 +01:00
Patrick Frazer c126022d4f
Add switches to drop_connect integration (#106264)
* Add switches to drop_connect integration

* Let device update state

* Simplify icon property

* Use constants for icon names

* Add simulated responses from devices

* Use keyed form for switch value

* Clean up properties
2023-12-23 16:39:31 +01:00
Marco d450a7f57e
Improve mikrotik error handling (#106244)
* improve mikrotik error handling

* switch to debug

* fix mock command arguments

* add recommendations

---------

Co-authored-by: Marco98 <Marco98@users.noreply.github.com>
2023-12-23 16:26:27 +01:00
Jan Bouwhuis 6da2f98d34
Fix mqtt valve is not resetting opening or closing state (#106240)
* Fix mqtt valve is not resetting opening or closing state

* Require state or position attr in JSON state update

* Do not change `_attr_is_closed` if valve reports a position

* Add comment, use tuple

* Call _update_state
2023-12-23 15:18:44 +01:00
Brett Adams 043f3e640c
Rework entity description functions in Tessie (#106287)
* use lamdba to return the library function

* Rename mocks

* lambda number

* Lambda button

* Add missing

* Remove context manager
2023-12-23 13:45:06 +01:00
doggkruse ea7c839423
Apply units of measure provided in API when available in LaCrosse View (#106299)
* Apply units of measure provided in API when available to avoid mismatch of native units.  Improved fix for #106148

* Fix ruff error
2023-12-23 13:41:15 +01:00
Michael da684d6a7b
Add diagnostics support to Tankerkoenig (#106301) 2023-12-23 12:20:15 +01:00
Robert Resch 060172fc24
Deprecate deprecated data entry flow constants (#106229) 2023-12-23 11:25:39 +01:00
Michael 859e7972ac
Add significant Change support for vacuum (#106002) 2023-12-23 11:24:32 +01:00
Michael 321dc3984c
Add significant Change support for humidifier (#106015) 2023-12-23 10:56:51 +01:00
Robert Resch 20ba764d92
Deprecate deprecated camera constants (#106095) 2023-12-23 10:46:23 +01:00
Franck Nijhof 3404bd4de5
Fix flaky Tailwind tests by fixing via_device (#106294) 2023-12-23 10:45:20 +01:00
Martin Hjelmare 1d0cee5e8a
Improve cloud system health tests (#106235) 2023-12-23 10:35:16 +01:00
J. Nick Koston 5156a93b9e
Add support for attribute caching to the update platform (#106261) 2023-12-23 10:29:55 +01:00
jjlawren 0ae4d017b9
Add subwoofer crossover support to Sonos Amp devices (#106290) 2023-12-23 10:25:20 +01:00
Erik Montnemery 3a744d374b
Add support for caching entity properties (#100601) 2023-12-22 09:02:55 -10:00
Martin Hjelmare 087eb86e37
Improve cloud binary sensor tests (#106238)
* Clean up cloud binary sensor test

* Test remove entity
2023-12-22 19:48:07 +01:00
Patrick Frazer c41173bb29
Add binary sensors to drop_connect integration (#106248) 2023-12-22 19:26:52 +01:00
Allen Porter 656d0696bb
Add support for re-ordering Google Tasks (#104769)
* Add reorder and task ordering

* Remove un-needed js id code

* Revert dead code deletion

* Remove reverted test and dead logger

* Update comment name
2023-12-22 18:49:41 +01:00
G Johansson d1d5c50b73
Add full test coverage to Trafikverket Train (#106247)
* Add full test coverage for Trafikverket Train

* Coordinator full coverage

* Now full coverage

* Add util
2023-12-22 16:53:51 +01:00
Floris272 8b0d19aca2
Add bluecurrent integration (#82483)
* Add bluecurrent integration

* Apply feedback

* Rename integration

* changed constants and removed strings.sensor.json

* update blue_current integration

* update bluecurrent-api to 1.0.4

* Update bluecurrent-api to 1.0.5

* Apply feedback

* Remove translation

* Apply feedback

* Use customer_id as unique id

* Apply feedback

* Add @pytest.mark.parametrize

* Replace loop.create_task with async_create_task
2023-12-22 16:34:16 +01:00
Rami Mosleh c91ac22d3c
Add location selector to Islamic prayer times (#105911)
* Add location selector to config flow

* Simplify entry data

* fix abort string

* Add migration with minor version

* Follow documented migration method
2023-12-22 15:24:50 +01:00
G Johansson 126a58a33e
Return multiple trains in Trafikverket Train (#106206)
* Add list of trains to coordinator

* Fix to work

* snapshot

* Fixes

* Fix
2023-12-22 15:18:16 +01:00
Jan-Philipp Benecke 13504d5fd5
Add consider home interval to ping (#104881)
* Add consider home interval to ping

* Run ruff after rebase

* Fix buggy consider home interval
2023-12-22 14:50:58 +01:00
Patrick Frazer fce1b6d248
Add DROP integration (#104319)
* Add DROP integration

* Remove all but one platform for first PR

* Simplify initialization of hass.data[] structure

* Remove unnecessary mnemonic 'DROP_' prefix from DOMAIN constants

* Remove unnecessary whitespace

* Clarify configuration 'confirm' step description

* Remove unnecessary whitespace

* Use device class where applicable

* Remove unnecessary constructor and change its elements to class variables

* Change base entity inheritance to CoordinatorEntity

* Make sensor definitions more concise

* Rename HA domain from drop to drop_connect

* Remove underscores from class and function names

* Remove duplicate temperature sensor

* Change title capitalization

* Refactor using SensorEntityDescription

* Remove unnecessary intermediate dict layer

* Remove generated translations file

* Remove currently unused string values

* Use constants in sensor definitions

* Replace values with constants

* Move translation keys

* Remove unnecessary unique ID and config entry references

* Clean up DROPEntity initialization

* Clean up sensors

* Rename vars and functions according to style

* Remove redundant self references

* Clean up DROPSensor initializer

* Add missing state classes

* Simplify detection of configured devices

* Change entity identifiers to create device linkage

* Move device_info to coordinator

* Remove unnecessary properties

* Correct hub device IDs

* Remove redundant attribute

* Replace optional UID with assert

* Remove redundant attribute

* Correct coordinator initialization

* Fix mypy error

* Move API functionality to 3rd party library

* Abstract device to sensor map into a dict

* Unsubscribe MQTT on unload

* Move entity device information

* Make type checking for mypy conditional

* Bump dropmqttapi to 1.0.1

* Freeze dataclass to match parent class

* Fix race condition in MQTT unsubscribe setup

* Ensure unit tests begin with invalid MQTT state

* Change unit tests to reflect device firmware

* Move MQTT subscription out of the coordinator

* Tidy up initializer

* Move entirety of MQTT subscription out of the coordinator

* Make drop_api a class property

* Remove unnecessary type checks

* Simplify some unit test asserts

* Remove argument matching default

* Add entity category to battery and cartridge life sensors
2023-12-22 14:24:08 +01:00
ashionky 102c7f1959
Add Refoss integration (#100573)
* refoss

* refoss

* refoss

* refoss

* refoss modify

* ip

* 8.22

* format

* format

* format

* bugfix

* test

* test

* test

* test

* test

* test

* 9.1

* refosss

* refoss

* refoss

* refoss

* refoss

* refoss

* refoss

* refoss

* test

* requirements_test_all.txt

* codeowners

* refoss

* Review feedback repair

* strings

* refoss

* refoss

* refoss

* 1.1.1

* 1.1.2

* refoss

* refoss

* refoss.1.1.7

* refoss-gree

* 1.1.7

* test

* refoss

* test refoss

* test refoss

* refoss-test

* refoss

* refoss

* test

* test

* refoss

* CODEOWNERS

* fix

* Update homeassistant/components/refoss/__init__.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-22 13:18:32 +01:00
Jan Bouwhuis f536bc1d0c
Add valve support to Amazon Alexa (#106053)
Add valve platform to Amazon Alexa
2023-12-22 12:08:06 +01:00
Brett Adams b4f8fe8d4d
Add media player platform to Tessie (#106214)
* Add media platform

* Add more props

* Fix platform filename

* Working

* Add a test

* Update test and fixture

* Refactor media player properties to handle null values

* Add comments

* add more assertions

* Fix test docstring

* Use walrus instead.

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

* Test  when media player is idle

* Fix tests

* Remove None type from volume_level

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

* Return media position only when a media duration is > 0

* Remove impossible None type

* Add snapshot and freezer

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-22 12:07:47 +01:00
RJPoelstra 2c2e6171e2
Add integration for Vogel's MotionMount (#103498)
* Skeleton for Vogel's MotionMount support.

* Generated updates.

* Add validation of the discovered information.

* Add manual configuration

* Use a mac address as a unique id

* Add tests for config_flow

* Add a 'turn' sensor entity.

* Add all needed sensors.

* Add number and select entity for control of MotionMount

* Update based on development checklist

* Preset selector now updates when a preset is chosen

* Fix adding presets selector to device

* Remove irrelevant TODO

* Bump python-MotionMount requirement

* Invert direction of turn slider

* Prepare for PR

* Make sure entities have correct values when created

* Use device's mac address as unique id for entities.

* Fix missing files in .coveragerc

* Remove typing ignore from device library.

Improved typing also gave rise to the need to improve the callback mechanism

* Improve typing

* Convert property to shorthand form

* Remove unneeded CONF_NAME in ConfigEntry

* Add small comment

* Refresh coordinator on notification from MotionMount

* Use translation for entity

* Bump python-MotionMount

* Raise `ConfigEntryNotReady` when connect fails

* Use local variable

* Improve exception handling

* Reduce duplicate code

* Make better use of constants

* Remove unneeded callback

* Remove other occurrence of unneeded callback

* Improve removal of suffix

* Catch 'getaddrinfo' exception

* Add config flow tests for invalid hostname

* Abort if device with same hostname is already configured

* Make sure we connect to a device with the same unique id as configured

* Convert function names to snake_case

* Remove unneeded commented-out code

* Use tuple

* Make us of config_entry id when mac is missing

* Prevent update of entities when nothing changed

* Don't store data in `hass.data` until we know we will proceed

* Remove coordinator

* Handle situation where mac is EMPTY_MAC

* Disable polling

* Fix failing hassfest

* Avoid calling unique-id-less discovery handler for situations where we've an unique id
2023-12-22 12:04:58 +01:00
Brett Adams c824d06a8c
Add number platform to Tessie (#106205)
* Add number platform

* Make self.set consistent

* Fix test docstring

* Use entity descriptions

* Add patch_description to tests

* Rename argument to arg

* Make max key mandatory

* Set SOC min to normal value
2023-12-22 11:57:21 +01:00
Robert Resch 4d5bea7bcc
Deprecate deprecated switch constants (#106225) 2023-12-22 11:23:21 +01:00
Robert Resch 06220849fc
Deprecate deprecated water_heater constants (#106226) 2023-12-22 11:23:03 +01:00
Brett Adams 23fa86cc23
Add cover platform to Tessie (#105422)
* Add cover platform

* fix case

* Remove virtual key issue

* Remove redundant logic

* Fix logic that I missed

* Add missing types

* Add missing type

* Update entity

* Make window name better

* Fix test

* Update docstrings and comments
2023-12-22 10:17:23 +01:00
Brett Adams 1170e72913
Add lock platform to Tessie (#106216)
* Add lock platform

* Update tests

* fix test docstring
2023-12-22 10:11:48 +01:00
Brett Adams abc57ea706
Quality improvements for Tessie (#106218)
Quality improvements
2023-12-22 10:11:18 +01:00
Brett Adams 8918a9c2c4
Add button platform to Tessie (#106210) 2023-12-21 16:40:55 -10:00
Brett Adams e86ac568e1
Add device tracker to Tessie (#105428)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-21 14:28:58 -10:00
Cyrill Raccaud 7e685f2bc7
Swiss public transport config flow (#105648)
* add config flow

* unit tests

* yaml config import flow

* change deprecation period and simply code

* keep name for legacy yaml
- removing the name now would break current implementations
- it will be removed together with the deprectation of  yaml config flow

* improve error handling, simpler unique_id, cleanup

* simplify issues for yaml import flow

* improve typing and clean name handling

* streamline unit tests
- happy path + errors
- mock opendata instead of aiohttp

* parametrize unit tests

* improve strings

* add missing aborts

* update coverage ignore

* remove redundant test

* minor clean up of constants
2023-12-21 20:38:00 +01:00
J. Nick Koston 54f460b7c9
Improve performance of dhcp on high activity networks (#105884)
* Improve performance of dhcp on high activity networks

Most of the overhead was constructing IPAddress objects
which is solved with https://github.com/bdraco/cached-ipaddress

* fix test

* fix: bump

* bump again

* lets do it on the correct branch
2023-12-21 20:36:09 +01:00
Robert Groot d5c7ae5b34
Add Energyzero get_gas_prices and get_energy_price services (#101374)
Co-authored-by: Klaas Schoute <klaas_schoute@hotmail.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-21 15:39:51 +01:00
Martin Hjelmare e1f31194f7
Move cloud stt engine to config entry (#99608)
* Migrate cloud stt to config entry

* Update default engine

* Test config flow

* Migrate pipelines with cloud stt engine to new engine id

* Fix test after rebase

* Update and add comment

* Remove cloud specifics from default stt engine

* Refactor cloud assist pipeline

* Fix cloud stt entity_id

* Try to wait for platforms before creating default pipeline

* Clean up import

* Move function in cloud assist pipeline

* Wait for tts platform loaded in stt migration

* Update deprecation dates

* Clean up not used fixture

* Add test for async_update_pipeline

* Define pipeline update interface better

* Remove leftover

* Fix tests

* Change default engine test

* Add test for missing stt entity during login

* Add and update comments

* Update config entry title
2023-12-21 13:39:02 +01:00
Brett Adams 13908cf5a6
Add update platform to Tessie (#106093)
* Add version platform

* Add strings and test

* Remove potential for None

* Dont show progress when no update is running

* Return None for no update

* Add comment

* Remove future feature

* WIP

* Fix statuses

* update fixture

* Remove entity name

* Remove name correctly

* Use False for in_progress
2023-12-21 12:43:11 +01:00
Jan-Philipp Benecke 0ae0331c5c
Migrate google related tests to use freezegun (#105552)
* Migrate google related tests to use freezegun

* retrigger CI

* Fix google tests

* Add timezone to config_entry_token_expiry

* Separate config_entry_token_expiry from token_expiry

* Also test token refresh for offset-naive tokens

* retrigger CI

* Apply code review suggestion

Co-authored-by: Allen Porter <allen.porter@gmail.com>

* Run ruff-format

---------

Co-authored-by: Allen Porter <allen.porter@gmail.com>
2023-12-21 12:23:01 +01:00
Jan Bouwhuis f8f31627ce
Refactor ranging utils for mqtt cover (#105739)
* Refactor ranging utils for mqtt cover

* Use literals for default min and max percentage
2023-12-21 11:54:05 +01:00
Michael 0614e291c1
Set WiFi QR code entity to unknown when Fritzbox is not available (#105870) 2023-12-21 10:29:01 +01:00
Matthias Alphart 46d63ad7ba
Allow Fronius devices to be deleted (#106141) 2023-12-21 10:02:38 +01:00
Erik Montnemery 037eb33710
Refactor media_player test classes (#105630) 2023-12-21 08:11:27 +01:00
J. Nick Koston e50fe79911
Update habluetooth to 2.0.0 (#106145) 2023-12-20 20:37:39 -10:00
Brett Adams dbb726f41f
Add Select platform to Tessie (#105423)
* Add select platform

* Add error coverage

* Fix case

* fix value

* Remove virtual key issue

* Add TessieSeatHeaterOptions enum and update TessieSeatHeaterSelectEntity options

* use ENUM in tests

* Porting other fixes

* Update entity
2023-12-21 07:34:31 +01:00
Brett Adams e2cf4244ea
Add switch platform to Tessie (#106153)
* Add switch platform

* Make functions mandatory

* Underscores

* Improvements
2023-12-21 06:34:52 +01:00
Brett Adams 7c5824b4f3
Add climate platform to Tessie (#105420)
* Add climate platform

* Other fixes

* Use super native value

* change to _value

* Sentence case strings

* Add some more type definition

* Add return types

* Add some more assertions

* Remove VirtualKey error

* Add type to args

* rename climate to primary

* fix min max

* Use String Enum

* Add PRECISION_HALVES

* Fix string enum

* fix str enum

* Simplify run logic

* Rename enum to TessieClimateKeeper
2023-12-21 06:18:18 +01:00
J. Nick Koston e2314565bb
Fix ESPHome Bluetooth diagnostics (#106151) 2023-12-20 18:33:43 -10:00
J. Nick Koston 5722b4a1ce
Break out the ESPHome Bluetooth scanner connection logic into bleak-esphome (#105908) 2023-12-20 13:36:37 -10:00
Robert Resch d47ec91231
Deprecate deprecated sensor constants (#106120) 2023-12-21 00:02:20 +01:00
Robert Resch 494a897568
Deprecate deprecated climate constants (#106096) 2023-12-21 00:00:21 +01:00
Ville Skyttä 24b1e01d71
Update Ruff to 0.1.8, avoid linter/formatter conflicts (#106080)
* Disable Ruff rules that may conflict with the formatter

* Upgrade Ruff to 0.1.8

- https://github.com/astral-sh/ruff/releases/tag/v0.1.7
- https://github.com/astral-sh/ruff/releases/tag/v0.1.8

* Format with Ruff 0.1.8
2023-12-20 23:55:09 +01:00
Jan Bouwhuis f5f9b89848
Add water_heater to google_assistant (#105915)
* Add water_heater to google_assistant

* Follow up comments

* Add water_heater to default exposed domains
2023-12-20 23:26:55 +01:00
Jan Bouwhuis 65d3f7e1c7
Improve error mqtt valve error logging (#106129)
* Improve error mqtt valve error logging

* Update homeassistant/components/mqtt/valve.py

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

* Update homeassistant/components/mqtt/valve.py

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

* Update homeassistant/components/mqtt/valve.py

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

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-12-20 21:18:30 +01:00
Robert Resch 98f0ed1892
Deprecate deprecated siren constants (#106121) 2023-12-20 19:11:03 +01:00
Robert Resch 803e77bebd
Move prusalink migration to async_migrate_entry and use a minor version bump (#106109)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-12-20 19:10:12 +01:00
Robert Resch ea28b74fe9
Deprecate deprecated alarm control panel constants (#106058) 2023-12-20 18:41:17 +01:00
Robert Resch 491a50a2f1
Deprecate deprecated lock constants (#106113) 2023-12-20 18:07:17 +01:00
Robert Resch 9dd1b9e268
Deprecate deprecated device tracker constants (#106099) 2023-12-20 18:06:38 +01:00
Robert Resch 28e4358c53
Deprecate deprecated humidifier constants (#106112) 2023-12-20 18:05:43 +01:00
Robert Resch 9830f77e9e
Deprecate deprecated cover constants (#106098) 2023-12-20 18:04:44 +01:00
Robert Resch c9c072ff3e
Deprecate deprecated fan constants (#106111) 2023-12-20 17:54:43 +01:00
Robert Resch 036c856500
Deprecate deprecated number constants (#106114) 2023-12-20 17:28:52 +01:00
Robert Resch 58759ff6b7
Deprecate deprecated remote constants (#106116) 2023-12-20 17:20:50 +01:00
Jan Bouwhuis 93c800c4e8
Add water_heater to alexa (#106011)
* Add water_heater support to alexa

* Improve test coverage

* Follow up comments
2023-12-20 16:48:02 +01:00
On Freund 3e07cf50ce
Don't fetch unchanged OurGroceries lists (#105998) 2023-12-20 10:35:42 +01:00
Jan Bouwhuis c7f6ab2457
Add MQTT valve platform (#105766)
* Add mqtt valve platform

* No stop topic-reports_position and validation

* Do not allow state_open, state_closed with position reporing valve

* Allow open/close feature to be disabled

* Follow up comments

* Rename

* Apply defaults in validator

* Update docstr
2023-12-20 07:49:49 +01:00
vexofp c5a3e58994
Pass timeout to httpx in RESTful Switch (#105364)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-19 10:47:42 -10:00
Franck Nijhof 63a535e9d9
Small cleanup in Tailwind (#106073) 2023-12-19 21:17:29 +01:00
Erik Montnemery 1ae6f1e9e2
Add valve support to switch_as_x (#105988) 2023-12-19 20:16:18 +01:00
Robert Resch db985925c4
Deprecate deprecated automation constants (#106067) 2023-12-19 19:22:13 +01:00
Klaas Schoute 9275d35c0a
Improve tests for easyEnergy (#105989) 2023-12-19 19:02:40 +01:00
Niklas Wagner 91f8d3faef
Upgrade Prusa Link to new Digest Authentication and /v1/ API (#103396)
Co-authored-by: Robert Resch <robert@resch.dev>
2023-12-19 18:07:27 +01:00
Robert Resch 0e0fd39603
Add dir_with_deprecated_constants function to deprecation helper (#106059) 2023-12-19 16:37:21 +01:00
Joakim Sørensen 5b4000e759
Bump hass-nabucasa from 0.74.0 to 0.75.1 (#105958)
* Bump hass-nabucasa from 0.74.0 to 0.75.1

* Force sorting of parametrized test

* Simplify async_create_issue.severity

* use fixtures
2023-12-19 13:08:27 +01:00
Franck Nijhof 48740e6b05
Add cover platform to Tailwind integration (#106042) 2023-12-19 12:46:21 +01:00
Robert Resch a4ccd6e13b
Deprecate binary sensor device class constants (#105736)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-12-19 12:45:32 +01:00
G Johansson c64c1c8f08
Workday create repair if named holiday missing (#101201) 2023-12-19 12:33:05 +01:00
Michael a1614d6b7e
Add significant Change support for climate (#106020) 2023-12-19 12:30:30 +01:00
Jan-Philipp Benecke 7d74c89606
Use freezegun in image_upload test (#106045) 2023-12-19 12:26:40 +01:00
Jan-Philipp Benecke f84e43bc0a
Use freezegun in qld_bushfire test (#106049) 2023-12-19 12:21:19 +01:00
Jan-Philipp Benecke c50098a845
Use freezegun in nsw_rural_fire_service_feed test (#106050) 2023-12-19 12:20:56 +01:00
Jan-Philipp Benecke 2d31f9e984
Use freezegun in ign_sismologia test (#106051) 2023-12-19 12:20:28 +01:00
Franck Nijhof ef59394ef4
Add binary sensor platform to Tailwind integration (#106033) 2023-12-19 10:38:56 +01:00
Michael a4cb64e20e
Add significant Change support for water heater (#106003) 2023-12-19 10:38:13 +01:00
Michael 458fcc6372
Add significant Change support for alarm control panel (#106021) 2023-12-19 09:58:02 +01:00
mkmer 061c144fe8
Correct logic in honeywell for cleaning up stale devices (#106018)
* code quality fixes

* remove unnecessary code

* Remove comment

* change config entry configuration order

* update based on aladdin connect pr
2023-12-19 07:58:35 +01:00
mkmer 69fccec147
Clean up device registry for doors that no longer exist in Aladdin Connect (#99743)
* Remove devices that no longer exist

* Run Black after merge

* config 2 devices then 1 devices

* clean up device assertions

* More generic device check

* Add request from Honeywell PR

* remove unnecesary test
optimize dont_remove

* remove unnecessary test

* Actually test same id different domain

* Test correct id

* refactor remove test

* Remove .get for non optional keys

* Comprehension for all_device_ids

* Fix DR test, remove `remove`

* fix entities for full test coverage

* remove unused variable assignment

* Additional assertions confirming other domain

* Assertion error

* new method for identifier loop

* device_entries for lists
2023-12-19 07:30:02 +01:00
Erik Montnemery 6f392a3b43
Avoid mutating entity descriptions in sunweg tests (#106024) 2023-12-18 15:26:59 -10:00
Guido Schmitz b35afccdb7
Add PLC PHY rates as sensor to devolo Home Network (#87039)
* Add plc phyrate sensors

* Fix mypy

* Add tests

* Use suggested_display_precision

* Adapt to recent development

* Remove accidentally added constant

* Fix tests

* Fix pylint

* Use PHY rate instead of phyrate

* Adapt tests

* Hopefully fix mypy

* Hopefully fix mypy

* Use LogicalNetwork

* Apply mypy fixes
2023-12-18 21:11:06 +01:00
Eugenio Panadero b96d2cadac
Add new price sensors with API token access to pvpc hourly pricing (#85769)
*  Implement optional API token in config-flow + options

to make the data download from an authenticated path in ESIOS server

As this is an *alternative* access, and current public path works for the PVPC,
no user (current or new) is compelled to obtain a token,
and it can be enabled anytime in options, or doing the setup again

When enabling the token, it is verified (or "invalid_auth" error),
and a 'reauth' flow is implemented, which can change or disable the token if
it starts failing.

The 1st step of config/options flow adds a bool to enable this private access,
- if unchecked (default), entry is set for public access (like before)
- if checked, a 2nd step opens to input the token, with instructions
  of how to get one (with a direct link to create a 'request email').
  If the token is valid, the entry is set for authenticated access

The 'reauth' flow shows the boolean flag so the user could disable a bad token
by unchecking the boolean flag 'use_api_token'

* ♻️ Remove storage of flag 'use_api_token' in config entry

leaving it only to enable/disable the optional token in the config-flow

* ♻️ Adjust async_update_options

*  Add new price sensors with API token access

New price sensors added:
- Injection price: price of excess energy from self-consumption
- OMIE price: electricity price in the 'open' market
- MAG price: Temporal tax cost for gas compensation

*  Adapt tests to work with multiple sensors

* 🐛 Fix all integration sensors going unavailable

when any sensor lacks data for the current day (usually the 'OMIE price')

* Fix rebase

* Customize icons and display precision for new sensors

* Disable MAG Tax and OMIE price sensors by default

* Move logic to assign sensor unique ids to integration

* Move helper functions to helpers.py

* Fix sensor activation for API download
2023-12-18 21:06:02 +01:00
Erik Montnemery 1d1cd6be57
Avoid mutating entity descriptions in sunweg (#105982) 2023-12-18 10:03:40 -10:00
Miguel Camba 5175737b60
Add Valve integration (#102184)
* Add Valve integration.

This adds the valve integration discussed in https://github.com/home-assistant/architecture/discussions/975
Most of the code is taken from the cover integration but simplified since valves
can't tilt.

There are a couple outstanding errors I'm not sure how to solve and prevents
me from even making this commit without `--no-verify`.

* Apply PR feedback

* Apply more feedback: Intruduce the bare minimum

* Remove file commited by mistake

* Hopefully this fixes tests

* Match cover's typing and mypy settings

* Change some configuration files

* Fix test

* Increase code coverage a little

* Code coverate inproved to 91%

* 95% code coverage

* Coverate up to 97%

* Coverage 98%

* Apply PR feedback

* Even more feedback

* Add line I shouldn't have removed

* Derive closed/open state from current position

* Hopefully last feedback

* Update homeassistant/components/valve/__init__.py

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

* Update homeassistant/components/valve/__init__.py

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

* Remove unnecesary translation

* Remove unused method arguments

* Complete code coverage

* Update homeassistant/components/valve/__init__.py

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

* Simplify tests

* Update homeassistant/components/valve/__init__.py

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

* Apply last feedback

* Update tests/components/valve/test_init.py

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

* Update tests/components/valve/test_init.py

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

* Update tests/testing_config/custom_components/test/valve.py

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

* More feedback

* Apply suggestion

* And more feedback

* Apply feedback

* Remove commented code

* Reverse logic to unindent

* Update homeassistant/components/valve/__init__.py

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

* Update homeassistant/components/valve/__init__.py

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

* Implement stop valve for Mock valve

* Fix tests now that I've implemented stop_valve

* Assert it's neither opening nor closing

* Use current position instead

* Avoid scheduling executor when opening or closing

* Fix incorrect bitwise operation

* Simplify toggle

* Remove uneeded partial functions

* Make is_last_toggle_direction_open private

* Remove valve from test custom integration

* Improve test coverage

* Address review comments

* Address review comments

* Address review comments

* Update homeassistant/components/valve/__init__.py

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

* Update tests

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
2023-12-18 19:48:00 +01:00
Franck Nijhof 5f2a13fec6
Add DHCP discovery to Tailwind (#105981) 2023-12-18 15:52:48 +01:00
Michael 58070e14a7
Add significant Change support for camera (#105866) 2023-12-18 14:40:55 +01:00
Jan-Philipp Benecke 0972dc5867
Migrate directv test to use freezegun (#105894) 2023-12-18 14:40:13 +01:00
Franck Nijhof 556be26040
Add button platform to Tailwind integration (#105961) 2023-12-18 14:11:43 +01:00
J. Nick Koston 4bdfea5d67
Remove HaAsyncServiceBrowser from zeroconf (#105881) 2023-12-18 14:11:06 +01:00
Franck Nijhof 79aa888ca0
Add diagnostics platform to Tailwind (#105965) 2023-12-18 14:05:15 +01:00
Tobias Sauerwein 57a6effd70
Fix unreachable Netatmo sensor returning false values (#105954)
* Fix unreachable sensor returning false values

* Clean up unnecessary code
2023-12-18 13:57:34 +01:00
Franck Nijhof 3c73c0f17f
Add reauth support to Tailwind (#105959) 2023-12-18 12:12:56 +01:00
starkillerOG 253182c650
Reolink change ir to switch (#105916)
* Change IR from light to switch

* Remove old entity

* Add test

* Apply suggestions from code review

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>

---------

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
2023-12-18 11:13:20 +01:00
Franck Nijhof 90fef6b9c9
Add Tailwind zeroconf discovery (#105949) 2023-12-18 10:39:15 +01:00
Klaas Schoute e59e1d7f8e
Add prices service calls for easyEnergy (#105175) 2023-12-18 09:37:59 +01:00
Franck Nijhof d50b79ba84
Add Tailwind integration (#105926)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-18 08:42:53 +01:00
Brett Adams a88335272a
Implement Review Feedback for Tessie (#105937) 2023-12-17 15:33:26 -10:00
J. Nick Koston 5c503683b7
Bump lru-dict to 1.3.0 (#105914)
* Bump lru-dict to 1.3.0

changelog: https://github.com/amitdev/lru-dict/compare/v1.2.0...v1.3.0

* fix typing

* quote types

* quote types
2023-12-18 00:16:31 +01:00
Jan-Philipp Benecke 7772f60426
Migrate file test to use freezegun (#105892) 2023-12-17 05:09:10 -10:00
J. Nick Koston 89513efd8d
Refactor ESPHome Bluetooth connection logic to prepare for esphome-bleak (#105747) 2023-12-17 04:42:28 -10:00
J. Nick Koston 537dbd8375
Fix cloud tests doing socket I/O (#105874)
https://github.com/home-assistant/core/actions/runs/7233101649/job/19708631179?pr=105868
https://github.com/home-assistant/core/actions/runs/7232949349?pr=105834

I was hoping to only patch the library, but when I did that it still failed
because it had no access token
2023-12-17 01:23:56 +01:00
Álvaro Fernández Rojas 3be12c0611
Fix Airzone temperature range on new climate card (#105830)
* airzone: climate: fix double setpoint

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

* tests: airzone: fix double setpoint temperature

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

* tests: airzone: fix swapped double setpoint

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-12-16 18:42:58 +01:00
Joseph Block 1271f16385
Add Unifi device state for additional diagnostics (#105138)
* Add device state for additional diagnostics

* Add state test and fix existing tests

* Utilize IntEnum and dict for state lookup

* Update aiounifi to v68
2023-12-16 08:38:21 +01:00
Brett Adams 887f9a21e5
Add Binary Sensor platform to Tessie (#105421) 2023-12-15 18:56:38 -10:00
Álvaro Fernández Rojas a12c490cff
Update aioairzone to v0.7.2 (#105811) 2023-12-15 14:59:43 -10:00
Joost Lekkerkerker ef5d9d7377
Partly migrate Plex to has entity name (#98841)
* Partly migrate Plex to has entity name

* Use friendly name for device name

* Lowercase
2023-12-15 08:56:26 +01:00
Jan Bouwhuis 3f2fc2fce9
Fix mqtt tests modifying globals (#105774) 2023-12-15 08:15:10 +01:00
Erik Montnemery a2b31a06e3
Avoid mutating entity descriptions in solaredge tests (#105718) 2023-12-15 08:10:35 +01:00
Martin Hjelmare 4da04a358a
Refactor cloud assist pipeline (#105723)
* Refactor cloud assist pipeline

* Return None early
2023-12-14 23:56:08 +01:00
Michael Hansen 6c5ca58405
Set todo item status in intent (#105743) 2023-12-14 22:53:22 +01:00
Franck Nijhof cc75430af3
Disable user profiles on login screen (#105749) 2023-12-14 20:28:08 +01:00
Charles Garwood 032d120a26
Include Envoy firmware version in Enphase diagnostics (#105742)
* Include Envoy firmware version in Enphase diagnostics

* Update tests
2023-12-14 13:59:39 -05:00
Charles Garwood 40f914214b
Fix Fully Kiosk Browser MQTT event callbacks with non-standard event topics (#105735) 2023-12-14 18:59:37 +01:00
J. Nick Koston 8d1a69ae84
Migrate ESPHome bleak implementation to bleak-esphome library (#105611) 2023-12-14 07:21:31 -10:00
Lucas Mindêllo de Andrade d4a7361bc6
Bump sunweg to 2.0.1 (#105613)
* chore(sunweg): minor requested changes

* test(sunweg): use of fixtures

* feat(sunweg): provide bad auth result on expired authentication

* chore(sunweg): bump version

* chore(sunweg): removed reauth

* chore(sunweg): removed features out of scope

* chore(sunweg): fixtures moved to conftest.py

* chore(sunweg): devicetype moved to const

* chore(sunweg):  conftest comment

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-14 16:51:57 +01:00
epenet 351b07b14d
Fix issue clearing renault schedules (#105719)
* Fix issue clearing renault schedules

* Adjust
2023-12-14 12:54:03 +01:00
Erik Montnemery 9095027363
Avoid mutating entity descriptions in efergy tests (#105717) 2023-12-14 12:48:15 +01:00
Brig Lamoreaux 7721840298
Allow multiple configs for srp energy (#96573)
* Allow multiple configs.

* Rename test configs.

* Remove unused property

* Merge branch 'dev' into srp_energy_202307.coordinator

* Use title in device name.
2023-12-14 11:07:13 +01:00
Martin Hjelmare 2e448d2d13
Remove cloud details from assist pipeline (#105687)
* Remove cloud details from assist pipeline

* Update assist pipeline tests

* Update cloud tests
2023-12-14 10:15:59 +01:00
G Johansson 65514fbd73
Add error translations for Sensibo (#105600) 2023-12-13 19:40:57 +01:00
Jan-Philipp Benecke d322cb5fdf
Migrate homekit_controller tests to use freezegun (#105646) 2023-12-13 19:37:51 +01:00
Erik Montnemery 4f9f548929
Add volume_step property to MediaPlayerEntity (#105574)
* Add volume_step property to MediaPlayerEntity

* Improve tests

* Address review comments
2023-12-13 17:26:34 +01:00
puddly 4e9b9add29
Bump ZHA dependencies (#105661) 2023-12-13 17:06:46 +01:00
Joost Lekkerkerker a82410d5e9
Deduplicate constants E-Z (#105657) 2023-12-13 17:05:37 +01:00
Joost Lekkerkerker e4453ace88
Add country code constant (#105640) 2023-12-13 16:50:46 +01:00
puddly e475829ce6
Reload ZHA integration on any error, not just recoverable ones (#105659) 2023-12-13 16:24:26 +01:00
Erik Montnemery dff7725c1f
Fix goodwe tests (#105653) 2023-12-13 14:52:44 +01:00
Jan-Philipp Benecke 61a99c911c
Migrate demo test to use freezegun (#105644) 2023-12-13 14:33:59 +01:00
Joost Lekkerkerker ac53b78a0c
Deduplicate constants A-D (#105638) 2023-12-13 14:21:44 +01:00
Martin Hjelmare 02853a62f0
Clean cloud client fixture from cloud http api tests (#105649) 2023-12-13 14:21:33 +01:00
Martin Hjelmare 5bb233998e
Improve cloud http api tests (#105610)
* Improve cloud http api tests

* Add comments to the cloud fixture

* Fix docstring
2023-12-13 13:53:22 +01:00
mletenay 0548f9f342
Add diagnostics download to goodwe integration (#102928)
* Add diagnostics download to goodwe integration

* Revert change not related to test

* Use MagicMock for mock inverter

* Use spec with mock
2023-12-13 12:35:53 +01:00
Joost Lekkerkerker 22b2c588eb
Use issue registry fixture (#105633) 2023-12-13 11:23:38 +01:00
Joost Lekkerkerker 06f81251fb
Reduce code duplication in Suez config flow (#105558) 2023-12-13 10:41:35 +01:00
J. Nick Koston 5dbd0dede1
Refactor Bluetooth scanners to avoid the need to pass a callback (#105607) 2023-12-13 09:17:48 +01:00
Michael Hansen aaccf19013
Rename "satellite enabled" to "mute" (#105619) 2023-12-13 09:09:22 +01:00
Maciej Bieniek 66d24b38aa
Add diagnostics platform to BraviaTV (#105603)
* Add diagnostics platform

* Add test

* Improve test

* Use consts

* Fix test

* Patch methods

* Patch methods
2023-12-13 08:18:50 +01:00
Michael Hansen a73e86a741
Skip TTS events entirely with empty text (#105617) 2023-12-13 00:21:16 -05:00
Michael Hansen 431a44ab67
Add name slot to HassClimateGetTemperature intent (#105585) 2023-12-12 22:54:15 -05:00
Brandon Rothweiler a595cd7141
Add sensor platform to A. O. Smith integration (#105604)
* Add sensor platform to A. O. Smith integration

* Fix typo

* Remove unnecessary mixin

* Simplify async_setup_entry
2023-12-13 00:52:15 +01:00
Maciej Bieniek 77283704a5
Bump `brother` library, use `pysnmp-lextudio` with SNMP integration (#105591) 2023-12-12 11:36:11 -10:00
J. Nick Koston f002a6a732
Refactor all Bluetooth scanners to inherit from BaseHaRemoteScanner (#105523) 2023-12-12 21:28:43 +01:00
Jan-Philipp Benecke d33aa6b8e7
Migrate homematicip_cloud tests to use freezegun (#105592) 2023-12-12 20:51:32 +01:00
Jan Bouwhuis 280637822b
Use mocked entity platform for lock service tests (#105020)
* Use mocked entity platform for lock service tests

* Cleanup old mock class

* Follow up on code review

* Improve mock entity platform

* Use entity_id of passed entity instead of constant
2023-12-12 15:49:01 +01:00
Erwin Douna 9d44dc4437
Add Fast.com Device Info (#105528)
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-12-12 10:41:00 +01:00
Erik Montnemery 6908497c3d
Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00
J. Nick Koston e2abd3b8d0
Bump bluetooth libraries (#105522) 2023-12-12 08:31:23 +01:00
Jan-Philipp Benecke 4859226496
Migrate geonetnz_* tests to use freezegun (#105521) 2023-12-12 08:30:08 +01:00
Jan-Philipp Benecke 319d6db55b
Migrate device_sun_light_trigger tests to use freezegun (#105520) 2023-12-12 08:29:10 +01:00
Jan Bouwhuis a66c9bb7b6
Update stale doc strings in entity platform tests (#105526) 2023-12-12 08:28:08 +01:00
Brett Adams 8922c93259
Improve tests in Tessie (#105430) 2023-12-11 20:30:54 -10:00
Maciej Bieniek bf93929826
Add support for Shelly Gen3 devices (#104874)
* Add support for Gen3 devices

* Add RPC_GENERATIONS const

* Add gen3 to tests

* More tests

* Add BLOCK_GENERATIONS const

* Use *_GENERATIONS constants from aioshelly
2023-12-11 22:58:56 +01:00
Erwin Douna 662e19999d
Add Fastdotcom DataUpdateCoordinator (#104839)
* Adding DataUpdateCoordinator

* Updating and adding test cases

* Optimizing test

* Fix typing

* Prevent speedtest at startup

* Removing typing on Coordinator

* Update homeassistant/components/fastdotcom/coordinator.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Putting back typing

* Update homeassistant/components/fastdotcom/__init__.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Adding proper StateType typing

* Fix linting

* Stricter typing

* Creating proper test case for coordinator

* Fixing typo

* Patching librbary

* Adding unavailable state test

* Putting back in asserts

* Update tests/components/fastdotcom/test_coordinator.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update tests/components/fastdotcom/test_coordinator.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update tests/components/fastdotcom/test_coordinator.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update tests/components/fastdotcom/test_coordinator.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update tests/components/fastdotcom/test_coordinator.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Coordinator workable proposal

* Update tests/components/fastdotcom/test_coordinator.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Working test cases

* Update tests/components/fastdotcom/test_coordinator.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update tests/components/fastdotcom/test_coordinator.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update tests/components/fastdotcom/test_coordinator.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update tests/components/fastdotcom/test_coordinator.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Fixing tests and context

* Fix the freezer interval to 59 minutes

* Fix test

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-12-11 22:28:04 +01:00
Joost Lekkerkerker a187a39f0b
Add config flow to Suez water (#104730)
* Add config flow to Suez water

* fix tests

* Complete coverage

* Change version to 2024.7

* Fix final test

* Add issue when import is successful

* Move hassdata

* Do unique_id

* Remove import issue when entry already exists

* Remove import issue when entry already exists
2023-12-11 22:06:16 +01:00
J. Nick Koston e890671192
Relocate Bluetooth manager to habluetooth library (#105110)
* Relocate Bluetooth manager to habluetooth library

* Relocate Bluetooth manager to habluetooth library

* Relocate Bluetooth manager to habluetooth library

* fixes

* fix patching time

* fix more tests

* fix more tests

* split

* Bump habluetooth to 0.7.0

changelog: https://github.com/Bluetooth-Devices/habluetooth/compare/v0.6.1...v0.7.0

This is the big change that will move the manager so the HA
PR that will follow this will be a bit larger than the rest of them
since the manager is connected to everything

* fix types

* fix types

* fix types

* fix patch targets

* fix flakey logbook tests (will need another PR)

* mock shutdown

* bump again

* value can be a float now

* Revert "value can be a float now"

This reverts commit b7e7127143.

* float
2023-12-11 15:42:00 -05:00
Joakim Plate bb0d082b25
Correctly report unavailable battery for value 255 of percentage (#104566)
* Ignore unavailable battery level for zha

* Adjust unavailable test
2023-12-11 19:17:06 +01:00
Michael Hansen 80607f7750
Disconnect before reconnecting to satellite (#105500)
Disconnect before reconnecting
2023-12-11 11:18:46 -05:00
Denis Shulyaka 1242456ff1
Bump openai end switch from dall-e-2 to dall-e-3 (#104998)
* Bump openai

* Fix tests

* Apply suggestions from code review

* Undo conftest changes

* Raise repasir issue

* Explicitly use async mock for chat.completions.create

It is not always detected correctly as async because it uses a decorator

* removed duplicated message

* ruff

* Compatibility with old pydantic versions

* Compatibility with old pydantic versions

* More tests

* Apply suggestions from code review

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

* Apply suggestions from code review

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-12-11 09:47:26 -05:00
Joost Lekkerkerker 32681acc79
Remove Aftership import issue when entry already exists (#105476) 2023-12-11 12:09:43 +01:00
Jan-Philipp Benecke 47819bde4f
Migrate sonarr tests to use freezegun (#105410) 2023-12-11 10:47:51 +01:00
Jan-Philipp Benecke b4731674f8
Migrate octoprint tests to use freezegun (#105408) 2023-12-11 10:42:16 +01:00
Bouwe Westerdijk 3e3f9cf092
Bump plugwise to v0.35.3 (#105442) 2023-12-11 10:29:50 +01:00
Jan-Philipp Benecke fbfe434e8b
Migrate tag & tts tests to use freezegun (#105411) 2023-12-11 09:09:23 +01:00
Brandon Rothweiler 58d9d0daa5
Add reauth to A. O. Smith integration (#105320)
* Add reauth to A. O. Smith integration

* Validate reauth uses the same email address

* Only show password field during reauth
2023-12-10 14:30:24 -08:00
Erik Montnemery b5af987a18
Bump hatasmota to 0.8.0 (#105440)
* Bump hatasmota to 0.8.0

* Keep devices with deep sleep support always available

* Add tests
2023-12-10 23:16:06 +01:00
Allen Porter 4752d37df7
Fix fitbit oauth reauth debug logging (#105450) 2023-12-10 23:09:58 +01:00
Jan Bouwhuis a7155b154e
Fix alexa calling not featured cover services (#105444)
* Fix alexa calls not supported cover services

* Follow up comment and additional tests
2023-12-10 17:27:01 +01:00
Florian B 063ac53f01
Fix adding/updating todo items with due date in CalDAV integration (#105435)
* refactor: return date/datetime for due date

* fix: explicitly set due date on vTODO component

Using `set_due` automatically handles converting the Python-native
date/datetime values to the correct representation required by RFC5545.

* fix: fix tests with changed due date handling

* fix: item.due may not be a str

* refactor: keep local timezone of due datetime

* refactor: reorder import statement

To make ruff happy.

* fix: fix false-positive mypy error
2023-12-10 08:23:05 -08:00
Jan-Philipp Benecke ff85d0c290
Migrate mqtt tests to use freezegun (#105414) 2023-12-10 09:25:16 +01:00
Brett Adams 1cc47c0553
Add reauth to Tessie (#105419)
* First pass at Tessie

* Working POC

* async_step_reauth

* Config Flow tests

* WIP

* Add test requirement

* correctly gen test requirements

* 100% coverage

* Remove remnants of copy paste

* Add TPMS

* Fix docstring

* Remove redundant line

* Fix some more copied docstrings

* Grammar

* Create reusable StrEnum

* Streamline get

* Add a couple more sensors

* Removed need for a model

* Move MODELS

* Remove DOMAIN from config flow

* Add translation strings

* Remove unused parameter

* Simplify error handling

* Refactor coordinator to class

* Add missing types

* Add icon to shift state

* Simplify setdefault

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

* Use walrus for async_unload_platforms

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

* Reformat entity init

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

* Remove Unique ID

* Better Config Flow Tests

* Fix all remaining tests

* Standardise docstring

* Remove redudnant test

* Set TessieDataUpdateCoordinator on entity

* Correct some sensors

* add error types

* Make shift state a ENUM sensor

* Add more sensors

* Fix translation string

* Add precision suggestions

* Move session from init to coordinator

* Add api_key type

* Remove api_key parameter

* Meta changes

* Update TessieEntity and TessieSensor translations

* Goodbye translation keys

* bump tessie-api to 0.0.9

* Fix only_active to be True

* Per vehicle coordinator

* Rework coordinator

* Fix coverage

* WIP

* The grand rework

* Add comments

* Use ENUM more

* Add ENUM translations

* Update homeassistant/components/tessie/sensor.py

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

* Add entity_category

* Remove reauth

* Remove session

* Update homeassistant/components/tessie/__init__.py

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

* Add property tag

* Add error text

* Complete config flow tests

* Fix property and rename

* Fix init test

* Reworked coordinator tests

* Add extra checks

* Update homeassistant/components/tessie/__init__.py

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

* Update homeassistant/components/tessie/coordinator.py

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

* Apply suggestions from code review

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

* Ruff fix

* Update homeassistant/components/tessie/config_flow.py

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

* Remove future ENUMs

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

* Ruff fix

* Update homeassistant/components/tessie/config_flow.py

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

* Remove reauth and already configured strings

* Lowercase sensor values for translation

* Update homeassistant/components/tessie/__init__.py

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

* Fixed, before using lambda

* Add value lambda

* fix lambda

* Fix config flow test

* @bdraco fix for 500 errors

* format

* Add reauth

* Reuse string in reauth

* Ruff

* remove redundant check

* Improve error tests

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-09 23:37:57 -08:00
elmurato 7b32e4142e
Make API init async in Minecraft Server (#105403)
* Make api init async

* Remove duplicate assignment of address and set server to None in constructor
2023-12-09 21:15:48 -08:00
Jan-Philipp Benecke a8148cea65
Migrate roku tests to use freezegun (#105418) 2023-12-09 12:47:19 -10:00
Brett Adams 64a5271a51
Add Tessie Integration (#104684)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-09 12:46:32 -10:00
vexofp 327016eaeb
Accept HTTP 200 through 206 as success for RESTful Switch (#105358) 2023-12-09 12:45:33 -10:00
Raman Gupta 4e1677e3f0
Remove zwave_js device on device reset (#104291)
* Reload zwave_js config entry on device reset

* remove device

* Just remove the device and don't reload

* revert change to notification message

* Assert device is no longer there
2023-12-09 23:33:31 +01:00
Jan-Philipp Benecke a090bcb8a5
Migrate time_date tests to use freezegun (#105409) 2023-12-09 21:35:52 +01:00
J. Nick Koston a0bf170fb4
Avoid ffmpeg subprocess for many component tests (#105354) 2023-12-09 19:41:37 +01:00
Maciej Bieniek 35b733fa2c
Bump `aioshelly` to version 7.0.0 (#105384)
* Remove get_rpc_device_sleep_period() function

* Bump aioshelly version to 7.0.0

* Remove firmware compatibility check from BLE scanner

* Remove firmware compatibility check from light transition

* Update default fw ver

* Use LightEntityFeature in tests
2023-12-09 17:12:05 +02:00
Jan-Philipp Benecke b5785003a3
Migrate unifi tests to use freezegun (#105343) 2023-12-09 12:55:40 +01:00
Brett Adams d54c36307a
Fix the ruff-format error (#105376) 2023-12-09 11:53:47 +01:00
Jan-Philipp Benecke 2d02cdcd0d
Migrate gree tests to use freezegun (#105340) 2023-12-09 10:19:42 +01:00
Jan-Philipp Benecke 4d708f1931
Migrate template tests to use freezegun (#105341) 2023-12-09 09:47:28 +01:00
Lucas Mindêllo de Andrade f567bf6dfe
Sun WEG integration (#88272)
* feat(sunweg): initial support

* chore: removed commented out code

* chore: removed warning

* fix: set never_resets for total sensors

* test: some tests

* fix(sunweg): default plantid type

* fix(sunweg): return first plant id

* test(sunweg): improved code coverage

* chore(sunweg): missing FlowResult return type

* chore(sunweg): removed unused strings

* perf(sunweg): using only one api instance

* chore(sunweg): removed uneeded atribute

* refact(sunweg): small refactoring

* refact(sunweg): typing

* chore(sunweg): comments

* chore(sunweg): bump version

* chore(sunweg): bump lib version

* test(sunweg): different mocking and coverage

* test: fixed setup component parameter

* feat: dynamic metrics

* fix(sunweg): ruff

* fix(sunweg): mypy

* refact(sunweg): codereview suggestions

* chore(sunweg): removed unused string

* chore(sunweg): typehint and code formatting
2023-12-09 09:45:40 +01:00
Brett Adams e1df1f9ffe
Replace aiohttp mock with patch in Advantage Air (#104932)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-08 15:15:57 -10:00
Jan-Philipp Benecke a7845406a5
Migrate homeassistant component tests to use freezegun (#105333) 2023-12-08 21:18:09 +01:00
Bouwe Westerdijk 46e75ed94b
Bump plugwise to v0.34.5 (#105330) 2023-12-08 21:15:33 +01:00
G Johansson 99cf4a6b2d
Add rollback on exception that needs rollback in SQL (#104948) 2023-12-08 21:13:37 +01:00
Excentyl 46d626280e
Initialize energy_state without price (#97031)
Co-authored-by: Erik <erik@montnemery.com>
2023-12-08 17:46:08 +01:00
Brandon Rothweiler 1c7bd3f729
Add A. O. Smith integration (#104976) 2023-12-08 17:17:42 +01:00
Michael Hansen fdeb9e36c3
Use area id for context instead of name (#105313) 2023-12-08 10:05:21 -06:00
Jan Bouwhuis e5a115ce1f
Fix mqtt json light state updates using deprecated color handling (#105283) 2023-12-08 16:54:02 +01:00
Erik Montnemery b0ef9623f9
Add test for energy cost sensor for late price sensor (#105312) 2023-12-08 16:51:07 +01:00
Raj Laud 45f7ffb34c
Add support for accessing Squeezebox over over https (#95088)
* Supports access to squeezebox server behind https reverse proxy

* Update squeezebox test

* Update homeassistant/components/squeezebox/config_flow.py

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

* Update homeassistant/components/squeezebox/config_flow.py

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

* Update squeezebox unit tests based on code review

* Migration unit test

* Run black on suggestions accepted in code review

* Apply suggestions from code review

Instead of upgrading squeezebox config, just assume a default of https=False.

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

* Update test_init.py

Remove migrate entry test since we are no longer migrating

* Delete tests/components/squeezebox/test_init.py

Remove unused test

---------

Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-12-08 15:51:19 +01:00
Jan-Philipp Benecke 6b7dace8d4
Migrate samsungtv tests to use freezegun (#105286) 2023-12-08 14:37:02 +01:00
Jan Bouwhuis 8721327176
Fix CI test_invalid_rrule_fix test by freezing the time (#105294) 2023-12-08 14:35:01 +01:00
Yuxin Wang 88ddc25129
Replace apcaccess dependency with aioapcaccess in apcupsd (#104571)
* Replace apcaccess dependency with async version aioapcaccess

* Upgrade the dependency to the latest version (v0.4.2)

* Handle asyncio.IncompleteReadError
2023-12-08 12:40:09 +01:00
Øyvind Matheson Wergeland 9fb9ff4f90
Remove workaround for default lock code in Matter (#105173)
* Matter: Remove workaround for default lock code

* Review

* Review 2
2023-12-08 11:46:27 +01:00
Duco Sebel 156dac394a
Add migration for old HomeWizard sensors (#105251)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-12-08 09:39:39 +01:00
ollo69 b29e9e2df0
Fix AsusWrt invalid data type with tuple type (#105247) 2023-12-08 09:01:22 +01:00
osohotwateriot 664d2410d5
Add OSO Energy integration (#70365)
* Add OSO Energy integration

* Add min/max for v40 level and bump pyosoenergyapi to 1.0.2

* OSO Energy address review comments

* Bump pyosoenergyapi to 1.0.3 and remove scan interval

* Remove unnecessary code

* Update homeassistant/components/osoenergy/__init__.py

Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>

* Fixes to latest version

* Add support to set temperature

* Update homeassistant/components/osoenergy/config_flow.py

Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>

* Fixes after review

* Remove unused code

* Add support for translations and modify services

* Apply suggestions from code review

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

* Refactor services and constants according to the PR suggestions

* Remove unnecessary code

* Remove unused import in constants

* Refactoring and support for multiple instances

* Apply suggestions from code review

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

* Refactor code and apply review suggestions

* Bump pyosoenergyapi to 1.0.5

* Remove services to reduce initial PR

* Remove extra state attributes and make OSO Entity generic

---------

Co-authored-by: Daniel Hjelseth Høyer <github@dahoiv.net>
Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
Co-authored-by: Robert Resch <robert@resch.dev>
2023-12-08 08:51:59 +01:00
Michael Hansen 43daeb2630
Set device id and forward errors to Wyoming satellites (#105266)
* Set device id and forward errors

* Fix tests
2023-12-07 19:44:43 -06:00
Michael Hansen e9f8e7ab50
Add Wyoming satellite audio settings (#105261)
* Add noise suppression level

* Add auto gain and volume multiplier

* Always use mock TTS dir in Wyoming tests

* More tests
2023-12-07 17:02:55 -05:00
Joost Lekkerkerker 00e87b9dff
Migrate Gree to has entity name (#104739)
* Migrate Gree to has entity name

* Migrate Gree to has entity name
2023-12-07 22:47:52 +01:00
On Freund c4d77877d2
Fix update of uncategorized OurGroceries items (#105255)
* Fix update of uncategorized OurGroceries items

* Address code review comments
2023-12-07 22:11:08 +01:00
Jan-Philipp Benecke 8a4b761c78
Use freezegun in cert_expiry tests (#105125) 2023-12-07 21:55:37 +01:00
Michael Hansen 4c4ad9404f
Don't return TTS URL in Assist pipeline (#105164)
* Don't return TTS URL

* Add test for empty queue
2023-12-07 15:28:04 -05:00
Jan-Philipp Benecke 6666b796f2
Migrate auth tests to use freezegun (#105243) 2023-12-07 21:18:10 +01:00
G Johansson 2daa94b600
Fix check_date service in workday (#105241)
* Fix check_date service in workday

* Add test
2023-12-07 20:04:39 +01:00
Jan-Philipp Benecke dd902bc956
Explicit check for None in Discovergy entity if condition (#105248)
Fix checking for None in Discovergy
2023-12-07 19:47:14 +01:00
Erik Montnemery 84329844fd
Disable config flow progress in peco config flow (#105222) 2023-12-07 13:25:23 +01:00
Duco Sebel f8c216a5ea
Use brightness scaling util in HomeWizard Number entity (#105147) 2023-12-07 09:37:20 +01:00
Duco Sebel 3d5329755f
Add extra tests for HomeWizard for unsupported entity creation (#105149) 2023-12-07 09:24:27 +01:00
Robert Svensson 2a8a60b381
Improve LIDL christmas light detection in deCONZ (#105155) 2023-12-07 09:19:38 +01:00
Cían Hughes e051244927
Add Modbus fan speed support (#104577)
Co-authored-by: jan iversen <jancasacondor@gmail.com>
2023-12-07 08:19:03 +01:00
Jan-Philipp Benecke 05e122e22b
Modernize and cleanup trend tests (#105010)
Co-authored-by: Em <emmanuel.sciara@gmail.com>
2023-12-06 18:46:35 +01:00
Tucker Kern ff21c02cb6
Add preset modes to ESPHome fan entities (#103781)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-06 06:53:52 -10:00
Jan-Philipp Benecke a16819e0e5
Use freezegun in utility_meter tests (#105123) 2023-12-06 14:43:26 +01:00
Ville Skyttä a29695e622
Add Huawei LTE network mode select (#104614)
* Convert network mode from sensor to select for huawei_lte

This also introduces the select platform to huawei_lte integration.

* Move (networkmode, str) mapping to const

Also, rebase on top of the current dev

* Fix variable naming, initialize name

* Fix wrong key for router access

* Typing fixes

* Adapt to current way of registering subscriptions

* Simplify option management, make translatable

* Make use of custom entity description

* Add icon

* Revert sensor formatting changes, move to another PR

* Improve entity class naming

* Add test

* Make sure entity descriptions define a setter function

---------

Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
2023-12-06 14:23:26 +02:00
J. Nick Koston bf8f78c041
Fix flakey logbook tests (#105111) 2023-12-06 08:15:48 +01:00
J. Nick Koston a528183556
Bump habluetooth to 0.8.0 (#105109) 2023-12-06 08:15:24 +01:00
TJ Horner 19e193ae1d
Increase frequency of weatherkit updates (#105094) 2023-12-05 09:45:26 -10:00
J. Nick Koston 94d168e20e
Move Bluetooth advertisement tracker to habluetooth library (#105083) 2023-12-05 19:53:29 +01:00
Michael 3310f4c130
Add significant Change support for weather (#104840) 2023-12-05 19:17:52 +01:00
Jan-Philipp Benecke dc17780e5b
Remove device from known_devices upon import in ping device tracker (#105009)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-05 18:52:22 +01:00
J. Nick Koston b6245c834d
Move local bluetooth scanner code into habluetooth library (#104970) 2023-12-05 07:19:02 -10:00
Erik Montnemery 428c184c75
Improve yamaha tests (#105077) 2023-12-05 07:17:56 -10:00
Erik Montnemery 5b55c7da5f
Remove logic converting empty or falsy YAML to empty dict (#103912)
* Correct logic converting empty YAML to empty dict

* Modify according to github comments

* Add load_yaml_dict helper

* Update check_config script

* Update tests
2023-12-05 18:08:11 +01:00