Commit graph

60558 commits

Author SHA1 Message Date
J. Nick Koston
7bceedfc95
Bump sqlalchemy to 2.0.7 () 2023-03-25 07:05:35 -10:00
Franck Nijhof
7cbe705ebb
Update vehicle to 1.0.0 () 2023-03-25 18:00:15 +01:00
Luca Angemi
6d8eaa0bee
Add location field to calendar create_event service supported by Google Calendar and Local Calendar ()
* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update calendar.py

* Update calendar.py

* Update services.yaml

* Update services.yaml

* Update calendar.py

* Update calendar.py

* Update __init__.py

* Update services.yaml

* Update services.yaml

* Update test_calendar.py

* Update test_init.py

* Update test_init.py

* Update test_init.py

* Update test_init.py

* Update __init__.py

* Update const.py

* Address changes to service.yaml

* Address changes to service.yaml

* Update test_calendar.py

* Update test_calendar.py

* Update test_calendar.py

* Update conftest.py

* Update conftest.py

* Update calendar.py

* Update __init__.py
2023-03-25 09:43:49 -07:00
J. Nick Koston
02ef7d445d
Allow passing an optional name to async_track_time_interval ()
* Allow passing an optional name to async_track_time_interval

This is the same idea as passing a name to asyncio.create_task which
makes it easier to track down bugs

* more

* short

* still cannot find it

* add a few more

* test
2023-03-25 10:11:14 -04:00
Matthias Alphart
52a94dd2ac
Check for empty lists in KNX address configuration () 2023-03-24 21:36:23 -11:00
Jeef
970036b328
Refactor Gree switch to use EntityDescription ()
* Post-rebase

* Update homeassistant/components/gree/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/gree/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/gree/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/gree/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/gree/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/gree/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/gree/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* feat: Tests passing!

* Removing custom attributes as no longer needed

* removed extraneous class

* Update homeassistant/components/gree/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/gree/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/gree/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/gree/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/gree/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/gree/switch.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/gree/test_switch.py

Co-authored-by: solazs <soltesz.balazs.91@gmail.com>

* Update tests/components/gree/test_switch.py

Co-authored-by: solazs <soltesz.balazs.91@gmail.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: solazs <soltesz.balazs.91@gmail.com>
2023-03-25 09:15:46 +01:00
epenet
f56bf134d2
Improve browse_media type hints in media player ()
* Improve browse_media type hints in media player

* Adjust components

* Adjust base entity
2023-03-24 21:49:12 -07:00
epenet
5f3868b141
Add missing type hints to tests ()
* Add type hints to tests

* Revert gree as handled in 
2023-03-24 19:34:01 -07:00
Robert Svensson
7f1fff12ef
Bump aiounifi to v45 ()
* Bump aiounifi to v45

* Replace local TypeVar with library TypeVar
2023-03-25 00:27:16 +01:00
J. Nick Koston
e17cefd61c
Clear recorder startup tasks from memory after processing ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-03-24 10:24:02 -10:00
J. Nick Koston
8e07b71644
Use the json load helper in a few more incoming web requests ()
* Use the json load helper in a few more incoming web requests

* drop hassio change as there is no coverage there

* Remove everything except emulated_hue since its has its own site/web
2023-03-24 15:38:08 -04:00
J. Nick Koston
72b09bfee7
Subclass aiohttp requests to use json helper ()
* Subclass aiohttp requests to use json helper

* Subclass aiohttp requests to use json helper

* remove unneeded

* revert for new pr

* override loads is never used so drop it

* override loads is never used so drop it
2023-03-24 15:37:43 -04:00
Felix Rotthowe
0bb0b4bfc5
Add livisi window sensor (WDS) ()
* Added support for livisi window sensor

* Add const strings

* added postpix for device_id

* Remove unnecessary import

* Fix imports

* Fix lint errors, remove redundant device class property

* Format code

* Update .coveragerc

* Finish basic window door sensor support

* currently, only one binary sensor (wds) is supported

* Remove unused imports

* Fix isort issue

* Simplify code as suggested in PR

* rename get_device_response to get_device_state

* fix ruff issue

* Be more defensive in interpreting what we get from aiolivisi

* Simplify coordinator

* remove window sensor specific code (isOpen)

* parameter order, type hinta

