Commit graph

18675 commits

Author SHA1 Message Date
Jan-Philipp Benecke
dd902bc956
Explicit check for None in Discovergy entity if condition (#105248)
Fix checking for None in Discovergy
2023-12-07 19:47:14 +01:00
Erik Montnemery
84329844fd
Disable config flow progress in peco config flow (#105222) 2023-12-07 13:25:23 +01:00
Duco Sebel
f8c216a5ea
Use brightness scaling util in HomeWizard Number entity (#105147) 2023-12-07 09:37:20 +01:00
Duco Sebel
3d5329755f
Add extra tests for HomeWizard for unsupported entity creation (#105149) 2023-12-07 09:24:27 +01:00
Robert Svensson
2a8a60b381
Improve LIDL christmas light detection in deCONZ (#105155) 2023-12-07 09:19:38 +01:00
Cían Hughes
e051244927
Add Modbus fan speed support (#104577)
Co-authored-by: jan iversen <jancasacondor@gmail.com>
2023-12-07 08:19:03 +01:00
Jan-Philipp Benecke
05e122e22b
Modernize and cleanup trend tests (#105010)
Co-authored-by: Em <emmanuel.sciara@gmail.com>
2023-12-06 18:46:35 +01:00
Tucker Kern
ff21c02cb6
Add preset modes to ESPHome fan entities (#103781)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-06 06:53:52 -10:00
Jan-Philipp Benecke
a16819e0e5
Use freezegun in utility_meter tests (#105123) 2023-12-06 14:43:26 +01:00
Ville Skyttä
a29695e622
Add Huawei LTE network mode select (#104614)
* Convert network mode from sensor to select for huawei_lte

This also introduces the select platform to huawei_lte integration.

* Move (networkmode, str) mapping to const

Also, rebase on top of the current dev

* Fix variable naming, initialize name

* Fix wrong key for router access

* Typing fixes

* Adapt to current way of registering subscriptions

* Simplify option management, make translatable

* Make use of custom entity description

* Add icon

* Revert sensor formatting changes, move to another PR

* Improve entity class naming

* Add test

* Make sure entity descriptions define a setter function

---------

Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
2023-12-06 14:23:26 +02:00
J. Nick Koston
bf8f78c041
Fix flakey logbook tests (#105111) 2023-12-06 08:15:48 +01:00
J. Nick Koston
a528183556
Bump habluetooth to 0.8.0 (#105109) 2023-12-06 08:15:24 +01:00
Tudor Sandu
636e38f4b3
Trigger Home Assistant shutdown automations right before the stop event instead of during it (#91165)
Co-authored-by: Erik <erik@montnemery.com>
2023-12-05 11:24:41 -10:00
TJ Horner
19e193ae1d
Increase frequency of weatherkit updates (#105094) 2023-12-05 09:45:26 -10:00
J. Nick Koston
94d168e20e
Move Bluetooth advertisement tracker to habluetooth library (#105083) 2023-12-05 19:53:29 +01:00
Michael
3310f4c130
Add significant Change support for weather (#104840) 2023-12-05 19:17:52 +01:00
Erik Montnemery
1edfaed7be
Improve raise contains mocks (#105078)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-05 19:14:35 +01:00
Jan-Philipp Benecke
dc17780e5b
Remove device from known_devices upon import in ping device tracker (#105009)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-05 18:52:22 +01:00
J. Nick Koston
b6245c834d
Move local bluetooth scanner code into habluetooth library (#104970) 2023-12-05 07:19:02 -10:00
Erik Montnemery
428c184c75
Improve yamaha tests (#105077) 2023-12-05 07:17:56 -10:00
Erik Montnemery
5b55c7da5f
Remove logic converting empty or falsy YAML to empty dict (#103912)
* Correct logic converting empty YAML to empty dict

* Modify according to github comments

* Add load_yaml_dict helper

* Update check_config script

* Update tests
2023-12-05 18:08:11 +01:00
Robert Hillis
651df6b698
Add calendar entity to Radarr (#79077)
* Add calendar entity to Radarr

* address feedback/add tests

* black

* uno mas

* rework to coordinator

* uno mas

* move release atttribute writing

* fix calendar items and attributes
2023-12-05 07:51:51 -08:00
Erik Montnemery
3bcc6194ef
Add domain key config validation (#104242)
* Drop use of regex in helpers.extract_domain_configs

* Update test

* Revert test update

* Add domain_from_config_key helper

* Add validator

* Address review comment

* Update snapshots

* Inline domain_from_config_key in validator
2023-12-05 15:07:32 +01:00
Erik Montnemery
25bea91683
Use modern platform path when reporting platform config errors (#104238)
* Use modern platform path when reporting platform config errors

* Update tests

* Address review comment

* Explicitly pass platform domain to log helpers

* Revert overly complicated changes

* Try a simpler solution
2023-12-05 15:06:13 +01:00
jan iversen
0638088aee
Deprecate and remove lazy_error from modbus (#105037) 2023-12-05 13:08:33 +01:00
Erik Montnemery
5b59e043fa
Don't use deprecated_class decorator on deprecated YAML classes (#105063) 2023-12-05 11:36:26 +01:00
Erik Montnemery
ae002e2f38
Remove breaks_in_ha_version from deprecated YAML classes (#105062) 2023-12-05 10:48:31 +01:00
Erik Montnemery
84e74e4c74
Reverse component path (#104087)
* Reverse component path

* Update translations helper

* Fix

* Revert incorrect change of PLATFORM_FORMAT

* Fix use of PLATFORM_FORMAT in tts

* Fix ios
2023-12-05 08:43:58 +01:00
Michael Hansen
a9381d2590
Add Wyoming satellite (#104759)
* First draft of Wyoming satellite

* Set up homeassistant in tests

* Move satellite

* Add devices with binary sensor and select

* Add more events

* Add satellite enabled switch

* Fix mistake

* Only set up necessary platforms for satellites

* Lots of fixes

* Add tests

* Use config entry id as satellite id

* Initial satellite test

* Add satellite pipeline test

* More tests

* More satellite tests

* Only support single device per config entry

* Address comments

* Make a copy of platforms
2023-12-04 15:13:15 -05:00
Aaron Godfrey
677c50a7cc
Exclude Todoist sub-tasks for the todo platform (#104914) 2023-12-04 20:37:09 +01:00
Erik Montnemery
35e2f591c1
Make cv.string return subclasses of str as is (#103916) 2023-12-04 20:36:16 +01:00
Marcel van der Veldt
516966db33
Add Matter custom cluster sensors (Eve Energy Plug energy measurements) (#104830)
* Support for sensors from custom clusters in Matter

* lint

* no need to write state twice

* Add test for eve energy plug

* Update homeassistant/components/matter/entity.py

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

* adjust comment

* debounce extra poll timer

* use async_call_later helper

* Update homeassistant/components/matter/entity.py

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

* wip extend test

* Update test_sensor.py

* fix state class for sensors

* trigger (fake) event callback on all subscribers

* Update eve-energy-plug.json

* add test for additionally polled value

* adjust delay to 3 seconds

* Adjust subscribe_events to always use kwargs

* Update tests/components/matter/common.py

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

* Update test_sensor.py

* remove redundant code

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-12-04 17:21:41 +01:00
Jan Bouwhuis
7d21ed41a2
Refactor lock default code handling (#104807) 2023-12-04 14:59:51 +01:00
jan iversen
1629bdcd7f
Remove "swap: none" from modbus (#104713) 2023-12-04 14:48:40 +01:00
Erik Montnemery
95f7db1970
Move config_per_platform and extract_domain_configs to config.py (#104989) 2023-12-04 12:48:49 +01:00
Jan Bouwhuis
e8475b9b33
Add scaling utils for brightness and fanspeed (#104753)
Co-authored-by: Robert Resch <robert@resch.dev>
2023-12-04 12:10:58 +01:00
Erik Montnemery
db51a8e1f7
Allow passing breaks_in_ha_version to deprecation helper decorators (#104985) 2023-12-04 11:52:10 +01:00
Jan Bouwhuis
d8a6d864c0
Raise on smtp notification if attachment is not allowed (#104981)
* Raise smtp notification if attachment not allowed

* Pass url as placeholder

* Use variable in err message

* Add allow_list as placeholder
2023-12-04 11:48:29 +01:00
Erik Montnemery
34d01719f2
Minor improvements of deprecation helper (#104980) 2023-12-04 10:47:49 +01:00
J. Nick Koston
67039e0f26
Remove monotonic_time_coarse datetime helper (#104892) 2023-12-04 09:10:13 +01:00
Jan Bouwhuis
fe2906f159
Do not allow smtp to access insecure files (#104972) 2023-12-03 20:06:01 -05:00
J. Nick Koston
28584ad240
Relocate base Bluetooth scanner code into an external library (#104930) 2023-12-03 10:00:11 -10:00
Jan Rieger
244edb488b
Add Holiday integration (#103795)
* Add Holiday integration

* Localize holiday names

* Changes based on review feedback

* Add tests

* Add device info

* Bump holidays to 0.36

* Default to Home Assistant country setting

* Update homeassistant/components/holiday/calendar.py

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

* Update homeassistant/components/holiday/calendar.py

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

* Update homeassistant/components/holiday/config_flow.py

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

* black

* Move time

* Stop creating duplicate holiday calendars

* Set default language using python-holiday

* Use common translation

* Set _attr_name to None to fix friendly name

* Fix location

* Update homeassistant/components/holiday/__init__.py

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

* Update homeassistant/components/holiday/calendar.py

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

* Update homeassistant/components/holiday/calendar.py

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

* Update tests/components/holiday/test_init.py

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

* cleanup

* Set up the integration and test the state

* Test that configuring more than one instance is rejected

* Set default_language to user's language, fallback to country's default language

* Improve tests

* Update homeassistant/components/holiday/calendar.py

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

* Cleanup

* Add next year so we don't run out

* Update tests/components/holiday/test_init.py

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

* Cleanup

* Set default language in `__init__`

* Add strict typing

* Change default language: HA's language `en` is `en_US` in holidays, apart from Canada

* CONF_PROVINCE can be None

* Fix test

* Fix default_language

* Refactor tests

* Province can be None

* Add test for translated title

* Address feedback

* Address feedback

* Change test to use service call

* Address feedback

* Apply suggestions from code review

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

* Changes based on review feedback

* Update homeassistant/components/holiday/calendar.py

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

* Update homeassistant/components/holiday/calendar.py

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

* Add a test if next event is missing

* Rebase

* Set device to service

* Remove not needed translation key

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-12-03 16:28:53 +01:00
Jan Bouwhuis
5d6791e412
Remove CONF_PRECISION remainder from dsmr (#104919) 2023-12-03 11:53:09 +01:00
J. Nick Koston
dd9c22672a
Refactor bluetooth scanners for better seperation of concerns (#104909) 2023-12-02 13:20:06 -10:00
Erwin Douna
7a9c3819e0
Add MELCloud token refresh upon firmware upgrade (#104391)
* Adding initial setup

* Update homeassistant/components/melcloud/__init__.py

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

* Adding ConfigEntryNotReady exception

* Update homeassistant/components/melcloud/__init__.py

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

* Update homeassistant/components/melcloud/config_flow.py

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

* Update homeassistant/components/melcloud/__init__.py

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

* Placing exception handling in setup_entry

* Expanding test cases

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-12-02 23:07:06 +01:00
Dave T
b48ad268b5
Add alarm sensor to Aurora ABB (#104503)
* Add new sensors

* Add strings

* Fix tests

* Only add alarm sensor, & refactor

* Address review comments

* Address review comments.

* Fix ruff
2023-12-02 23:04:37 +01:00
Jan Bouwhuis
c9306049b3
Correct SerialException import in dsmr, firmata, landysgyr_heat_meater and rfxtrx integrations (#104889)
* Fix SerialException import in dsmr integration

* Fix imports firmata, landysgyr_heat_meter, rfxtrx
2023-12-02 19:30:04 +01:00
Jan Bouwhuis
5106dd173c
Fix dsmr zero reconnect interval option could crash HA (#104900)
* Fix dsmr zero interval option could crash HA

* No change change the options
2023-12-02 19:28:56 +01:00
Niccolò Maggioni
0232c8dcb0
Add temperature to the light color mode parameter fallbacks (#86026)
* Add color temperature to the color mode fallbacks

* Manually add ATTR_COLOR_TEMP since ATTR_COLOR_TEMP_KELVIN is pre-parsed

* Include the legacy ATTR_COLOR_TEMP attribute in the tests

* Apply suggestions from code review

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

* Add citation for McCamy's approximation formula

If still existing, also see page 3 of https://www.st.com/resource/en/application_note/an5638-how-correlated-color-temperature-is-calculated-by-vd6283-stmicroelectronics.pdf

* Update homeassistant/util/color.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-12-01 08:26:07 +01:00