Commit graph

18886 commits

Author SHA1 Message Date
Robert Resch
c226d793d4
Move common function for testing derepcation constants to util (#106063) 2023-12-19 17:31:31 +01:00
Robert Resch
0e0fd39603
Add dir_with_deprecated_constants function to deprecation helper (#106059) 2023-12-19 16:37:21 +01:00
Joakim Sørensen
5b4000e759
Bump hass-nabucasa from 0.74.0 to 0.75.1 (#105958)
* Bump hass-nabucasa from 0.74.0 to 0.75.1

* Force sorting of parametrized test

* Simplify async_create_issue.severity

* use fixtures
2023-12-19 13:08:27 +01:00
Franck Nijhof
48740e6b05
Add cover platform to Tailwind integration (#106042) 2023-12-19 12:46:21 +01:00
Robert Resch
a4ccd6e13b
Deprecate binary sensor device class constants (#105736)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-12-19 12:45:32 +01:00
G Johansson
c64c1c8f08
Workday create repair if named holiday missing (#101201) 2023-12-19 12:33:05 +01:00
Michael
a1614d6b7e
Add significant Change support for climate (#106020) 2023-12-19 12:30:30 +01:00
Jan-Philipp Benecke
7d74c89606
Use freezegun in image_upload test (#106045) 2023-12-19 12:26:40 +01:00
Jan-Philipp Benecke
f84e43bc0a
Use freezegun in qld_bushfire test (#106049) 2023-12-19 12:21:19 +01:00
Jan-Philipp Benecke
c50098a845
Use freezegun in nsw_rural_fire_service_feed test (#106050) 2023-12-19 12:20:56 +01:00
Jan-Philipp Benecke
2d31f9e984
Use freezegun in ign_sismologia test (#106051) 2023-12-19 12:20:28 +01:00
Franck Nijhof
ef59394ef4
Add binary sensor platform to Tailwind integration (#106033) 2023-12-19 10:38:56 +01:00
Michael
a4cb64e20e
Add significant Change support for water heater (#106003) 2023-12-19 10:38:13 +01:00
Michael
458fcc6372
Add significant Change support for alarm control panel (#106021) 2023-12-19 09:58:02 +01:00
mkmer
061c144fe8
Correct logic in honeywell for cleaning up stale devices (#106018)
* code quality fixes

* remove unnecessary code

* Remove comment

* change config entry configuration order

* update based on aladdin connect pr
2023-12-19 07:58:35 +01:00
mkmer
69fccec147
Clean up device registry for doors that no longer exist in Aladdin Connect (#99743)
* Remove devices that no longer exist

* Run Black after merge

* config 2 devices then 1 devices

* clean up device assertions

* More generic device check

* Add request from Honeywell PR

* remove unnecesary test
optimize dont_remove

* remove unnecessary test

* Actually test same id different domain

* Test correct id

* refactor remove test

* Remove .get for non optional keys

* Comprehension for all_device_ids

* Fix DR test, remove `remove`

* fix entities for full test coverage

* remove unused variable assignment

* Additional assertions confirming other domain

* Assertion error

* new method for identifier loop

* device_entries for lists
2023-12-19 07:30:02 +01:00
Erik Montnemery
6f392a3b43
Avoid mutating entity descriptions in sunweg tests (#106024) 2023-12-18 15:26:59 -10:00
Michael
29e30e796a
Add significant change helper check_valid_float (#106005) 2023-12-18 21:59:30 +01:00
Guido Schmitz
b35afccdb7
Add PLC PHY rates as sensor to devolo Home Network (#87039)
* Add plc phyrate sensors

* Fix mypy

* Add tests

* Use suggested_display_precision

* Adapt to recent development

* Remove accidentally added constant

* Fix tests

* Fix pylint

* Use PHY rate instead of phyrate

* Adapt tests

* Hopefully fix mypy

* Hopefully fix mypy

* Use LogicalNetwork

* Apply mypy fixes
2023-12-18 21:11:06 +01:00
Eugenio Panadero
b96d2cadac
Add new price sensors with API token access to pvpc hourly pricing (#85769)
*  Implement optional API token in config-flow + options

to make the data download from an authenticated path in ESIOS server

As this is an *alternative* access, and current public path works for the PVPC,
no user (current or new) is compelled to obtain a token,
and it can be enabled anytime in options, or doing the setup again

When enabling the token, it is verified (or "invalid_auth" error),
and a 'reauth' flow is implemented, which can change or disable the token if
it starts failing.

The 1st step of config/options flow adds a bool to enable this private access,
- if unchecked (default), entry is set for public access (like before)
- if checked, a 2nd step opens to input the token, with instructions
  of how to get one (with a direct link to create a 'request email').
  If the token is valid, the entry is set for authenticated access

The 'reauth' flow shows the boolean flag so the user could disable a bad token
by unchecking the boolean flag 'use_api_token'

* ♻️ Remove storage of flag 'use_api_token' in config entry

leaving it only to enable/disable the optional token in the config-flow

* ♻️ Adjust async_update_options

*  Add new price sensors with API token access

New price sensors added:
- Injection price: price of excess energy from self-consumption
- OMIE price: electricity price in the 'open' market
- MAG price: Temporal tax cost for gas compensation

*  Adapt tests to work with multiple sensors

* 🐛 Fix all integration sensors going unavailable

when any sensor lacks data for the current day (usually the 'OMIE price')

* Fix rebase

* Customize icons and display precision for new sensors

* Disable MAG Tax and OMIE price sensors by default

* Move logic to assign sensor unique ids to integration

* Move helper functions to helpers.py

* Fix sensor activation for API download
2023-12-18 21:06:02 +01:00
Erik Montnemery
1d1cd6be57
Avoid mutating entity descriptions in sunweg (#105982) 2023-12-18 10:03:40 -10:00
Miguel Camba
5175737b60
Add Valve integration (#102184)
* Add Valve integration.

This adds the valve integration discussed in https://github.com/home-assistant/architecture/discussions/975
Most of the code is taken from the cover integration but simplified since valves
can't tilt.

There are a couple outstanding errors I'm not sure how to solve and prevents
me from even making this commit without `--no-verify`.

* Apply PR feedback

* Apply more feedback: Intruduce the bare minimum

* Remove file commited by mistake

* Hopefully this fixes tests

* Match cover's typing and mypy settings

* Change some configuration files

* Fix test

* Increase code coverage a little

* Code coverate inproved to 91%

* 95% code coverage

* Coverate up to 97%

* Coverage 98%

* Apply PR feedback

* Even more feedback

* Add line I shouldn't have removed

* Derive closed/open state from current position

* Hopefully last feedback

* Update homeassistant/components/valve/__init__.py

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

* Update homeassistant/components/valve/__init__.py

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

* Remove unnecesary translation

* Remove unused method arguments

* Complete code coverage

* Update homeassistant/components/valve/__init__.py

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

* Simplify tests

* Update homeassistant/components/valve/__init__.py

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

* Apply last feedback

* Update tests/components/valve/test_init.py

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

* Update tests/components/valve/test_init.py

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

* Update tests/testing_config/custom_components/test/valve.py

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

* More feedback

* Apply suggestion

* And more feedback

* Apply feedback

* Remove commented code

* Reverse logic to unindent

* Update homeassistant/components/valve/__init__.py

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

* Update homeassistant/components/valve/__init__.py

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

* Implement stop valve for Mock valve

* Fix tests now that I've implemented stop_valve

* Assert it's neither opening nor closing

* Use current position instead

* Avoid scheduling executor when opening or closing

* Fix incorrect bitwise operation

* Simplify toggle

* Remove uneeded partial functions

* Make is_last_toggle_direction_open private

* Remove valve from test custom integration

* Improve test coverage

* Address review comments

* Address review comments

* Address review comments

* Update homeassistant/components/valve/__init__.py

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

* Update tests

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
2023-12-18 19:48:00 +01:00
Franck Nijhof
5f2a13fec6
Add DHCP discovery to Tailwind (#105981) 2023-12-18 15:52:48 +01:00
Erik Montnemery
2515e520c1
Allow step size any for number selector in slider mode (#105978) 2023-12-18 15:30:59 +01:00
Michael
58070e14a7
Add significant Change support for camera (#105866) 2023-12-18 14:40:55 +01:00
Jan-Philipp Benecke
0972dc5867
Migrate directv test to use freezegun (#105894) 2023-12-18 14:40:13 +01:00
Franck Nijhof
556be26040
Add button platform to Tailwind integration (#105961) 2023-12-18 14:11:43 +01:00
J. Nick Koston
4bdfea5d67
Remove HaAsyncServiceBrowser from zeroconf (#105881) 2023-12-18 14:11:06 +01:00
Franck Nijhof
79aa888ca0
Add diagnostics platform to Tailwind (#105965) 2023-12-18 14:05:15 +01:00
Tobias Sauerwein
57a6effd70
Fix unreachable Netatmo sensor returning false values (#105954)
* Fix unreachable sensor returning false values

* Clean up unnecessary code
2023-12-18 13:57:34 +01:00
Franck Nijhof
3c73c0f17f
Add reauth support to Tailwind (#105959) 2023-12-18 12:12:56 +01:00
starkillerOG
253182c650
Reolink change ir to switch (#105916)
* Change IR from light to switch

* Remove old entity

* Add test

* Apply suggestions from code review

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>

---------

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
2023-12-18 11:13:20 +01:00
Franck Nijhof
90fef6b9c9
Add Tailwind zeroconf discovery (#105949) 2023-12-18 10:39:15 +01:00
Klaas Schoute
e59e1d7f8e
Add prices service calls for easyEnergy (#105175) 2023-12-18 09:37:59 +01:00
Franck Nijhof
d50b79ba84
Add Tailwind integration (#105926)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-18 08:42:53 +01:00
Brett Adams
a88335272a
Implement Review Feedback for Tessie (#105937) 2023-12-17 15:33:26 -10:00
J. Nick Koston
5c503683b7
Bump lru-dict to 1.3.0 (#105914)
* Bump lru-dict to 1.3.0

changelog: https://github.com/amitdev/lru-dict/compare/v1.2.0...v1.3.0

* fix typing

* quote types

* quote types
2023-12-18 00:16:31 +01:00
Jan-Philipp Benecke
7772f60426
Migrate file test to use freezegun (#105892) 2023-12-17 05:09:10 -10:00
J. Nick Koston
89513efd8d
Refactor ESPHome Bluetooth connection logic to prepare for esphome-bleak (#105747) 2023-12-17 04:42:28 -10:00
J. Nick Koston
537dbd8375
Fix cloud tests doing socket I/O (#105874)
https://github.com/home-assistant/core/actions/runs/7233101649/job/19708631179?pr=105868
https://github.com/home-assistant/core/actions/runs/7232949349?pr=105834

I was hoping to only patch the library, but when I did that it still failed
because it had no access token
2023-12-17 01:23:56 +01:00
Álvaro Fernández Rojas
3be12c0611
Fix Airzone temperature range on new climate card (#105830)
* airzone: climate: fix double setpoint

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

* tests: airzone: fix double setpoint temperature

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

* tests: airzone: fix swapped double setpoint

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2023-12-16 18:42:58 +01:00
J. Nick Koston
755dcd8bc6
Ensure bluetooth auto recovery does not run in tests (#105841) 2023-12-16 06:09:03 -10:00
J. Nick Koston
47f8e08261
Reduce overhead to connect dispatcher (#105715)
Reduce overhead connect dispatcher

- We tend to have 1000s (or 10000s) of connected dispatchers which
  makes these prime targets to reduce overhead/memory

- Instead of creating new functions to wrap log exceptions each time
  use partials which reuses the function body and only create new
  arguments

Previous optimizations #103307 #93602
2023-12-16 10:16:58 +01:00
Joseph Block
1271f16385
Add Unifi device state for additional diagnostics (#105138)
* Add device state for additional diagnostics

* Add state test and fix existing tests

* Utilize IntEnum and dict for state lookup

* Update aiounifi to v68
2023-12-16 08:38:21 +01:00
Brett Adams
887f9a21e5
Add Binary Sensor platform to Tessie (#105421) 2023-12-15 18:56:38 -10:00
Álvaro Fernández Rojas
a12c490cff
Update aioairzone to v0.7.2 (#105811) 2023-12-15 14:59:43 -10:00
Joost Lekkerkerker
ef5d9d7377
Partly migrate Plex to has entity name (#98841)
* Partly migrate Plex to has entity name

* Use friendly name for device name

* Lowercase
2023-12-15 08:56:26 +01:00
Jan Bouwhuis
3f2fc2fce9
Fix mqtt tests modifying globals (#105774) 2023-12-15 08:15:10 +01:00
Erik Montnemery
a2b31a06e3
Avoid mutating entity descriptions in solaredge tests (#105718) 2023-12-15 08:10:35 +01:00
Martin Hjelmare
4da04a358a
Refactor cloud assist pipeline (#105723)
* Refactor cloud assist pipeline

* Return None early
2023-12-14 23:56:08 +01:00