* Update homeassistant/components/livisi/coordinator.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/livisi/coordinator.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/livisi/coordinator.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/livisi/binary_sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/livisi/binary_sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/livisi/binary_sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: Tecotix <78791840+Tecotix@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-24 14:52:50 +01:00
J. Nick Koston
4c45c3c63b
Add a faster query for get_last_state_changes when the number of states is 1 ()
* Add a faster query for get_last_state_changes when the number of states is 1

related issue 

* Add a faster query for get_last_state_changes when the number of states is 1

related issue 

* coverage

* Apply suggestions from code review
2023-03-24 09:39:55 -04:00
Chris Xiao
8149652f9f
Move qbittorrent constants to const.py ()
* move qbittorrent constants to const.py

* move SENSOR_TYPE_* consts back to sensors.py
2023-03-24 14:20:37 +01:00
dependabot[bot]
a66bef6fdf
Bump actions/checkout from 3.4.0 to 3.5.0 ()
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.4.0...v3.5.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-24 13:55:17 +01:00
Felix Rotthowe
3157579992
Remove duplicate code in livisi coordinator ()
* Simplify coordinator

* remove window sensor specific code (isOpen)

* parameter order, type hinta

* Update homeassistant/components/livisi/coordinator.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update homeassistant/components/livisi/coordinator.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-24 12:59:59 +01:00
Robert Svensson
ee74e21541
Rework UniFi wireless client "wired bug" logic () 2023-03-24 10:06:09 +01:00
Jan Bouwhuis
7364e6ecb3
Remove incorrect parametrize decorator () 2023-03-24 09:38:43 +01:00
Nalin Mahajan
34324c98de
Rename create_api_object to be private () 2023-03-24 08:44:35 +01:00
Jan Bouwhuis
1224b1aff6
Use helper on tests MQTT fan platform ()
Use helper on tests fan
2023-03-24 08:42:23 +01:00
Jan Bouwhuis
f2b4c95a04
Prepare MQTT platform tests part7 ()
* Tests select

* Tests sensor

* Deduplicate test code
2023-03-24 08:42:00 +01:00
Jan Bouwhuis
0570405a3c
Prepare MQTT platform tests part6 ()
* Tests lock

* Tests mixins

* Tests number

* Tests scene
2023-03-24 08:41:36 +01:00
Jan Bouwhuis
a404d5f6d7
Prepare MQTT platform tests part5 ()
* Tests light_json

* Tests light_template

* Tests light
2023-03-24 08:41:04 +01:00
J. Nick Koston
1f2268a878
Fix httpx client creating a new ssl context with each client (memory leak) ()
* Fix httpx client creating a new ssl context with each client

While working on https://github.com/home-assistant/core/issues/83524
it was discovered that each new httpx client creates a new ssl context

f1157dbc41/httpx/_transports/default.py (L261)

If an ssl context is passed in creating a new one is avoided here

f1157dbc41/httpx/_config.py (L110)

This change makes httpx ssl no-verify behavior match aiohttp ssl no-verify
behavior

6da04694fd/aiohttp/connector.py (L892)

aiohttp solved this by wrapping the code that generates the ssl context
in an lru_cache

* compact
2023-03-24 08:40:47 +01:00
Chris Xiao
ca157f4d19
Add icons for qbittorrent speed sensors ()
add icons for qbittorrent speed sensors
2023-03-24 07:23:05 +01:00
J. Nick Koston
f1ec77b8e0
Small cleanups to logbook statement generator ()
We should only convert the context id to binary if
its going to be used.

Avoid some intermediate vars that are no longer needed
2023-03-23 20:56:58 -04:00
J. Nick Koston
a44d6f30c9
Fix refactoring error in states/events context id migration ()
fixes 
2023-03-23 20:56:04 -04:00
J. Nick Koston
e7e7f603c2
Remove async_response from websocket apis where nothing was being awaited () 2023-03-23 20:53:18 -04:00
J. Nick Koston
d49fbc17df
Fix recorder attribute excludes not being effective until after startup ()
* Fix attribute excludes not being effective until after startup

fixes 

* reduce
2023-03-23 20:52:37 -04:00
J. Nick Koston
dd0f05b980
Avoid calling the http access logging when logging is disabled () 2023-03-23 09:55:02 -10:00
epenet
38a4f08e15
Fix missing mock in islamic_prayer_times ()
* Fix missing mock in islamic_prayer_times

* Restore 100% coverage

* Update test_config_flow.py
2023-03-23 20:10:51 +01:00
Michael Hansen
3e3ece4e56
Add speech to text over binary websocket to pipeline ()
* Allow passing binary to the WS connection

