Commit Graph

18825 Commits (b674985b202e2f309bf511067762339eeaf12d6c)

Author SHA1 Message Date
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