Commit Graph

18941 Commits (fde03d7888e3c25e8a34cd452290f2db8e605316)

Author SHA1 Message Date
Joost Lekkerkerker 01ded7daea
Add config flow to Streamlabs water (#104962)
* Add config flow to Streamlabs water

* Add config flow to Streamlabs water

* Add config flow to Streamlabs water

* Add issue when import is successful

* Remove import issue when entry already exists

* Remove import issue when entry already exists

* Fix feedback

* Fix feedback

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-12-26 22:24:28 +01:00
G Johansson 4f0ee20ec5
Add config flow to System Monitor (#104906)
* Initial commit for config flow to System Monitor

* sensors

* Fixes

* Works

* Add import

* entity_registry_enabled_default = False

* entity_category = diagnostic

* Create issue

* issue in config flow

* Tests

* test requirement

* codeowner

* Fix names

* processes

* Fix type

* reviews

* get info during startup once

* Select process

* Legacy import of resources

* requirements

* Allow custom

* Fix tests

* strings

* strings

* Always enable process sensors

* Fix docstrings

* skip remove sensors if no sensors

* Modify sensors

* Fix tests
2023-12-26 18:29:32 +01:00
Simone Chemelli 2cd6c2b6bf
Add alarm platform to Comelit (#104718)
* initial work on alarm

* final work on alarm

* coveragerc

* add tests

* add code validation

* remove sensor changes for a dedicated PR

* code optimization and cleanup

* tweaks

* tweak #2

* apply suggestion

* code quality

* code quality #2

* fix cover.py

* api typing

* use base classes where possibile

* apply const as per review comment

* cleanup unload entry

* apply review comments
2023-12-26 18:27:33 +01:00
Marc Mueller c6d1f1ccc8
Fix pytest test collection warning (#106405) 2023-12-26 16:23:19 +01:00
mkmer e9f28c2060
Redact unique id from diagnostics in blink (#106413)
redact unique id
2023-12-26 16:16:54 +01:00
Tobias Perschon c8f9285aba
Switch unifi_direct to external library (#105046)
* switch to external library

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* use mac as name if no hostname is available

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* update requirements_test_all

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* update .coveragerc

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* update codeowners and remove old tests

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* reverted get_device_name to old behaviour

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* typing and some cleanup

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* typing fix

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* code cleanup

Signed-off-by: Tobias Perschon <tobias@perschon.at>

---------

Signed-off-by: Tobias Perschon <tobias@perschon.at>
2023-12-26 13:22:53 +01:00
Maciej Bieniek 3eef1a3f6a
Add valve platform for Shelly Gas Valve (#106087)
* Add valve platform

* Update BLOCK_PLATFORMS

* Add tests

* Use _attr_is_closed

* Fix mypy errors

* Make the valve switch to disabled by default

* Add deprecation issues

* Remove LOGGER

* Clean

* Add deprecation comments

* Suggested changes

* Set True for is_fixable

* Show valve entity and services in repair issue
2023-12-26 07:56:21 +01:00
Robert Hillis 6f9bff7602
Add config flow to Netgear LTE (#93002)
* Add config flow to Netgear LTE

* uno mas

* uno mas

* forgot one

* uno mas

* uno mas

* apply suggestions

* tweak user step

* fix load/unload/dep

* clean up

* fix tests

* test yaml before importing

* uno mas

* uno mas

* uno mas

* uno mas

* uno mas

* fix startup hanging

* break out yaml import

* fix doc string

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2023-12-26 05:19:28 +01:00
J. Nick Koston eb3fde7261
Avoid clearing the attr cache in setter when nothing has changed (#106384) 2023-12-25 09:13:48 -10:00
Jan Bouwhuis 3016dbc2bd
Enable toggle on valve/cover start in google_assistant (#106378) 2023-12-25 15:40:17 +01:00
G Johansson 123b2669f3
Add full coverage to Fast.com (#105596)
* Add full test coverage for Fast.com

* Remove not needed

* Add service deprecated test

* Rename speedtest

* Extend delay test
2023-12-25 12:04:07 +01:00
Brett Adams 4c11cb78c8
Add delay to manual refresh in Advantage Air (#104918)
* Add debouncer

* Avoid having 3 calls

* Debounce causes extra refresh in reload window

* Seperate disabled test to avoid latent refresh

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-12-25 12:01:59 +01:00
Patrick Frazer 771409579a
Add select platform to drop_connect integration (#106309)
* Add select platform to drop_connect integration

* Fix select test

* Fix minor issues

* Make function definition more specific

* Revert change to switch.py for inclusion in separate PR

* Improve typing

* Add translation keys for select options

* Fix set function typing

* Remove redundant value check

* Remove args that match defaults
2023-12-24 15:03:10 +01:00
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
Robert Resch e18d2b8873
Deprecate deprecated device_registry helper constants (#106227) 2023-12-22 11:21:45 +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
Robert Resch 8b08b5e8d2
Deprecate legacy_templates (#105556)
* Deprecate legacy_templates

* Improve wording

* Implement suggestion

* simplify

* Add deleting of the repair issues back

* Update homeassistant/components/homeassistant/strings.json

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

* Test issue removal too

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-12-22 00:42:16 +01:00
Robert Resch c4c422de79
Skip logging deprecated constant if the calling integration couldn't be indentified (#106181)
* Add option to log only if a integreation is detected for a deprecated constant

* Require param

* Add test that log entry is not created

* typo
2023-12-21 23:19:40 +01: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
Erik Montnemery 0534b0dee4
Improve entity tests (#106175) 2023-12-21 15:32:25 +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
Robert Resch 5a3db078d5
Use patch.dict in deprecation test "test_check_if_deprecated_constant" (#106117) 2023-12-20 16:06:26 +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 c226d793d4
Move common function for testing derepcation constants to util (#106063) 2023-12-19 17:31:31 +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
Michael 29e30e796a
Add significant change helper check_valid_float (#106005) 2023-12-18 21:59:30 +01: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
Erik Montnemery 2515e520c1
Allow step size any for number selector in slider mode (#105978) 2023-12-18 15:30:59 +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
J. Nick Koston 755dcd8bc6
Ensure bluetooth auto recovery does not run in tests (#105841) 2023-12-16 06:09:03 -10:00
J. Nick Koston 47f8e08261
Reduce overhead to connect dispatcher (#105715)
Reduce overhead connect dispatcher

- We tend to have 1000s (or 10000s) of connected dispatchers which
  makes these prime targets to reduce overhead/memory

- Instead of creating new functions to wrap log exceptions each time
  use partials which reuses the function body and only create new
  arguments

Previous optimizations #103307 #93602
2023-12-16 10:16: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