Commit Graph

16580 Commits (5a9815570002c7383534dee2e3421d970db64042)

Author SHA1 Message Date
puddly cc47736d20
Include port info in the ZHA websocket settings response (#93934) 2023-06-01 19:53:41 +02:00
J. Nick Koston 457bc4571d
Make RestoreStateData.async_get_instance backwards compatible (#93924) 2023-06-01 19:31:17 +02:00
Tobias G d4e352d6a7
Add humidity sensor to deconz component (#93024)
Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2023-06-01 19:16:42 +02:00
Arjan 8f485be87e
Properly order moon phases in attribute (#93933) 2023-06-01 19:09:09 +02:00
Sebastian Heiden a260c11d4e
Fix LaMetric Config Flow for SKY (#93483)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-06-01 18:04:00 +02:00
Erik Montnemery f9037d5f6d
Add platform only config schema to nsw_fuel_station and ping (#93913) 2023-06-01 17:30:15 +02:00
Erik Montnemery c1c319d4d1
Rename `cv.no_yaml_config_schema` to `cv.config_entry_only_config_schema` (#93908)
* Rename cv.no_yaml_config_schema to cv.config_entry_only_config_schema

* ✏️
2023-06-01 13:15:48 +02:00
Erik Montnemery 15e5cf01bb
Add `silabs_multiprotocol` platform (#92904)
* Add silabs_multiprotocol platform

* Add new files

* Add ZHA tests

* Prevent ZHA from creating database during tests

* Add delay parameter to async_change_channel

* Add the updated dataset to the dataset store

* Allow MultipanProtocol.async_change_channel to return a task

* Notify user about the duration of migration

* Update tests
2023-06-01 12:32:14 +02:00
Erik Montnemery 4f153a8f90
Remove async_setup from hyperion (#93894) 2023-06-01 12:20:04 +02:00
Erik Montnemery c5dd540ffc
Remove async_setup from econet (#93892) 2023-06-01 12:18:54 +02:00
Joost Lekkerkerker a6b6b03f2e
Add video id to youtube sensor state attributes (#93668)
* Add video id to state attributes

* Make extra state attributes not optional

* Revert "Make extra state attributes not optional"

This reverts commit d2f9e936c8.
2023-06-01 11:46:59 +02:00
Erik Montnemery 08bfe8f5cc
Remove async_setup from ring (#93902) 2023-06-01 11:34:18 +02:00
Erik Montnemery ba76bbee44
Remove async_setup from zerproc (#93903) 2023-06-01 11:33:37 +02:00
Erik Montnemery e0db9ab041
Add CONFIG_SCHEMA to broadlink (#93854)
* Add CONFIG_SCHEMA to broadlink

* Simplify error message

* Rename to no_yaml_config_schema

* Add tests

* Raise issue

* Tweak repairs issue description and title

* Update homeassistant/helpers/config_validation.py

* Add link

* Update homeassistant/components/homeassistant/strings.json

Co-authored-by: Franck Nijhof <git@frenck.dev>

* Fix logic, add test

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-06-01 09:51:26 +02:00
Álvaro Fernández Rojas 11e268775c
Update aioairzone-cloud to v0.1.7 (#93871)
* Update aioairzone-cloud to v0.1.7

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

* airzone_cloud: fix copy&paste description

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-31 20:09:23 -04:00
puddly b9ec3a8af8
Increase Zigbee command retries (#93877)
* Enable retries for requests

* Update unit tests

* Account for fewer group retries in unit tests
2023-05-31 20:08:18 -04:00
Robert Hillis 226647f625
Add binary sensor platform to Dremel 3D Printer (#93881)
Add binary sensor platform to Dremel
2023-05-31 20:07:14 -04:00
mkmer 198608906c
Address late review for whirlpool (#93874)
Address late review
2023-06-01 00:21:13 +02:00
Jeff Grieger 47a2d5b472
Add zwave_js speed config for additional GE/Jasco fan controllers (#92371)
* Add zwave_js speed config for additional GE/Jasco fan controllers

Add speed info for Honeywell(GE/Jasco) 39358 In-Wall Fan Speed Control and Enbrighten(GE/Jasco) 55258 In-Wall Fan Speed Control.

* Add test for Honeywell 39358 In-Wall Fan Speed Control
2023-06-01 00:09:35 +02:00
Paulus Schoutsen cd330a2740
Pass device ID to conversation input (#93867) 2023-05-31 16:56:12 -04:00
Robert Hillis a1e9cf1c24
Add Dremel 3D Printer integration (#85969)
* Add Dremel 3D Printer integration

* remove validators requirement

* ruff

* uno mas

* uno mas

* uno mas

* uno mas

---------

Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Tom Harris <tomharris@harrisnj.net>
2023-05-31 16:55:57 -04:00
Raman Gupta bd8c88f51b
Add error handling for all zwave_js service calls (#93846)
* Add error handling for all service calls

* Switch siren to use internal function

* Remove failing checks

* Revert change to poll service, add comments, and add additional error handling

* Add error handling for ping and refresh + review comment + add tests

* Add test for statistics entity refresh
2023-05-31 11:09:01 -04:00
Justin Vanderhooft 4bade86dcc
Add time component to Melnor Bluetooth integration (#93652)
* Add time component to Melnor Bluetooth integration

* Apply suggestions from code review

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-05-31 11:00:52 -04:00
c0ffeeca7 c3a3ddcfa4
Standardize spelling of TTS and STT (#93857)
* Standardize spelling of TTS and STT

* Apply suggestions from code review

* Update homeassistant/components/tts/media_source.py

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-05-31 11:00:19 -04:00
Mark Kennedy b03dbeaed5
Block legacy get-mac in preference of getmac (#87712)
Co-authored-by: GnatorX <garvinpang@protonmail.com>
2023-05-31 16:57:45 +02:00
Diego Rodríguez Royo 3cf8ae64c8
Matter cover position improvements (#92278) 2023-05-31 16:08:01 +02:00
Luke 1d7498378e
Add Status indicator light switch to Roborock (#93842)
add status indicator light switch
2023-05-31 14:26:39 +02:00
Yuxin Wang 676b6ab706
Add support for "days" unit for STESTI sensor in APCUPSD integration (#93844)
Add a test case for self test interval
2023-05-31 14:25:46 +02:00
Raman Gupta b3990d48d2
Improve Z-Wave support for Ultraviolet multilevel sensor values (#93848)
Improve support for Ultraviolet multilevel sensor values
2023-05-31 13:31:02 +02:00
Raman Gupta 1eb1ea08b0
Add support for Energy Production CC sensors (#93839) 2023-05-31 13:28:07 +02:00
G Johansson f7b15dbf84
Fix Timer change service (#93469) 2023-05-31 12:00:45 +02:00
Erik Montnemery 59c6220b7c
Subscribe to device registry changes from entities (#93601)
* Subscribe to device registry changes from entities

* Use async_track_device_registry_updated_event

* Fix unsubscribe

* Fix logic, add tests
2023-05-31 11:01:55 +02:00
Raman Gupta 204215e0f2
Cleanup unnecessary pylance warnings (#93849) 2023-05-31 10:15:21 +02:00
Jan Bouwhuis 661aedde90
Remove MQTT platform schema warnings (#93785) 2023-05-31 09:02:48 +02:00
Raman Gupta 4119d3198a
Support zwave config parameters not on endpoint 0 (#93383)
* Support zwave config parameters not on endpoint 0

* Update device automation logic

* Make endpoint required

* Update homeassistant/components/zwave_js/services.py

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

* Update homeassistant/components/zwave_js/services.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-05-30 23:52:12 -04:00
Teemu R 23c5e60be0
Swallow error 40000 for songpal power on/off (#80563)
* Swallow error 40000 for songpal power on/off

* Move ERROR_REQUEST_RETRY to consts

* Add tests for the swallow exception behavior

* Update tests/components/songpal/test_media_player.py

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-05-30 22:58:41 -04:00
Raman Gupta 8cd8355ab1
Bump zwave-js-server-python to 0.49.0 (#93835)
* Bump zwave-js-server-python to 0.49.0

* fix tests
2023-05-30 22:40:55 -04:00
leranp 4a3f341444
Language codes for Hebrew (#93681)
* Language codes for Hebrew

There is 2 optional code for Hebrew:
he-IL is the new code
iw-IL is the old code , the google cloud STT for example is using the old code (iw)

* Update language.py

* Update test_language.py

* Update test_language.py

* Update test_language.py

* Simplify duplicate language check

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-05-30 22:27:32 -04:00
mkmer bfec3d68dd
Calculate _attr_native_value when no restore state and appliance is running in Whirlpool (#88559)
* Initialize _attr_native_value when running

* Fix return type on update_sensor_state()
move init at startup if _attr_native_value is None

* allow update _attr_native_value when running and none
2023-05-30 21:48:39 -04:00
J. Nick Koston fba826ae9e
Migrate restore_state helper to use registry loading pattern (#93773)
* Migrate restore_state helper to use registry loading pattern

As more entities have started using restore_state over time, it
has become a startup bottleneck as each entity being added is
creating a task to load restore state data that is already loaded
since it is a singleton

We now use the same pattern as the registry helpers

* fix refactoring error -- guess I am tired

* fixes

* fix tests

* fix more

* fix more

* fix zha tests

* fix zha tests

* comments

* fix error

* add missing coverage

* s/DATA_RESTORE_STATE_TASK/DATA_RESTORE_STATE/g
2023-05-30 20:48:17 -05:00
Dominik f6d3b0618e
Glances: Add error handling for invalid sensor data (#93542)
* Set sensor to Unavailable
when native_value is invalid

* Add unit tests for sensors
2023-05-30 21:35:33 -04:00
Luke 049582ec50
Add Switch platform to Roborock (#93833)
* init

* add switch platform

* remove stale comments

* remove stale list

* set entity category to config
2023-05-30 21:10:28 -04:00
Jan Bouwhuis 3a7f9ab57d
Remove mqtt sensor support for `last_reset_topic` (#93792)
* Remove mqtt sensor support for `last_reset_topic`

* Add cases for empty last reset messages
2023-05-30 21:07:07 -04:00
J. Nick Koston 9f0d3bfce8
Use ReadOnlyDict for entity registry options (#93824)
* Use ReadOnlyDict for entity registry options

While reviewing #93601 it was noticed this was slow at startup
https://github.com/home-assistant/core/pull/93601#issuecomment-1568958280

This is a first pass attempt to improve the performance

* fix tests
2023-05-30 20:11:39 -04:00
Yuxin Wang 0653aed49f
Directly check string representation of sensor states in APCUPSD tests (#93783)
* Directly check the string representation of sensor states

* Fix expected state value for sensor.ups_nominal_output_power
2023-05-30 20:01:05 -04:00
Jesse Hills d7d9143a44
Add speech detection and conversation_id to esphome voice assistant (#93578)
* Add speech detection to esphome voice assistant

* Timeout after silence
Ensure events are sent before finish is called

* use va_version 3 instead of ESPHome version

* Convert repeated fixtures to factory

* Add some v3 tests

* Add conversation_id

* Bump aioesphomeapi to 13.8.0

* Fix missed buffering of detected chunk

* Alter log message

* Updates

* Spelling

* Fix return type
2023-05-30 19:49:22 -04:00
Ville Skyttä c7c4ee13c3
Import `util.dt` as `dt_util` in remaining tests, enforce with ruff (#93765)
* Import `util.dt` as `dt_util` in remaining tests, enforce with ruff

* Fix `util.dt` import in pvpc_hourly_pricing tests
2023-05-30 23:30:31 +03:00
Michael Hansen 9f4c9f1ce3
Bump intents to 2023.5.30 (#93822) 2023-05-30 22:11:08 +02:00
Mike Degatano c25b26214b
Add docker config repair for supervisor issue (#93820) 2023-05-30 22:08:45 +02:00
Raman Gupta 05c3d8bb37
Add zwave_js node statistics sensors (#91714)
* Add node statistics sensors

* fix tests and don't let controller state leak across tests

* Add background RSSI

* Remove extra logging statement

* fix test

* comments

* setup platform once

* Add static properties to entity description

* Update homeassistant/components/zwave_js/sensor.py

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

* don't dupe attribute values in entity description

* fix exception

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-05-30 20:44:32 +02:00
Jan Bouwhuis 1e0770ff8a
Add ssl_verify option to imap integration (#93811)
* Add ssl_verify option to imap integration

* Add test
2023-05-30 19:48:47 +02:00
J. Nick Koston 17d1c0733d
Remove outdated HAOS check from bluetooth (#93809) 2023-05-30 19:41:51 +02:00
Luke de3406c856
Add more information to Roborock Status (#93636)
Co-authored-by: Humberto Gontijo <humberto.gontijo@clevertech.biz>
2023-05-30 18:51:57 +02:00
Raman Gupta 65187c6f11
Add zwave config parameter entities (#92223)
* Add zwave config parameter entities

* Remove unused entity const

* remove unusued imports

* review comments

* switch to reserved values

* fix test
2023-05-30 11:49:55 -04:00
Raman Gupta 90bf5429ca
Add support for Window Covering CC (#93314)
* Refactor zwave_js.cover and improve test coverage

* Remove extra fixtures

* cleanup old stuff

* Get coverage to 100

* Add support for Window Covering CC

* fix bug

* typo

* remove redundant stuff

* slight change to improve readability

* Add device class

* Update to match specs
2023-05-30 11:26:23 -04:00
PeteRager 6a8d18ab35
Sonos setup fails with unhandled exceptions on discovery messages (#90648)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-05-30 10:09:13 -05:00
Erik Montnemery 11299c4537
Deduplicate Thread datasets based on EXTPANID (#93795)
* Deduplicate Thread datasets based on EXTPANID

* Apply suggestions from code review
2023-05-30 16:16:56 +02:00
Erik Montnemery d05d67414a
Teach search about blueprints (#78535) 2023-05-30 15:04:35 +02:00
Diego Rodríguez Royo 1a9da67a28
Add tilt support to Matter cover (#92256) 2023-05-30 13:05:14 +02:00
Erik Montnemery 16d8c8d4d5
Bump python-otbr-api to 2.1.0 (#93790)
* Bump python-otbr-api to 2.1.0

* Fix tests
2023-05-30 12:47:46 +02:00
Álvaro Fernández Rojas 2df49b416c
Add WebServer sensors to Airzone Cloud (#93757) 2023-05-30 10:23:14 +02:00
Erik Montnemery 901624ad6f
Adapt otbr to upstream openthread REST API changes (#93544)
* Adapt otbr to upstream openthread REST API changes

* Bump python-otbr-api to 2.0.0
2023-05-30 10:11:21 +02:00
Allen Porter 01a6173cc9
Fix failing todoist test that used timezone before set by fixture (#93775)
* Fix failing todoist test that used timezone before set by fixture

* Merge fix for dt -> dt_util
2023-05-29 22:45:22 -04:00
rikroe 1ea202a5bc
Add charging switch to BMW Connected Drive (#93737)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-05-29 23:48:13 +02:00
rikroe 52ef4a3b75
Ensure state update after BMW remote service execution (#93745)
Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-05-29 23:28:06 +02:00
Raman Gupta 24290e5d08
Add `datetime` platform (#81943)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-05-29 23:24:15 +02:00
Ville Skyttä 940942a74a
Import `util.dt` as `dt_util` in `components/[p-s]*` (#93761) 2023-05-30 00:09:42 +03:00
Ville Skyttä 2e59ae9e90
Import `util.dt` as `dt_util` in `components/[k-o]*` (#93760) 2023-05-29 23:02:14 +02:00
Ville Skyttä ced67e5800
Import `util.dt` as `dt_util` in `components/[a-d]*` (#93756) 2023-05-30 00:02:06 +03:00
Ville Skyttä 5aadd7ffc9
Import `util.dt` as `dt_util` in `components/[g-i]*` (#93759) 2023-05-30 00:01:00 +03:00
Ville Skyttä 1ce74ba25c
Import `util.dt` as `dt_util` in `components/[t-z]*` (#93763) 2023-05-29 23:00:43 +02:00
Ville Skyttä 70c49824d7
Import `util.dt` as `dt_util` in `components/[e-f]*` (#93758) 2023-05-30 00:00:11 +03:00
Álvaro Fernández Rojas 6aa01e1441
Add Aidoo sensors to Airzone Cloud (#93541) 2023-05-29 21:58:53 +02:00
Erik Montnemery 8b662dc94f
Detect attempt to setup config entry integration via YAML (#93589) 2023-05-29 21:01:47 +02:00
J. Nick Koston 2f1f32f0bb
Make unit converter use a factory to avoid looking up the ratios each conversion (#93706) 2023-05-29 20:50:40 +02:00
Yuxin Wang a547181984
Fix unit inference for ITEMP field for APCUPSD integration (#93724) 2023-05-29 20:40:36 +02:00
G Johansson 171ce747c1
Remove nextcloud YAML configuration (#93550) 2023-05-29 20:33:29 +02:00
Joakim Plate 067fc079a3
Don't mock non async with AsyncMock (#93749) 2023-05-29 20:20:27 +02:00
Joakim Plate 617ff24b9b
Fix missed case for device tuple fallback in rfxtrx (#93575)
* rfxtrx: add missed case for device tuple fallback

Previously the code was prepared for a backward compatible
migration of tuples, where both styles of identifiers might exist
in device registry at the same time.

This place was sadly missed

* No need to raise special, we can assert instead

* Add some basic tests
2023-05-29 19:59:11 +02:00
Luke 3b4273d018
Add Roborock Clean time sensors (#93637)
* add clean time information

* add sensor test

* update to cleaning time

* fix sensor test
2023-05-29 09:40:35 -07:00
J. Nick Koston db931132a8
Fix thread leak in onvif discovery (#93742) 2023-05-29 17:06:13 +02:00
Jan Bouwhuis c44a7fe358
Do not trigger reload when unloading or reloading MQTT entry (#93588)
* Do not trigger reload when unloading MQTT entry

* More cleanup

* cleanup async_reload_manual_mqtt_items

* Add test

* Improve test

* Remove unuse mocks from test

* Add discovery item in test
2023-05-29 15:44:09 +02:00
G Johansson 46e7486ce6
Move yaml configuration to integration key for command_line (#92824)
* Inital init commit

* bs and cover

* notify

* sensor

* switch

* Issues

* Finalize __init__

* First pass tests

* Fix Binary sensors

* Test cover

* Test notify

* Test sensor

* Tests switch

* Fix coverage

* Add codeowner

* Fix caplog

* test issue

* Flaky test notify

* Fix async

* Adjust yaml structure

* Change yaml format again

* Issue strings

* Fix tests

* string review comment
2023-05-29 08:00:50 +02:00
Joost Lekkerkerker 20d1a0fc77
Add Options flow to YouTube (#93667)
* Add Options flow to YouTube

* Add strings for options flow

* Add strings for options flow

* Add strings for options flow
2023-05-28 21:44:45 -04:00
Marvin Wichmann 795ef075da
Restore original websocket commands for config entries (#93707)
Restore original websocket commands and add "config_entries/get_single"
2023-05-28 21:40:35 -04:00
G Johansson c6feb30c31
Raise issue "does not support platform setup" (#93585)
* Raise issue on platform missing

* Modify issue

* Remove deprecation

* Fix strings

* Strings

* Last strings

* strings to common
2023-05-28 21:53:32 +02:00
J. Nick Koston 083cf7a38b
Fix refactoring error with updating polling entities in sequence (#93693)
* Fix refactoring error with updating in sequence

see #93649

* coverage

* make sure entities are being updated in parallel

* make sure entities are being updated in sequence
2023-05-28 16:20:48 +02:00
Erik Montnemery 49c3a8886f
Make cv.empty_config_schema log an error instead of raise (#93646)
* Make cv.empty_config_schema log an error instead of raise

* Add test

* Update homeassistant/helpers/config_validation.py

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
2023-05-28 15:54:22 +02:00
Jan Bouwhuis 4c0d169cfc
Fix imap parsing non rfc compliant date crash (#93630)
* Fix imap parsing non rfc compliant date crash

* Use parsedate_to_datetime from mail.utils
2023-05-28 13:28:11 +02:00
Joost Lekkerkerker 202c9071a4
Improve Youtube integration (#93683)
* Fix feedback

* Fix feedback
2023-05-28 10:52:30 +02:00
Erik Montnemery 02b76be0ba
Use config entry setup in cast tests (#93595)
* Use config entry setup in cast tests

* Remove import step from config flow

* Remove import tests

* Fix tests
2023-05-27 21:07:54 -04:00
J. Nick Koston 5f5951e71c
Add hardware model to onvif config flow discovery (#93676) 2023-05-27 19:47:13 -05:00
Joost Lekkerkerker f3037d0b84
Add reauth flow to Youtube (#93670) 2023-05-27 20:29:18 -04:00
J. Nick Koston 0a9c4f15c4
Add event helper to dispatch device registry updates by device_id (#93602)
* Add event helper to dispatch device registry updates by device_id

* Update homeassistant/helpers/event.py

* dry

* dry

* reduce

* reduce

* reorder

* reduce

* cleanup stack depth

* dry

* fix double lookup

* remove unused

* collapse
2023-05-27 20:04:09 -04:00
J. Nick Koston b966ff7a3d
Await in sequence when we know we will be blocked by the entity platform semaphore (#93649)
* Defer creating tasks we know are going to wait on the entity platform semaphore

When looking at whats going on with aiomonitor-ng, I noticed
we end up creating a lot of tasks that block waiting for the
executor because of the entity platform parallel_updates semaphore.

When we know the tasks are going to block we now await them
in sequence to avoid feeding the loop a herd of tasks that
will block on the semaphore

* change during iteration fix

* change during iteration fix

* cleanup

* cleanup

* fix vizio test
2023-05-27 19:58:02 -04:00
J. Nick Koston 560e744f1e
Reduce overhead to filter entities in the recorder (#93656)
* Reduce overhead to filter entities in the recorder

* fix type
2023-05-27 19:52:42 -04:00
J. Nick Koston 3a1389c3b4
Switch some frequently called call_laters to call_at (#93659)
* Switch some frequently called call_laters to call_at

call_at is a bit faster than call_later since call_later
is a wrapper around call_at.

We call at lot of these at startup so it helps a bit when
we are resource constrained

* update test

* update test
2023-05-27 19:45:35 -04:00
Álvaro Fernández Rojas 94ad9643b5
Update aioairzone to v0.6.1 (#93629) 2023-05-27 18:25:49 -05:00
Joost Lekkerkerker e4c51d43f0
Add YouTube integration (#92988)
* Add YouTube stub

* Add YouTube stub

* Add YouTube stub

* Add YouTube stub

* Add Youtube stub

* Add Youtube stub

* Add tests

* Add tests

* Add tests

* Clean up

* Add test for options flow

* Fix feedback

* Fix feedback

* Remove obsolete request

* Catch exceptions

* Parallelize latest video calls

* Apply suggestions from code review

Co-authored-by: Robert Hillis <tkdrob4390@yahoo.com>

* Add youtube to google brands

* Fix feedback

* Fix feedback

* Fix test

* Fix test

* Add unit test for http error

* Update homeassistant/components/youtube/coordinator.py

Co-authored-by: Robert Hillis <tkdrob4390@yahoo.com>

* Fix black

* Fix feedback

* Fix feedback

* Fix tests

---------

Co-authored-by: Robert Hillis <tkdrob4390@yahoo.com>
2023-05-27 11:21:12 -07:00
Aaron Godfrey bb170a2bbf
Fix todoist end time for tasks with due date in the future (#91874)
Fix end time for tasks with due date in the future.

Co-authored-by: Allen Porter <allen@thebends.org>
2023-05-27 10:09:11 -07:00
Erik Montnemery 5671934b34
Fix sharkiq tests (#93597) 2023-05-26 15:35:06 +02:00
Erik Montnemery 5b654c8b79
Fix mill tests (#93596) 2023-05-26 15:20:46 +02:00
G Johansson af9ee8bc4a
Remove obihai YAMl configuration (#93549) 2023-05-26 08:41:21 +02:00
G Johansson 1f467fcc6a
Remove EDL21 YAML configuration (#93551) 2023-05-26 08:38:44 +02:00
G Johansson 3633062024
Remove platform yaml Frontier Silicon (#93552) 2023-05-26 08:24:08 +02:00
Jan Bouwhuis d852ba8b09
Remove redundant stub_blueprint_populate fixture for MQTT integration (#93570)
Remove redundant stub_blueprint_populate fixture
2023-05-26 08:13:45 +02:00
Jan Bouwhuis ec98e22330
Add type hints for stub_blueprint_populate fixture (#93568)
Add typehints for stub_blueprint_populate fixture
2023-05-26 08:13:13 +02:00
Franck Nijhof 9e53bca452
Add entity name translations to Rituals Perfume Genie (#92549) 2023-05-26 08:09:29 +02:00
J. Nick Koston 88893121a1
Increase timeout for test_purge_many_old_events (#93579) 2023-05-25 22:38:44 -05:00
J. Nick Koston 48485fc2bf
Complete persistent notifications migration (#92828)
* Complete migration of persistent notifications

Persistent notifications are no longer stored in
the state machine and no longer fire events

* Complete migration of persistent notifications

Persistent notifications are no longer stored in
the state machine and no longer fire events

* fixes

* fixes

* fixes

* ws test

* update tests

* update tests

* fix more tests

* fix more tests

* more fixes

* fix

* fix person

* fix person

* keep whitelist

* use singleton
2023-05-25 23:09:13 -04:00
J. Nick Koston f251c464e2
Fix history start time state returning None with some postgresql versions (#93555)
* Add additional coverage to history websocket api

related issue #93258

* Add additional coverage to history websocket api

related issue #93258

* Fix results when union query ends up at the end instead of front

* Apply suggestions from code review

* resort

* zero instead

* fix exception

* fix tests
2023-05-25 22:18:19 -04:00
J. Nick Koston 61e57872c3
Fix not retrying on connection reset during nexia config entry setup (#93576)
* Fix not retrying on connection reset during nexia config entry setup

fixes
```
2023-05-26 00:15:39.129 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Alexander for nexia
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 558, in _request
    resp = await req.send(conn)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 670, in send
    await writer.write_headers(status_line, self.headers)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/http_writer.py", line 130, in write_headers
    self._write(buf)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/http_writer.py", line 75, in _write
    raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/nexia/__init__.py", line 47, in async_setup_entry
    await nexia_home.login()
  File "/usr/local/lib/python3.11/site-packages/nexia/home.py", line 385, in login
    request = await self.post_url(self.API_MOBILE_ACCOUNTS_SIGN_IN_URL, payload)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/nexia/home.py", line 157, in post_url
    response: aiohttp.ClientResponse = await self.session.post(
                                       ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 572, in _request
    raise ClientOSError(*exc.args) from exc
aiohttp.client_exceptions.ClientOSError: Cannot write to closing transport
```

* coverage
2023-05-25 21:52:44 -04:00
Justin Vanderhooft accee4b5ef
Add support for configuring built-in Melnor Bluetooth scheduling system (#93333) 2023-05-25 20:06:22 -05:00
Maciej Bieniek eb058a3d41
Add illuminance sensor for Shelly gen2 devices (#93559) 2023-05-25 23:10:44 +02:00
Erik Montnemery a71c097aeb
Revert "Allow setting an entity's name by its device class" (#93539) 2023-05-25 17:20:54 +02:00
Álvaro Fernández Rojas f7404e2ee0
Update aioairzone-cloud to v0.1.6 (#93513) 2023-05-25 17:18:28 +02:00
Philip Peitsch 6c66af4e41
Add ability to send custom keys to Samsung TV (#83439)
* Add SamsungTV Remote entity with support for turn-off and send command

* Fix SamsungTV remote tests
2023-05-25 15:55:44 +02:00
Joost Lekkerkerker a96215bf2e
Lastfm config flow (#92299)
* Move constant values to separate file

* Move constant values to separate file

* Add config flow to lastfm

* Add tests

* Add config flow to lastfm

* Add tests

* Add tests

* Add tests

* Add extra form for main user and autofill with friends

* Add extra form for main user and autofill with friends

* Add extra form for main user and autofill with friends

* Add extra form for main user and autofill with friends

* Add OptionsFlow

* Add tests

* Fix feedback

* Fix feedback

* Fix feedback

* Fix feedback

* Fix test

* Apply suggestions from code review

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

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Update homeassistant/components/lastfm/config_flow.py

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

* Add tests

* Cleanup

* Update config_flow.py

* Update config_flow.py

* Update config_flow.py

* Fix test

* Fix feedback

* Codeowner lastfm

* Fix feedback

* Fix feedback

* Parametrize errors

* Parametrize errors

* Parametrize errors

* Finish tests

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-05-25 14:48:16 +02:00
Erik Montnemery 3cca338c6e
Improve blueprint test fixtures (#93519) 2023-05-25 13:45:19 +02:00
badewanne1234 393dbb6dc0
Fix of cover-tilt in homekit_controller (#91631)
* Fix of cover-tilt in homekit_controller

* Fix of cover-tilt and its tests
2023-05-25 12:41:42 +02:00
Erik Montnemery 3fc0c9a325
Improve TTS test fixtures (#93517) 2023-05-25 11:59:20 +02:00
Dara Adib e2daffc117
Fix exception handling in Microsoft TTS (#92556)
pycsspeechtts uses the requests library, but Microsoft TTS previously
caught HTTPException from the standard library. This is changed to
catch requests.HTTPError and return `(None, None)` consistent with
other TTS integrations. This will properly raise HomeAssistantError
for display in the frontend.

Follow up to PR #92215 which adds tests for Microsoft TTS.
2023-05-25 11:29:13 +02:00
Jan Bouwhuis 1b5d207984
Add imap custom event data template (#93423)
* Add imap custom event template

* Add template validation
2023-05-25 11:05:25 +02:00
Álvaro Fernández Rojas 6cd766ef1f
Add Airzone Cloud diagnostics (#93465)
* airzone_cloud: add diagnostics support

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

* airzone_cloue: remove unused import

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

* airzone_cloud: diagnostics: redact additional API keys

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-25 11:04:57 +02:00
Dara Adib 663f66a2b2
Scrape Microsoft TTS supported languages (#91988)
* Update Microsoft TTS supported languages

`script.microsoft_tts` scrapes Microsoft Azure documentation for
the list of supported languages and saves them to
`homeassistant.generated.microsoft_tts` for use in the component.

This adds support for more TTS languages, like fa-ir (Persian).

* Improve xpath query for Microsoft TTS languages

* Remove asserts for Microsoft TTS languages

* Add more tests for Microsoft TTS languages
2023-05-25 10:46:34 +02:00
J. Nick Koston c63e3c3bf1
Update prometheus tests to avoid patching utcnow (#93505) 2023-05-25 07:15:14 +02:00
Marcel van der Veldt 2bb46c8a9e
Fix for missing/corrupt names of Matter devices (#92073)
* Fix missing names on some devices/bridges

* guard for None devicetype (just in case)

* Update homeassistant/components/matter/adapter.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Update homeassistant/components/matter/adapter.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Update homeassistant/components/matter/adapter.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Update homeassistant/components/matter/adapter.py

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* black and isort

* Code quality

* Add tests

* Add coverage test, add None for empty string

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: jbouwh <jan@jbsoft.nl>
2023-05-25 03:50:13 +02:00
J. Nick Koston 7ec6e03d5d
Update sensor tests to avoid patching utcnow (#93497) 2023-05-24 19:54:08 -05:00
J. Nick Koston 9dcd73b308
Update recorder tests to avoid patching utcnow (#93489) 2023-05-24 17:47:42 -05:00
J. Nick Koston f8d8f5caba
Update statistics tests to avoid patching utcnow (#93499) 2023-05-24 17:38:38 -05:00
J. Nick Koston f5eb872eaf
Update state helper test to avoid patching utcnow (#93484) 2023-05-24 17:38:09 -05:00
J. Nick Koston 40a47c72f4
Update history tests to avoid patching utcnow (#93487) 2023-05-24 16:09:26 -05:00
J. Nick Koston 0160c8c14f
Update switch tests to avoid patching utcnow (#93491) 2023-05-24 15:28:38 -05:00
J. Nick Koston bf2c12dcf2
Update remote tests to avoid patching utcnow (#93492) 2023-05-24 15:28:22 -05:00
J. Nick Koston 33c2cb9895
Fix integration trapezoidal test (#93494) 2023-05-24 15:24:15 -05:00
J. Nick Koston 41aa3e223e
Update light tests to avoid patching utcnow (#93490) 2023-05-24 15:21:40 -05:00
J. Nick Koston 1f5916cb4d
Update statistics tests to avoid patching utcnow (#93485) 2023-05-24 14:53:33 -05:00
Álvaro Fernández Rojas f5a235beee
Fix Airzone min/max climate temperatures (#93161)
* airzone: climate: fix max/min temps

The library now provides AZD_ABS_TEMP_MAX/AZD_ABS_TEMP_MIN which are useful for
devices with different max/min temperatures depending on the current working
mode (HEAT vs COOL).
These new values will have the highest/lowest max/min of both modes.
Until now, the max/min of the current working mode (HEAT/COOL) would be set
when starting Home Assistant, limiting the temperature range if the device
mode was changed after that.

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

* airzone: climate: update max/min temps

Some devices have different max/min climate temps depending on the active
mode (HEAT vs COOL), so we should update these values.

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

* Revert "airzone: climate: update max/min temps"

This reverts commit 988194d486.

* Revert "Revert "airzone: climate: update max/min temps""

This reverts commit e4ead24f71.

* tests: airzone: add max/min climate changes test

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

* tests: airzone: fix dict copy

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-24 21:18:59 +02:00
J. Nick Koston 5c6ed8f6d5
Use call_at for events instead call_later (#93431)
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2023-05-24 21:04:07 +02:00
Erik Montnemery 30d9d7d905
Minor adjustment of tts typing (#93450) 2023-05-24 21:02:55 +02:00
Erik Montnemery 68379dd55a
Improve TTS cache dir mocking (#93468) 2023-05-24 21:00:35 +02:00
J. Nick Koston dc3826f68e
Update generic_hygrostat tests to avoid patching utcnow (#93476) 2023-05-24 20:57:56 +02:00
J. Nick Koston cff72f9653
Update derivative tests to avoid patching utcnow (#93477) 2023-05-24 20:54:50 +02:00
J. Nick Koston 70c1fe8c6c
Update integration tests to avoid patching utcnow (#93480) 2023-05-24 20:54:11 +02:00
Luke 8dd9482bb5
Add Roborock Consumable sensors (#91972)
* add sensors to roborock

* add value_fn typing

* fixed strings

* Update homeassistant/components/roborock/sensor.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* change to work time instead of time left

* added time left back

* fixed tests

* made diagnostic

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-05-24 20:31:02 +02:00
J. Nick Koston e80579e52f
Update generic_thermostat tests to avoid patching utcnow (#93479) 2023-05-24 13:17:28 -05:00
J. Nick Koston da5ad4a17d
Update binary_sensor tests to avoid patching utcnow (#93474) 2023-05-24 13:17:11 -05:00
Raman Gupta 3e84c374f4
Improve zwave.cover tests (#93458)
* Improve zwave.cover tests

* Update conftest.py
2023-05-24 18:51:15 +02:00
Raman Gupta 872cd47e87
Add proper support for zwave_js Indicator CC (#90248)
* Add proper support for zwave_js Indicator CC

* remove stale test

* Make all indicators diagnostic

* only set entity category if it is specified

* Only set properties from discovery if specified

* Conditionally set assumed state as well

* fix const name

* Don't create task

* Disable property keys 3-5 by default

* add additional dispatcher_connects so we catch all signals

* be consistent about order

* rename new discovery parameter

* comment

* exclude property keys 3-5

* fix remove logic

* add comment so I don't forget

* Switch entity category to config where necessary

* cut line

* less lines

* Update homeassistant/components/zwave_js/switch.py

Co-authored-by: kpine <keith.pine@gmail.com>

* Move async_remove to respond to interview started event

* Set up listener immediately so we don't wait for platform creation

* remove dupe import

* black

* append

---------

Co-authored-by: kpine <keith.pine@gmail.com>
2023-05-24 09:09:38 -04:00
Raman Gupta 66f7218b68
Do optimistic state update for Z-Wave multilevel switch entities (#90490)
* Do optimistic state update for Z-Wave multilevel switch entities

* simplify

* define constant for setting value to previous value

* Rework to only consider value of 255 and only places where we know that the previous state is known by the integration due to the service being called

* missed commit

* better code

* Add tests and use constant from lib

* fix logic

* fix bug

* Add comments with more details
2023-05-24 09:04:11 -04:00
Raman Gupta 3e93dd6a01
Update name for Notification CC sensors and buttons (#93019)
* Update name for Notification CC sensors and buttons

* Add comment with reference to names
2023-05-24 09:00:37 -04:00
rappenze 83f206a6fe
Code cleanup: Separate fibaro scene logic (#91895)
* Code cleanup fibaro scene

* Remove duplicated code

* Fixes
2023-05-24 14:57:35 +02:00
Aaron Godfrey 89f1677307
Fix todoist state updates (#91915)
* Update event when coordinator updates data.

* Move function to make diff easier to view

* Actually make it easier to view

* Move all tasks calculation to extra_state_attributes.
2023-05-24 14:46:13 +02:00
ad0p ef24e508f8
Bump pydeconz to v112 (#91924)
* Bump pydeconz to v112

* PR review - add suggested_display_precision

* Test - fix

* Bump pydeconz to v112

* PR review - add suggested_display_precision

* Fix tests

---------

Co-authored-by: Robert Svensson <Kane610@users.noreply.github.com>
2023-05-24 14:43:02 +02:00
Mike Heath 2a7ba60574
Fully Kiosk: Truncate long URLs (#92347)
* Truncate long URLs

URL's longer than 256 characters will result in a
`homeassistant.exceptions.InvalidStateError`. This fixes that problem
and adds 2 extra_state_attributes: `full_url`, and `truncated`.

Fixes #89249

* Refactor to use function ref in entity description
2023-05-24 12:32:26 +02:00
Erik Montnemery 937ebb374c
Enable strict type checks of cloud (#92576)
* Enable strict type checks of cloud

* Fix circular import

* Address review comments

* Apply suggestions from code review
2023-05-24 11:46:11 +02:00
Mike Degatano 08a719e09e
Add backup location and mount failed repair (#93126)
* Add backup location and mount failed repair

* Fix coverage

* Change storage_location to backup_location

* Use backticks

* Update homeassistant/helpers/selector.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-24 10:33:41 +02:00
Jafar Atili 7bc9e1ae9f
Bump PySwitchbee to 1.8.0 (#92348)
* fix

* fixes

* bump pyswitchbee

* bump pyswitchbee

* bump pyswitchbee

* fix

* bump pyswitchbee

* Apply suggestions from code review

---------

Co-authored-by: Jafar Atili <jafar.atili@axonius.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-24 09:44:36 +02:00
epenet 7c72b97d79
Use SnapshotAssertion in Renault tests (part 2) (#92395) 2023-05-24 09:39:37 +02:00
epenet dc14b83249
Add ability to unload demo integration (#92515)
* Add unload to demo integration

* Adjust config tests to use kitchen_sink

* Use async_unload_platforms
2023-05-24 09:38:29 +02:00
Chris Talkington 5bdc830664
Bump rokuecp to 0.18.0 (#93424) 2023-05-24 08:27:20 +02:00
Dara Adib 3bd6dea63b
Add tests for Microsoft TTS (#92215)
* Add tests for Microsoft TTS

* Update requirements_test_all

* Update tests/components/microsoft/__init__.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-24 08:25:03 +02:00
Álvaro Fernández Rojas a29adc0a6a
Airzone select improvements (#92894)
* airzone: select: remove unneed .keys()

Fixes late comment when select platform was introduced.

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

* airzone: select: make options translatable

This was a late comment when the select platform was introduced.

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

* airzone: select: change options to lists (from enums)

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

* tests: airzone: fix python 3.10 tests

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

* airzone: select: add manual dict values

This was requested in order to keep control of the translation strings.

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

* Revert "airzone: select: add manual dict values"

This reverts commit b818a2674d.

* Revert "tests: airzone: fix python 3.10 tests"

This reverts commit 93f8bd1430.

* Revert "airzone: select: change options to lists (from enums)"

This reverts commit e503a1dd3a.

* airzone: select: options: copy dict to list

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

* airzone: select: use degree symbol

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-24 08:21:24 +02:00
Marcel van der Veldt 56d2048ffa
Bump Matter server library to 3.4.1 and address changes (#93411)
* bump python matter server to 3.4.1

* address renamed attribute names in sdk 1.1

* ignore AllClustersAppServerExample

* clusters.ColorControl.Bitmaps.ColorCapabilities

* address discovery schemas

* fix all fixtures due to attribute rename

* bump python matter server to 3.4.1

* address renamed attribute names in sdk 1.1

* ignore AllClustersAppServerExample

* clusters.ColorControl.Bitmaps.ColorCapabilities

* address discovery schemas

* fix all fixtures due to attribute rename

* lint

* update requirements_all
2023-05-23 20:42:09 +02:00
Patrick Li 46103f56c4
Fix trusted_users group schema (#92847)
* Fix trusted_users group schema

* Add tests for CONFIG_SCHEMA
2023-05-23 20:11:25 +02:00
andarotajo fa366e59e0
Improve dwd_weather_warnings code quality (#92738)
Improve code quality by removing unnecessary data
2023-05-23 19:34:47 +02:00
Álvaro Fernández Rojas 8edb253ace
Add Airzone Cloud integration (#93238)
* airzone-cloud: add new integration

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

* Add missing aioairzone-cloud to test requirements

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

* Update aioairzone-cloud to v0.0.4

Allows to handle TooManyRequests exception on coordinator.

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

* aioairzone_cloud: reduce API requests

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

* airzone_cloud: remove system_zone_id

As opposed to the Local API of Airzone devices, the Cloud API provides unique
IDs for both systems and zones, so we can remove the system_zone_id copied from
the Local API integration.

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

* airzone_cloud: minor improvements

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

* tests: airzone_cloud: simplify mock_get_webserver

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

* Update aioairzone to v0.0.5

- Add token refresh and relogin support.
- Improve fetching installation devices.

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

* airzone_cloud: add to strict typing

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

* Update aioairzone to v0.0.7

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

* trigger CI

* airzone_cloud: remove unneeded api_get_user call

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

* Add Airzone brand

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

* Update aioairzone to v0.1.1

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

* airzone_cloud: use unique_id instead of entry_id

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

* airzone_cloud: remove special handling of TooManyRequests

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

* airzone_cloud: bump coordinator timeout to 30s

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

* airzone_cloud: make AirzoneEntity an ABC

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

* airzone_cloud: fix strings typo

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

* tests: airzone_cloud: simplify webserver mock

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

* Update aioairzone-cloud to v0.1.2

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-23 19:22:50 +02:00
Álvaro Fernández Rojas 942089d590
Add QNAP QSW firmware update support (#92869)
* qnap_qsw: add firmware update support

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

* tests: qnap_qsw: remove backup leftovers

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

* tests: qnap_qsw: remove backup leftovers v2

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-23 19:10:33 +02:00
chiefdragon 9672db0354
Add new preset to Tado to enable geofencing mode (#92877)
* Add new preset to Tado to enable geofencing mode
Add new 'auto' preset mode to enable Tado to be set to auto geofencing
mode.  The existing ‘home’ and ‘away’ presets switched Tado into manual
geofencing mode and there was no way to restore it to auto mode.
Note 1: Since preset modes (home, away and auto) apply to the Tado home
holistically, irrespective of the Tado climate entity used to select
the preset, three new sensors have been added to display the state of
the Tado home
Note 2: Auto mode is only supported if the Auto Assist skill is enabled
in the owner's Tado home. Various checks have been added to ensure the
Tado supports auto geofencing and if it is not supported, the preset is
not listed in the preset modes available

* Update codeowners in manifest.json

* Update main codeowners file for Tado component
2023-05-23 19:08:00 +02:00
Tom Harris e2fb1de0d9
Clean up Insteon config_flow (#93004)
* Clean up config_flow

* Remove unnecessary logging

* Remove logger

* Add more tests

* Test closing modem connection

* Simplify patching
2023-05-23 17:31:17 +02:00
Erik Montnemery d62cdf3d65
Improve error message for sensors with a non-numeric value (#93399)
* Improve error message for sensors with a non-numeric value

* Address review comment
2023-05-23 15:54:24 +02:00
rikroe f8f83906f8
Add climate on/off for supported BMW vehicles (#92962)
* Add switch platform

* Add tests

* Remove separate button

* Bump coverage

---------

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-05-23 15:21:29 +02:00
erikbadman 2721874f13
Get kostal plenticore hostname id from get_settings (#93008)
* Get hostname id from get_settings

* Add try except in get_hostname_id function

* Update tests after adding get_hostname_id function

* Revert "Update tests after adding get_hostname_id function"

This reverts commit 5fa4e533cb.

* Add test for G2 models in config flow.

* Add test for helper module.

* Fix test for numbers.

* Revert "Add try except in get_hostname_id function"

This reverts commit 059f5bd9b4.

* Update variable name with known hostname ids to be private

---------

Co-authored-by: Stefan Gmeiner <stefangm42@gmail.com>
2023-05-23 11:42:54 +02:00
epenet 1dccb8a9a9
Cleanup deprecated YAML from samsungtv (#93392) 2023-05-23 11:33:51 +02:00
Álvaro Fernández Rojas 7e1a946705
Support Airzone temperature ranges (HEAT_COOL) (#93110)
* airzone: climate: add Temperature range support

This is useful for HEAT_COOL climate mode (Airzone AUTO).

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

* trigger CI

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-05-23 11:23:32 +02:00
Diogo Gomes e100bcfaea
Better handling of source sensor unavailability in Riemman Integration (#93137)
* refactor and increase coverage

* fix log order
2023-05-23 11:19:29 +02:00
Erik Montnemery b754f03eb1
Add WS command for getting a config entry (#93387)
* Add WS command for getting a config entry

* Update tests
2023-05-23 10:44:02 +02:00
Maciej Bieniek 71466e5012
Add new sensors to AccuWeather (#93362)
* Add solar irradiance and condition sensors

* Use entity_registry_enabled_by_default fixture
2023-05-22 21:55:54 +02:00
Guido Schmitz 91da7516d0
Use snapshots in devolo_home_control tests (#93202) 2023-05-22 18:16:57 +02:00
Matthias Alphart b10e73e2d4
Configurable KNX Telegram history size (#93248)
* Configurable KNX Telegram history size

* Add maximum value to description
2023-05-22 18:09:59 +02:00
Raman Gupta 3bf9eaffdf
Bugfix and add test coverage for zwave_js.light (#93257)
Add test coverage for zwave_js.light
2023-05-22 12:08:29 -04:00
Raman Gupta 18eeeaaf68
Refactor zwave_js.fan and add tests (#93256)
* Refactor zwave_js.fan and add tests

* fix const
2023-05-22 12:08:13 -04:00
Raman Gupta e1dd7118e0
Refactor zwave_js.sensor and add test coverage (#93259)
* Refactor zwave_js.sensor and add test coverage

* use walrus

* inherit config parameter class from list class

* use walrus in more places

* improve config parameter test
2023-05-22 11:58:10 -04:00
Raman Gupta d6997d8656
Improve test coverage for zwave_js.trigger (#93260)
Improve coverage for zwave_js.trigger
2023-05-22 17:55:03 +02:00
Jan Bouwhuis a81fe517c1
Make mqtt device_tracker state_topic optional when json_attribute_topic is used (#93322)
* Make device_tracker state_topic optional

* No state_topic needed
2023-05-22 15:49:18 +02:00
Franck Nijhof 7537667e53
Adjust counter to not restore configuration parameters (#93344) 2023-05-22 15:27:44 +02:00
Franck Nijhof f2899a19c1
Deprecate counter.configure service (#93343) 2023-05-22 15:27:33 +02:00
Raman Gupta ec12d9a197
Improve test coverage for zwave_js (#93262) 2023-05-22 12:20:01 +02:00
Jan Bouwhuis 5bc825a8ab
Add advanced imap option to set custom event max message size (#93163) 2023-05-22 12:14:06 +02:00
Aaron Bach d16452bed7
Bump `aionotion` to 2023.05.5 (#93334) 2023-05-22 10:14:52 +02:00
Steven Looman 63c2b5868e
Bump async-upnp-client to 0.33.2 (#93329)
* Bump async-upnp-client to 0.33.2

* Fix tests
2023-05-21 17:17:08 -05:00
Joost Lekkerkerker c12fae4775
Bump TwitchAPI to 3.10.0 (#92418)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-05-21 21:13:59 +02:00
J. Nick Koston e27554f7a6
Improve http handler performance (#93324) 2023-05-21 13:36:03 -05:00
J. Nick Koston ab0d35df92
Add zeroconf support to roomba (#93309) 2023-05-21 16:12:19 +02:00
Ernst Klamer 40c74ad5b7
Add support for sleepy BTHome devices (#92991)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-05-21 09:01:09 -05:00
Maciej Bieniek d47e58fb38
Bump `accuweather` to version 1.0.0 (#93305) 2023-05-21 14:50:10 +02:00
G Johansson ddb9a6e33c
Add change service to timer (#84775)
* Add change service

* test subtract

* Test no change if timer not running

* Modify example

* Raise

* Finalize

* test event

* Fix tests

* Fix tracking time
2023-05-21 10:11:08 +02:00
J. Nick Koston 2a2b19ed7c
Add support for Yale Home brand to august (#93214) 2023-05-20 09:42:19 -05:00
Jafar Atili 1935e126bf
Add new integration to control Electra Smart HVAC devices (#70361)
* Added new integration to support Electra Smart (HVAC)

* fixes + option to set scan interval

* renamed the module to electrasmart and added unittests

* added non tested files to .coveragerc

* changed the usage from UpdateCoordinator to each entity updates it self

* small fixes

* increased pypi package version, increased polling timeout to 60 seconds, improved error handling

* PARALLEL_UPDATE=1 to prevent multi access to the API

* code improvements

* aligned with the new HA APIs

* fixes

* fixes

* more

* fixes

* more

* more

* handled re-atuh flow

* fixed test

* removed hvac action

* added shabat mode

* tests: 100% coverage

* ran hassfest

* Update homeassistant/components/electrasmart/manifest.json

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* Update homeassistant/components/electrasmart/manifest.json

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* Update homeassistant/components/electrasmart/manifest.json

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* Update homeassistant/components/electrasmart/climate.py

Co-authored-by: Shay Levy <levyshay1@gmail.com>

* address Shay's comments

* address Shay's comments

* address more comments

---------

Co-authored-by: Shay Levy <levyshay1@gmail.com>
2023-05-20 13:13:32 +03:00
Luke 0ce1117287
Bump Roborock to 17.0 adding device specific support and bugfixes (#92547)
* init commit

* use official version release

* remove options

* moved first refresh to gather

* add extra tests

* remove model_sepcification

* remove old mqtt test

* bump to 13.4

* fix dndtimer

* bump to 14.1

* add status back

* bump to 17.0

* remove error as it is not used

* addressing mr comments

* making enum access use get()

* add check for empty hass data
2023-05-18 20:55:39 -07:00
J. Nick Koston aebded049b
Mark oralb devices as sleepy (#93250) 2023-05-18 16:32:24 -05:00
Guido Schmitz 3abcffe3a0
Raise on reauth in devolo Home Network switch platform (#92850) 2023-05-18 11:28:17 -05:00
J. Nick Koston 763b898621
Add always connected option to Yale Access Bluetooth (#93224)
* Add always connected option to Yale Access Bluetooth

If the lock does not support push updates via advertisements or you want lock operation to be more responsive, you can enable always connected mode. Always connected will cause the lock to stay connected to Home Assistant via Bluetooth, which will use more battery.

* Update homeassistant/components/yalexs_ble/config_flow.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-05-18 10:48:04 -05:00
J. Nick Koston 2eef2ed911
Add option to disable webhooks in ONVIF (#93186) 2023-05-18 10:34:09 -05:00
Ville Skyttä 0c51de25a2
Update UpCloud config entry data on successful reconfig (#68718)
* Update UpCloud config entry data on successful reconfig

* Add already configured test

* Improve success case request mocking

So that the data fetch that might happen in the background after success
won't trash the test log with misleading errors.

* Simplify already configured test

Thanks-to: Martin Hjelmare <marhje52@gmail.com>
2023-05-18 16:04:27 +03:00
Joakim Plate ae7930c0ad
Use entity translation in dsmr (#93017)
* Use entity translation in dsmr

* Combine a few strings
2023-05-17 22:31:04 +02:00
MatthewFlamm d0460d5424
Fix NWS error with no observation (#92997)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-05-17 22:00:13 +02:00
Matthias Alphart c522ea855d
KNX Group Monitor: Load latest 50 Telegrams on start (#93153)
* remove impossible test

IndividualAddress telegrams are not processed by xknx.telegram_queue

* Use Telegrams helper class for group monitor messages

* Store 50 telegrams in deque for group monitor

* Send recent telegrams at once on connection of group monitor

* Update KNX-frontend to support group monitor prepopulation
2023-05-17 09:58:00 +02:00
J. Nick Koston b993fe1c9d
Cache generation of the service descriptions (#93131) 2023-05-16 21:42:37 -05:00
tronikos 6c56ceead0
Create Google Generative AI Conversation integration (#93156)
* Copy openai_conversation to google_generative_ai_conversation
This is to improve diff of the next commit with the actual implementation.

Commands used:
cp -r homeassistant/components/openai_conversation/ homeassistant/components/google_generative_ai_conversation/
cp -r tests/components/openai_conversation/ tests/components/google_generative_ai_conversation/

find homeassistant/components/google_generative_ai_conversation/ tests/components/google_generative_ai_conversation/ -type f | xargs sed -i \
-e 's@openai_conversation@google_generative_ai_conversation@g' \
-e 's@OpenAI Conversation@Google Generative AI Conversation@g' \
-e 's@balloob@tronikos@g'

* Add google_generative_ai_conversation to Google brand

* Google Generative AI Conversation

* Sync recent openai changes

* handle empty responses
2023-05-16 21:05:56 -04:00
rikroe defc23cc7c
Fix china login for bmw_connected_drive (#93180)
* Bump bimmer_connected to 0.13.5

* Fix snapshots after dependency bump

* Load gcid from config entry if available

* Add tests

---------

Co-authored-by: rikroe <rikroe@users.noreply.github.com>
2023-05-17 02:03:01 +02:00
J. Nick Koston bf16f6b104
Remove as_compressed_state cache (#93169)
* Remove as_compressed_state cache

All calls to as_compressed_state are now covered by a higher level
JSON cache so there is no need to store these in memory anymore

* Remove as_compressed_state cache

All calls to as_compressed_state are now covered by a higher level
JSON cache so there is no need to store these in memory anymore
2023-05-16 12:39:16 -05:00
Álvaro Fernández Rojas e5c12122e2
Update aioairzone to v0.5.6 (#93146) 2023-05-16 12:51:22 +02:00
J. Nick Koston 99265a983a
Speed up reconnects by caching state serialize (#93050) 2023-05-16 02:33:12 -05:00
J. Nick Koston 9c039a17ea
Bump guppy3 to 3.1.3 (#93124) 2023-05-16 08:26:17 +02:00
Matthias Alphart 2f8e8901fc
Add KNX interface device trigger for telegrams (#93102)
* telegram device trigger initial

* add Telegrams helper class

to parse and convert Telegram only once instead of once per device trigger

* translation

* label for extra_field

* test device trigger

* test trigger callback removal

* rename extra_field key to same name as used in trigger

* typo
2023-05-15 22:59:29 +02:00
epenet b38a7aabe9
Fix lingering timer in withings (#93085) 2023-05-15 21:20:20 +02:00
Jan Bouwhuis c97e0f11a5
Fix last imap message is not reset on empty search (#93119) 2023-05-15 21:15:10 +02:00
epenet 48ab74eedf
Add missing mock in wiffi tests (#93083) 2023-05-15 11:15:19 +02:00
J. Nick Koston b95405a7e9
Small performance improvements to state diff messages (#92963)
Adds missing test coverage
2023-05-14 12:28:34 -04:00
J. Nick Koston 2848f8648d
Log last message when websocket reaches peak limit (#93038)
When we hit the absolute limit, we would log the last messages as
it was key to finding out the source. We now do the same when
we hit the peak limit
2023-05-14 12:22:19 -04:00
Aaron Bach 637941df4d
Fix a series of bugs due to Notion API changes (#93039)
* Fix a series of bugs due to Notion API changes

* Simplify

* Reduce blast radius

* Reduce blast radius

* Fix tests
2023-05-14 12:07:15 -04:00
J. Nick Koston 8711735ec0
Improve websocket throughput and reduce latency (#92967) 2023-05-13 00:13:57 +09:00
Erik Montnemery 9a70f47049
Teach UnitlessRatioConverter about ppm and ppb (#92989) 2023-05-12 16:46:37 +02:00
Álvaro Fernández Rojas 45e7283584
Add Airzone fan speed support (#92840) 2023-05-12 22:56:17 +09:00
Jan Bouwhuis a05c20a498
Filter replaying unrelated retained MQTT messages when subscribing to share topics (#88826)
* Do not replay already processed retained subscr.

* Add tests

* Always replay wildcards

* Update tests for debouncer

* Rework for retained topics

* Fix test

* Correct comment

* Add cleanup and test

* Fix key error

* Correct helper

* Rename mock

* Add comment on function _retained_init

* Always replay initial retained payload

* Apply suggestion moving msg.retain to outer check

* Improve test on edge case

* Improve comment formatting

* Follow up comment - improve comments on test

* Update homeassistant/components/mqtt/client.py

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

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-12 15:23:05 +02:00
Piotr Tobolski 02b5d643e7
Add unique_id support to history_stats sensor (#92972) 2023-05-12 15:03:06 +02:00
J. Nick Koston 24284fe379
Speed up validating domains in templates (#92975)
This path gets called quite a bit since most templates
access the state via states.DOMAIN...
2023-05-12 14:57:51 +02:00
Erik Montnemery 5a7c3aaa2d
Add sensor device class volatile_organic_compounds_parts (#92973) 2023-05-12 14:37:54 +02:00
Álvaro Fernández Rojas e9705364a8
Fix Airzone Auto operation mode (#92796) 2023-05-12 16:07:29 +09:00
J. Nick Koston 52c773a776
Always request at least one zone for multi-zone LIFX devices (#92683) 2023-05-11 12:02:32 +02:00
Erik Montnemery c1f716487c
Include data for entire periods in response to recorder/statistics_during_period (#92848)
* Include data for entire periods in response to recorder/statistics_during_period

* Break out function for calculating the end of the month
2023-05-11 11:28:33 +02:00
Franck Nijhof 67d5ca4894
Mark entities from the sun as diagnostic (#92909) 2023-05-11 18:27:19 +09:00
Bram Kragten 75f8ea48f4
Add tts get engine ws command (#92336)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-11 10:51:00 +02:00
Erik Montnemery 4568207f9b
Support calculating changes between consecutive sum statistics (#92823)
* Support calculating changes between consecutive sum statistics

* Add support for unit conversion when calculating change

* Don't include sum in WS response unless requested

* Improve tests

* Break out calculating change to its own function

* Improve test coverage
2023-05-11 10:05:58 +02:00
J. Nick Koston 8b57d31eba
Add ONVIF services to diagnostics (#92878) 2023-05-11 17:03:31 +09:00
Ziv dd7db85529
User config flow and custom panel for Dynalite integration (#77181) 2023-05-11 00:17:23 +02:00
Matthias Alphart 6250b0a230
Add a custom panel for KNX with a group monitor (#92355)
* Add KNX panel

* provide project data for the panel group monitor

* upload and delete project from panel

* test project store

* more tests

* finish tests

* use integers for DPTBinary payload monitor display

* add project to diagnostics

* require new frontend version

* update knx_frontend

* review suggestions

* update xknxproject to 3.1.0

---------

Co-authored-by: Marvin Wichmann <me@marvin-wichmann.de>
2023-05-11 00:13:22 +02:00
Flo 0f2caf864a
Alexa Intent: Use the 'id' field and expose nearest resolutions as variables (#86709)
* Use the 'id' field and nearest resolutions
Expose nearest Resolution (ID and Value) as Variables

* Add more specific type hints

* Change type definition of request

* Add deprecation warning and remove variables

* Remove deprecation warning & update tests

* Fix wrong value assignment

* revert future changes
2023-05-10 21:25:08 +02:00
Franck Nijhof 97cac66195
Add counter.set_value service (#92863) 2023-05-10 18:52:10 +02:00
Malte Franken 649557ed2e
Add config flow to geo_json_events (#87062)
* migrated geo_json_events integration to config flow

* improve test coverage

* code reformatting

* fix tests

* fix entity manager

* changes after review

* improve test coverage and fixed form

* remove unused code

* remove commented out code

* changes after review

* make title prettier

* fixed tests

* simplified code

* changes after review

* fix test

* push deprecation out

* changes after review

* changes after review

* changes after review

* changes after review

* changes after review

* removed scan interval from user flow and import flow
2023-05-10 10:28:45 +02:00
Michael Hansen 5d6ccd6a32
Allow "no" to match "nb" in language util (#92862)
* Allow "no" to match "nb"

* Adjust comparison for speed
2023-05-09 13:46:57 -05:00
Erik Montnemery 7d29d584fd
Fix race in Alexa async_enable_proactive_mode (#92785) 2023-05-09 19:58:00 +02:00
Erik Montnemery 67c1051305
Allow setting an entity's name by its device class (#90767)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-05-09 18:55:55 +02:00
epenet 5f7496f97b
Fix lingering timer in hue light tests (#92858) 2023-05-09 17:07:23 +02:00
Jan Bouwhuis 25549eed85
Debounce and group mqtt unsubscribes (#92201)
* Debounce MQTT unsubscribes and merge to one call

* Make _async_unsubscribe a callback

* Make sure unsubscribes are processed

* Move debug log out of lock

* Reduce calls and raise outside lock

* Cancel any unsubscribe when queing

* Copy pending unsubscribes

* Only convert topics to list once

* No copy needed

* Typo in comment
2023-05-09 16:36:19 +02:00
G Johansson 0bda869553
Lock entity options (#88139) 2023-05-08 22:06:11 +02:00
Jan Bouwhuis 689c6fbef7
Merge pending MQTT subscribes to a single call to the paho client (#92172)
* Merge mqtt subscribes in one call

* Cleanup

* cleanup, log outside of lock

* Remove function wrapper

* Add test that we bundle subscriptions
2023-05-08 15:37:25 +02:00
G Johansson 6ad4e13b38
Manual trigger entity and refactor command_line switch (#91506)
* TriggerEntity to CoordinatorTriggerEntity

* _render_templates

* split manual vs coordinator

* name

* ManualTriggerEntity

* value

* Remove ManualTriggerEntity

* ManualTriggerEntity

* process_manual_data

* Add test

* imports

* Move ManualTriggerEntity

* cmd_line switch

* Review comments

* Fix templating

* Review comments

* Remove unneeded logging
2023-05-08 10:19:37 +02:00
Robert Hillis 54b303dfea
Cleanup after removing D-Link yaml (#92739) 2023-05-07 16:49:34 +02:00