* Expand test coverage

* Test non-existing handler

* Add text to speech and stages to pipeline

* Default to "cloud" TTS when engine is None

* Refactor pipeline request to split text/audio

* Refactor with PipelineRun

* Generate pipeline from language

* Clean up

* Restore TTS code

* Add audio pipeline test

* Clean TTS cache in test

* Clean up tests and pipeline base class

* Stop pylint and pytest magics from fighting

* Include mock_get_cache_files

* Working on STT

* Preparing to test

* First successful test

* Send handler_id

* Allow signaling end of stream using empty payloads

* Store handlers in a list

* Handle binary handlers raising exceptions

* Add stt/tts dependencies to voice_assistant

* Include STT audio in pipeline test

* Working on tests

* Refactoring with stages

* Fix tests

* Add more tests

* Add method docs

* Change stt demo/cloud to AsyncIterable

* Add pipeline error events

* Move handler id to separate message before pipeline

* Add test for invalid stage order

* Change "finish" to "end"

* Use enum

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-03-23 14:44:19 -04:00
Jan Bouwhuis
185d6d74d7
Prepare MQTT platform tests part9 ()
* Tests switch

* Tests text

* Tests update
2023-03-23 19:17:27 +01:00
Jan Bouwhuis
db63c8584e
Prepare MQTT platform tests part8 ()
* Tests state_vacuum

* Tests siren
2023-03-23 19:16:54 +01:00
Jan Bouwhuis
2c1b59be0e
Prepare MQTT platform tests part4 ()
* Tests humidifier

* Tests legacy_vacuum
2023-03-23 19:14:44 +01:00
Jan Bouwhuis
44add1dc11
Prepare MQTT platform tests part3 ()
* Tests cover

* Tests fan
2023-03-23 19:14:08 +01:00
Jan Bouwhuis
8fd88d6703
Prepare MQTT platform tests part2 ()
* Tests button

* Tests camera

* Tests climate
2023-03-23 19:13:36 +01:00
Vincent Knoop Pathuis
87475e8ff6
Cleanup some leftovers for Landis+Gyr ()
Cleanup some leftovers
2023-03-23 17:34:57 +01:00
Nalin Mahajan
e290febb38
Bump pyControl4 to 1.1.0 ()
* Bump pyControl4 to 1.1.0

* Remove mock token_expiration from control4
2023-03-23 17:34:38 +01:00
Vincent Knoop Pathuis
cb578c71e0
Add Landis+Gyr missing device class ()
Add missing device class for heat_previous_year_gj
2023-03-23 17:21:21 +01:00
PeteRager
73ed6e039a
Improve logging for unavailable sonos hosts ()
* Repeated warning messages on unavailable manually specified hosts

Sonos logs warning messages every 1 minute 12 seconds for hosts that are not on-line.  This fixes the issue and the warning will be logged the first time, and subsequent logs messages will be at DEBUG level

* Update homeassistant/components/sonos/__init__.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Log info message when reconnect succeeds

* Use pop to simplify code

* Add additional test, fix key error with pop

* Use pop with default return value

* Update tests/components/sonos/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/sonos/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/sonos/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/sonos/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update tests/components/sonos/test_init.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* Update comment, remove unneeded line of code

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-23 16:15:55 +01:00
Nalin Mahajan
504793882d
Remove unecessary variable in control4 ()
Remove unecessary expiration value
2023-03-23 16:09:00 +01:00
Marc Mueller
d5f949f4d8
Update pydantic to 1.10.7 () 2023-03-23 08:42:39 -04:00
G Johansson
b1370cbd42
Add constants file to workday ()
Constants workday
2023-03-23 12:01:03 +01:00
G Johansson
dd4a3089ec
Add constants file for Brottsplatskartan ()
* bpk constants

* not used
2023-03-23 11:54:15 +01:00
G Johansson
2b4514ae25
Add codeowner Workday ()
codeowner
2023-03-23 11:53:22 +01:00
Vincent Knoop Pathuis
568a731e2d
Use snapshot test for Landis+Gyr ()
Initial commit for snapshot test
2023-03-23 10:30:31 +01:00
epenet
92bcb04e4f
Adjust scaffold docstring ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-03-23 10:13:53 +01:00
J. Nick Koston
60ae1f99e0
Update powerwall strings for newer models () 2023-03-23 10:13:18 +01:00