1
mirror of https://github.com/home-assistant/core synced 2024-08-15 18:25:44 +02:00
Commit Graph

13659 Commits

Author SHA1 Message Date
Jan Bouwhuis
84b2c74746
Move MQTT discovery hass.data globals to dataclass (#78706)
* Add MQTT discovery hass.data globals to dataclass

* isort

* Additional rework

* Add hass.data["mqtt_tags"] to dataclass

* Follow-up comment

* Corrections
2022-09-28 14:13:44 +02:00
Paulus Schoutsen
d3f5ccfed8
Allow fetching script config (#79131) 2022-09-28 13:52:58 +02:00
epenet
5438552d4a
Cleanup unit conversion (#79197)
* Move UNIT_RATIO to BaseUnitConverter

* Make UNIT_CONVERSION private

* Remove STATISTIC_UNIT_TO_UNIT_CLASS constant

* Cleanup websocket_api

* Imrpove valid_units check
2022-09-28 13:49:46 +02:00
Rami Mosleh
9bd2117240
Add typing hints to mikrotik tests (#79144) 2022-09-28 13:05:45 +02:00
Paulus Schoutsen
4843d330f3
Allow fetching automation config (#79130) 2022-09-28 12:49:00 +02:00
epenet
5389ff3253
Add new weight device class (#79185) 2022-09-28 12:13:49 +02:00
epenet
c96c5bed7d
Remove argument validation in Unit Converter (#79107)
* Remove argument validation in Unit Converter

* Use HomeAssistantError

* Adjust tests

* Improve coverage
2022-09-28 10:58:04 +02:00
epenet
1b8bed936c
Use new DISTANCE and VOLUME device classes in Renault (#77488) 2022-09-28 10:46:24 +02:00
Paulus Schoutsen
010430780e
Allow controlling PrusaLink print jobs (#78720)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-09-28 10:42:19 +02:00
Erik Montnemery
6ef33b1d39
Fix overriding a script's entity_id (#78765) 2022-09-28 10:37:34 +02:00
Yuxin Wang
52307708c8
Refactor apcupsd to use config flow (#64809)
* Add Config Flow to APCUPSd integration and remove YAML support.

* Hide the binary sensor if user does not select STATFLAG resource.

* Add tests for config flows.

* Simplify config flow code.

* Spell fix.

* Fix pylint warnings.

* Simplify the code for config flow.

* First attempt to implement import flows to suppport legacy YAML configurations.

* Remove unnecessary log calls.

* Wrap synchronous update call with `hass.async_add_executor_job`.

* Import the YAML configurations when sensor platform is set up.

* Move the logger call since the variables are not properly set up.

* Add codeowner.

* Fix name field of manifest.json.

* Fix linting issue.

* Fix incorrect dependency due to incorrect rebase.

* Update codeowner and config flows via hassfest.

* Postpone the deprecation warning to 2022.7.

* Import future annotations for init file.

* Add an newline at the end to make prettier happy.

* Update github id.

* Add type hints for return types of steps in config flow.

* Move the deprecation date for YAML config to 2022.12.

* Update according to reviews.

* Use async_forward_entry_setups.

* Add helper properties to `APCUPSdData` class.

* Add device_info for binary sensor.

* Simplify config flow.

* Remove options flow strings.

* update the tests according to the changes.

* Add `entity_registry_enabled_default` to entities and use imported CONF_RESOURCES to disable entities instead of skipping them.

* Update according to reviews.

* Do not use model of the UPS as the title for the integration.

Instead, simply use "APCUPSd" as the integration title and let the device info serve as title for each device instead.

* Change schema to be a global variable.

* Add more comments.

* Rewrite the tests for config flows.

* Fix enabled_by_default.

* Show friendly titles in the integration.

* Add import check in `async_setup_platform` to avoid importing in sensor platform setup.

* Add import check in `async_setup_platform` to avoid importing in sensor platform setup.

* Update comments in test files.

* Use parametrize instead of manually iterating different test cases.

* Swap the order of the platform constants.

* Avoid using broad exceptions.

* Set up device info via `_attr_device_info`.

* Remove unrelated test in `test_config_flow`.

* Use `DeviceInfo` instead of dict to assign to `_attr_device_info`.

* Add english translation.

* Add `async_create_issue` for deprecated YAML configuration.

* Enable UPS status by default since it could show "online, charging, on battery etc" which is meaningful for all users.

* Apply suggestions from code review

* Apply suggestion

* Apply suggestion

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-09-28 09:14:04 +02:00
G Johansson
18be5f1387
SQL fix entry options save (#78145)
* SQL fix options

* Testing
2022-09-28 08:49:37 +02:00
Jack Boswell
3d3aa824b3
Refactor Trend to use async_setup_platform (#78216)
* Move trend constants to const.py

* Migrate to async_setup_platform

* Fix test

* Reorder attrs
2022-09-28 08:46:13 +02:00
Erik Montnemery
c38b1e7727
Improve check of new_entity_id in entity_registry.async_update_entity (#78276)
* Improve check of new_entity_id in entity_registry.async_update_entity

* Fix race in rfxtrx config flow

* Make sure Event is created on time

* Rename poorly named variable

* Fix typing

* Correct typing of _handle_state_change
2022-09-28 08:43:58 +02:00
Michael
69bf77be12
Avoid multiline lambdas in Fritz!Smarthome sensors (#78524)
* avoid multiline lambdas

* update tests
2022-09-28 08:43:31 +02:00
Vincent Knoop Pathuis
9ee81fdd77
Landis+Gyr Heat Meter: add heat previous year GJ as diagnostic (#78690)
Add heat previous year GJ as diagnostic
2022-09-28 08:28:31 +02:00
Robert Hillis
e360a4fa9e
Bump aiopyarr to 22.9.0 (#79173) 2022-09-28 08:06:24 +02:00
Ville Skyttä
b54458dfba
Fix EZVIZ spelling case (#79164)
* Fix EZVIZ spelling case

The vendor seems consistent about all-uppercase spelling, so let's
follow suit.

* Revert changes to translations other than English
2022-09-28 07:41:33 +02:00
Erik Montnemery
9084beda32
Keep storing statistics for sensors which change device class (#79155) 2022-09-27 14:33:28 -04:00
uvjustin
a561b608bf
Add spotify support to forked-daapd (#79136) 2022-09-27 14:32:05 -04:00
uvjustin
b043a6ba88
Cleanup add browse media forked daapd #79009 (#79157) 2022-09-27 14:07:19 -04:00
J. Nick Koston
5eb50f63fd
Ensure bleak_retry_connector uses HaBleakClientWrapper (#79132) 2022-09-27 14:06:10 -04:00
epenet
12e4d18038
Add volume to SensorDeviceClass (#77960)
* Add volume to SensorDeviceClass

* Adjust recorder

* Adjust tests

* Adjust sensor UNIT_CONVERTERS

* Adjust recorder

* Update strings.json
2022-09-27 19:37:52 +02:00
Franck Nijhof
d8a15f3dda
Fix Withings authentication to leverage default redirect URI (#79158) 2022-09-27 13:22:52 -04:00
epenet
7c448416e1
Add speed to SensorDeviceClass (#77953)
* Add speed to SensorDeviceClass

* Adjust recorder

* Adjust tests

* Adjust sensor UNIT_CONVERTERS

* Add tests

* Add websocket tests

* Update strings.json
2022-09-27 17:19:34 +01:00
Erik Montnemery
4fcd0f3e23
Fix recorder fixtures (#79147) 2022-09-27 17:00:06 +02:00
Erik Montnemery
53263ea9bc
Revert "Add serial_number to device registry entries" (#79139) 2022-09-27 16:36:38 +02:00
epenet
bfcc18e5b8
Add distance to SensorDeviceClass (#77951)
* Add distance to SensorDeviceClass

* Adjust recorder

* Adjust tests

* Adjust recorder

* Update __init__.py

* Update test_websocket_api.py

* Update test_websocket_api.py

* Update test_websocket_api.py

* Update strings.json

* Fix tests

* Adjust docstring
2022-09-27 15:34:00 +01:00
Erik Montnemery
5bcef1c7ce
Indicate in statistics issues when units can be converted (#79121) 2022-09-27 13:51:38 +02:00
Erik Montnemery
cba3b6ad94
Add serial_number to device registry entries (#77713) 2022-09-27 09:08:54 +02:00
Erik Montnemery
c52d0f7495
Support converting statistics to another unit (#79117) 2022-09-27 08:44:58 +02:00
epenet
df47fda2a0
Remove parametrization in recorder websocket api tests (#78864)
Remove parametrization in websocket api tests
2022-09-27 08:27:26 +02:00
Bram Kragten
7e9be812ca
Add unique id to entity reg list response (#78945)
* Add unique id to entity reg list response

* Update test_entity_registry.py
2022-09-27 08:25:56 +02:00
Jan Bouwhuis
c5a58c8501
Fix MQTT setup after changing config entry flow options (#79103)
Fix issues with config flow options
2022-09-27 08:05:28 +02:00
uvjustin
499c3410d1
Add browse media to forked-daapd (#79009)
* Add browse media to forked-daapd

* Use elif in async_browse_image

* Add tests

* Add tests

* Add test

* Fix test
2022-09-26 20:40:23 -04:00
Kevin Stillhammer
de3be96bdb
Remove deprecated YAML import for here_travel_time (#77959) 2022-09-26 08:10:16 -07:00
Martin Hjelmare
2a94c42cea
Support VLC 4 pause (#77302)
* Support VLC 4 pause

* Clean vlc tests types
2022-09-26 16:17:39 +02:00
Bouwe Westerdijk
2667f0b792
Bump plugwise to v0.21.3, add related new features (#76610)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-09-26 15:55:29 +02:00
J. Nick Koston
75f6f9b5e2
Improve performance of Bluetooth device fallback (#79078) 2022-09-26 09:12:08 -04:00
Robert Hillis
a8b8b245d1
Allow multiple entries in Tautulli (#74406) 2022-09-26 08:54:17 -04:00
Franck Nijhof
fe5e3320d4
Adjust switch as X to inherit entity category (#79081) 2022-09-26 10:22:45 +02:00
Avi Miller
691028dfb4
Enable the move firmware effect on multizone lights (#78918)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-09-25 21:08:36 -10:00
J. Nick Koston
75104159c6
Fix mqtt tests (#79079) 2022-09-25 20:07:50 -10:00
Tom Puttemans
7aa53feff4
Add config flow and MQTT autodiscover to dsmr_reader integration (#71617)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-09-25 23:15:50 -04:00
Justin Sherman
f26fadbdfc
Add range to min_max (#78282) 2022-09-25 23:08:31 -04:00
Robert Hillis
bd01f90d42
Migrate attributes to sensors in Litter-Robot (#78580) 2022-09-25 22:40:34 -04:00
Robert Hillis
82bab545df
Add missing doc strings and requirements in Google Sheets (#78616) 2022-09-25 22:12:07 -04:00
HarvsG
49eeeae51d
Fix Bayesian sensor to use negative observations (#67631)
Co-authored-by: Diogo Gomes <diogogomes@gmail.com>
2022-09-25 22:02:35 -04:00
Tobias Sauerwein
81abeac83e
Netatmo refactor to use pyatmo 7.0.1 (#73482) (#78523)
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2022-09-25 21:55:58 -04:00
J. Nick Koston
92612c9fe3
Add RSSI sensor to HomeKit Controller (#78906) 2022-09-25 21:31:56 -04:00
Paulus Schoutsen
697e7b3a20
TTS Cleanup and expose get audio (#79065) 2022-09-25 20:53:20 -04:00
J. Nick Koston
49f203c635
Add support for newer Magic Home sockets (#79074) 2022-09-25 13:47:56 -10:00
Robert Hillis
c2209111b2
Migrate Radarr to new entity naming style (#79042)
Move Radarr to new naming scheme
2022-09-26 01:26:50 +02:00
J. Nick Koston
917cf674de
Handle battery services that only report low battery in HomeKit Controller (#79072) 2022-09-25 12:08:28 -10:00
Robert Hillis
b70027aec1
Add binary sensor to Radarr (#79043)
* Add binary sensor to Radarr

* uno mas
2022-09-25 23:50:09 +02:00
Robert Svensson
bfd12730f2
Bump aiounifi to v35 (#79040)
* Update imports
Replace constants with enums

* Import new request objects

* Bump aiounifi to v35
2022-09-25 20:08:56 +02:00
Robert Hillis
42bd664305
Add diagnostic sensor to Radarr (#79044)
* Add diagnostic sensor to Radarr

* coverage
2022-09-25 16:11:53 +02:00
Maciej Bieniek
c46f55caa8
Add reauth flow to Shelly integration (#78786) 2022-09-24 22:01:49 -04:00
Paulus Schoutsen
5774664234
Clean up Speech-to-text integration and add tests (#79012) 2022-09-24 09:58:01 +02:00
J. Nick Koston
1b144c0e4d
Update to bleak 0.18.0 (#79008) 2022-09-23 15:09:28 -10:00
J. Nick Koston
02731efc4c
Handle iBeacons that broadcast multiple different uuids (#79011)
* Handle iBeacons that broadcast multiple different uuids

* fix flip-flopping between uuids

* naming
2022-09-23 20:45:09 -04:00
Maikel Punie
a495df9759
Fix velbus matching ignored entries in config flow (#78999)
* Fix bug #fix78826

* start using async_abort_entries_match

* fix/rewrite tests
2022-09-23 23:11:06 +02:00
Aaron Bach
21b91f75ba
Bump regenmaschine to 2022.09.2 (#79010)
* Bump `regenmaschine` to 2022.09.2

* Fix tests

* Restore incorrectly-deleted test
2022-09-23 13:46:25 -06:00
Jan Bouwhuis
81514b0d1c
Move MQTT debug_info to dataclass (#78788)
* Add MQTT debug_info to dataclass

* Remove total attr, assign factory

* Rename typed dict to MqttDebugInfo and use helper

* Split entity and trigger debug info

* Refactor

* More rework
2022-09-23 20:55:29 +02:00
Paulus Schoutsen
d39ed0cde4
Remove unused custom data in Google Assistant (#79003) 2022-09-23 13:03:28 -04:00
epenet
62022a2657
Increase code coverage for migrated utilities (#78990)
Increase code coverage for migrated utilites
2022-09-23 17:32:59 +02:00
J. Nick Koston
5477ebdb13
Avoid creating iBeacon trackers when the device has no name (#78983) 2022-09-23 05:06:24 -10:00
epenet
08ebb9f31a
Test sum AND mean in recorder tests (#78998) 2022-09-23 09:55:17 -04:00
Artem Draft
7c460cc641
Add PSK auth and SSDP discovery to Bravia TV (#77772) 2022-09-23 09:03:43 -04:00
epenet
4200778eaf
Move distance and speed util to unit_conversion (#78967) 2022-09-23 08:23:59 -04:00
Raman Gupta
95e3572277
Retire climacell entirely (#78901)
* Retire climacell entirely

* remove fixtures

* remove const file

* Remove all traces of climacell integration

* missed some
2022-09-23 09:05:55 +02:00
J. Nick Koston
d1da6ea04d
Fix flapping bluetooth scanner test (#78961) 2022-09-22 23:39:38 -04:00
J. Nick Koston
2b8d582894
Remove min rssi setting from iBeacon (#78843) 2022-09-22 23:39:00 -04:00
Robert Hillis
0ccb495209
Radarr Config Flow (#78965) 2022-09-22 22:16:24 -04:00
Erik Montnemery
6b0c9b6a6a
Simplify energy settings (#78947) 2022-09-22 21:58:15 -04:00
epenet
ddf56baf7a
Move temperature utility to unit_conversion (#78960) 2022-09-22 18:31:50 +02:00
epenet
c8491c4404
Move volume utility to unit_conversion (#78955)
* Move volume utility to unit_conversion

* Split tests
2022-09-22 17:49:45 +02:00
epenet
523d8d246b
Move pressure utility to unit_conversion (#78953) 2022-09-22 16:44:09 +02:00
epenet
0767cdd935
Move energy and power utilites to unit_conversion (#78950)
* Move energy and power utilites to unit_conversion

* Move tests
2022-09-22 15:39:49 +02:00
Joakim Plate
27d1c1f471
Nibe Heat Pump after merge fixups (#78931) 2022-09-22 12:17:04 +02:00
Joakim Plate
f5120872aa
Support for nibe heat pumps with local access (#78542)
* Add nibe local integration

* Add sensor platform

* Enable sensor platform

* Fix manifest

* Correct domain after rename

* Adjust tests for rename

* Correct codeowners

* Add requirements for tests

* Grab coil by name

* Switch to home assistant error

* Config entry always exist

* Switch to create task

* Bump to 0.5.0

* Use new coils access

* Remove unneeded check

* Use single instance of logger

* Test invalid ip

* Don't allow coil to be None

* Remove sleep

* Initialize data in coordinator init

* Add utils to ignore

* Update homeassistant/components/nibe_heatpump/manifest.json

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

* Use generator instead

* Use tenacity as retry decorator

* Use package instead of name to get logger

* Skip broad exception handling

* Catch missing coil exception

* Add missing test

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-09-22 08:43:30 +02:00
Allen Porter
d034fd2629
Prompt user to remove application credentials when deleting config entries (#74825)
* Prompt user to remove application credentials when deleting config entries

* Adjust assertions on intermediate state in config entry tests

* Add a callback hook to modify config entry remove result

* Improve test coverage and simplify implementation

* Register remove callback per domain

* Update homeassistant/components/application_credentials/__init__.py

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

* Fix tests to use new variable name including domain

* Add websocket command to return application credentials for an integration

* Remove unnecessary diff

* Apply suggestions from code review

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-09-21 21:02:40 -07:00
Paulus Schoutsen
56e5774e26
Disable force update Netatmo (#78913) 2022-09-21 22:31:14 -04:00
spycle
0e0318dc53
Add Keymitt BLE integration (#76575)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-09-21 15:44:37 -10:00
J. Nick Koston
488b04fc8b
Handle default RSSI values from bleak in bluetooth (#78908) 2022-09-21 17:03:50 -04:00
uvjustin
420285f7ef
Support announce and enqueue in forked-daapd (#77744) 2022-09-21 14:08:28 -04:00
J. Nick Koston
e079968ef4
Handle timeout fetching bond token in config flow (#78896) 2022-09-21 14:03:05 -04:00
J. Nick Koston
0a8a5b973a
Fix samsungtv to abort when ATTR_UPNP_MANUFACTURER is missing (#78895) 2022-09-21 14:02:54 -04:00
epenet
ca78b1a77d
Add new energy utility (#78883)
* Add new energy utility

* Adjust STATISTIC_UNIT_TO_VALID_UNITS
2022-09-21 19:40:40 +02:00
epenet
0d696b84b2
Cleanup root component imports in tests (#78893) 2022-09-21 06:57:41 -10:00
Erik Montnemery
cd6697615f
Validate units when importing statistics (#78891) 2022-09-21 12:08:53 -04:00
Ernst Klamer
c4eafb98fa
Add support for Kegtron Smart (Beer) Keg Monitor BLE devices (#78709) 2022-09-21 05:09:39 -10:00
epenet
d7382aadfe
Add new power utility (#78867)
* Add power utility

* Fix tests
2022-09-21 14:48:38 +02:00
Franck Nijhof
166160e2b5
Add LaMetric button tests (#78754) 2022-09-21 13:57:40 +02:00
Franck Nijhof
1800e98f05
Remove leftover debug print from Melnor (#78870) 2022-09-21 11:49:22 +02:00
Aaron Bach
e265848b63
Remove deprecated Flu Near You integration (#78700) 2022-09-21 11:24:21 +02:00
epenet
0ac581a0b1
Cleanup EntityFeature in tests (#78859) 2022-09-21 10:48:55 +02:00
epenet
c88a874063
Cleanup FlowResultType in tests (#78810) 2022-09-21 09:17:20 +02:00
Michael Jäger
7a6897c757
Add deconz current hvac operation to thermostate based on "state" (#59989)
* deconz - add current hvac operation to thermostate based on "state"

* deconz - extend current hvac operation to thermostate based on "state" and "mode"

* Add tests for current hvac action

* Add boost mode as special case

* format using Black

* sort imports

* Add test for device with mode none and state none

* Update homeassistant/components/deconz/climate.py

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>

* Fix test_climate.py test_no_mode_no_state

* Add test for boost mode

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2022-09-21 08:20:44 +02:00
Erik Montnemery
dae00c70de
Allow selecting display unit when fetching statistics (#78578) 2022-09-20 17:43:57 -04:00