Commit Graph

18825 Commits (b674985b202e2f309bf511067762339eeaf12d6c)

Author SHA1 Message Date
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
Michael Hansen 6c5ca58405
Set todo item status in intent (#105743) 2023-12-14 22:53:22 +01:00
Franck Nijhof cc75430af3
Disable user profiles on login screen (#105749) 2023-12-14 20:28:08 +01:00
Charles Garwood 032d120a26
Include Envoy firmware version in Enphase diagnostics (#105742)
* Include Envoy firmware version in Enphase diagnostics

* Update tests
2023-12-14 13:59:39 -05:00
Charles Garwood 40f914214b
Fix Fully Kiosk Browser MQTT event callbacks with non-standard event topics (#105735) 2023-12-14 18:59:37 +01:00
J. Nick Koston 8d1a69ae84
Migrate ESPHome bleak implementation to bleak-esphome library (#105611) 2023-12-14 07:21:31 -10:00
Lucas Mindêllo de Andrade d4a7361bc6
Bump sunweg to 2.0.1 (#105613)
* chore(sunweg): minor requested changes

* test(sunweg): use of fixtures

* feat(sunweg): provide bad auth result on expired authentication

* chore(sunweg): bump version

* chore(sunweg): removed reauth

* chore(sunweg): removed features out of scope

* chore(sunweg): fixtures moved to conftest.py

* chore(sunweg): devicetype moved to const

* chore(sunweg):  conftest comment

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-14 16:51:57 +01:00
epenet 351b07b14d
Fix issue clearing renault schedules (#105719)
* Fix issue clearing renault schedules

* Adjust
2023-12-14 12:54:03 +01:00
Erik Montnemery 9095027363
Avoid mutating entity descriptions in efergy tests (#105717) 2023-12-14 12:48:15 +01:00
Brig Lamoreaux 7721840298
Allow multiple configs for srp energy (#96573)
* Allow multiple configs.

* Rename test configs.

* Remove unused property

* Merge branch 'dev' into srp_energy_202307.coordinator

* Use title in device name.
2023-12-14 11:07:13 +01:00
Martin Hjelmare 2e448d2d13
Remove cloud details from assist pipeline (#105687)
* Remove cloud details from assist pipeline

* Update assist pipeline tests

* Update cloud tests
2023-12-14 10:15:59 +01:00
Erik Montnemery 9020dbb093
Remove context_recent_time property from entity base class (#105652) 2023-12-14 08:33:31 +01:00
G Johansson 65514fbd73
Add error translations for Sensibo (#105600) 2023-12-13 19:40:57 +01:00
Jan-Philipp Benecke d322cb5fdf
Migrate homekit_controller tests to use freezegun (#105646) 2023-12-13 19:37:51 +01:00
Erik Montnemery dd5a48996a
Keep capabilities up to date in the entity registry (#101748)
* Keep capabilities up to date in the entity registry

* Warn if entities update their capabilities very often

* Fix updating of device class

* Stop tracking capability updates once flooding is logged

* Only sync registry if state changed

* Improve test

* Revert "Only sync registry if state changed"

This reverts commit 1c52571596c06444df234d4b088242b494b630f2.

* Avoid calculating device class twice

* Address review comments

* Revert using dataclass

* Fix unintended revert

* Add helper method
2023-12-13 17:27:26 +01:00
Erik Montnemery 4f9f548929
Add volume_step property to MediaPlayerEntity (#105574)
* Add volume_step property to MediaPlayerEntity

* Improve tests

* Address review comments
2023-12-13 17:26:34 +01:00
puddly 4e9b9add29
Bump ZHA dependencies (#105661) 2023-12-13 17:06:46 +01:00
Joost Lekkerkerker a82410d5e9
Deduplicate constants E-Z (#105657) 2023-12-13 17:05:37 +01:00
Joost Lekkerkerker e4453ace88
Add country code constant (#105640) 2023-12-13 16:50:46 +01:00
puddly e475829ce6
Reload ZHA integration on any error, not just recoverable ones (#105659) 2023-12-13 16:24:26 +01:00
Erik Montnemery dff7725c1f
Fix goodwe tests (#105653) 2023-12-13 14:52:44 +01:00
Jan-Philipp Benecke 61a99c911c
Migrate demo test to use freezegun (#105644) 2023-12-13 14:33:59 +01:00
Joost Lekkerkerker ac53b78a0c
Deduplicate constants A-D (#105638) 2023-12-13 14:21:44 +01:00
Martin Hjelmare 02853a62f0
Clean cloud client fixture from cloud http api tests (#105649) 2023-12-13 14:21:33 +01:00
Martin Hjelmare 5bb233998e
Improve cloud http api tests (#105610)
* Improve cloud http api tests

* Add comments to the cloud fixture

* Fix docstring
2023-12-13 13:53:22 +01:00
mletenay 0548f9f342
Add diagnostics download to goodwe integration (#102928)
* Add diagnostics download to goodwe integration

* Revert change not related to test

* Use MagicMock for mock inverter

* Use spec with mock
2023-12-13 12:35:53 +01:00
Joost Lekkerkerker 22b2c588eb
Use issue registry fixture (#105633) 2023-12-13 11:23:38 +01:00
Joost Lekkerkerker 06f81251fb
Reduce code duplication in Suez config flow (#105558) 2023-12-13 10:41:35 +01:00
Erik Montnemery 22c3847c0e
Allow inheriting `FrozenOrThawed` with custom init (#105624) 2023-12-13 10:13:34 +01:00
J. Nick Koston 5dbd0dede1
Refactor Bluetooth scanners to avoid the need to pass a callback (#105607) 2023-12-13 09:17:48 +01:00
Michael Hansen aaccf19013
Rename "satellite enabled" to "mute" (#105619) 2023-12-13 09:09:22 +01:00
Maciej Bieniek 66d24b38aa
Add diagnostics platform to BraviaTV (#105603)
* Add diagnostics platform

* Add test

* Improve test

* Use consts

* Fix test

* Patch methods

* Patch methods
2023-12-13 08:18:50 +01:00
Michael Hansen a73e86a741
Skip TTS events entirely with empty text (#105617) 2023-12-13 00:21:16 -05:00
Michael Hansen 431a44ab67
Add name slot to HassClimateGetTemperature intent (#105585) 2023-12-12 22:54:15 -05:00
Brandon Rothweiler a595cd7141
Add sensor platform to A. O. Smith integration (#105604)
* Add sensor platform to A. O. Smith integration

* Fix typo

* Remove unnecessary mixin

* Simplify async_setup_entry
2023-12-13 00:52:15 +01:00
Maciej Bieniek 77283704a5
Bump `brother` library, use `pysnmp-lextudio` with SNMP integration (#105591) 2023-12-12 11:36:11 -10:00
J. Nick Koston f002a6a732
Refactor all Bluetooth scanners to inherit from BaseHaRemoteScanner (#105523) 2023-12-12 21:28:43 +01:00
Erik Montnemery 5bd0833f49
Improve FrozenOrThawed (#105541) 2023-12-12 21:19:41 +01:00
Jan-Philipp Benecke d33aa6b8e7
Migrate homematicip_cloud tests to use freezegun (#105592) 2023-12-12 20:51:32 +01:00
Jan Bouwhuis 280637822b
Use mocked entity platform for lock service tests (#105020)
* Use mocked entity platform for lock service tests

* Cleanup old mock class

* Follow up on code review

* Improve mock entity platform

* Use entity_id of passed entity instead of constant
2023-12-12 15:49:01 +01:00
Martin Hjelmare 2631fde0f7
Patch aiohttp server app router freeze in tests (#105555)
* Add test for registering a http view late

* Patch aiohttp server app router freeze

* Correct language
2023-12-12 14:40:38 +01:00
Erwin Douna 9d44dc4437
Add Fast.com Device Info (#105528)
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-12-12 10:41:00 +01:00
Erik Montnemery 6908497c3d
Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00
J. Nick Koston e2abd3b8d0
Bump bluetooth libraries (#105522) 2023-12-12 08:31:23 +01:00
Jan-Philipp Benecke 4859226496
Migrate geonetnz_* tests to use freezegun (#105521) 2023-12-12 08:30:08 +01:00
Jan-Philipp Benecke 319d6db55b
Migrate device_sun_light_trigger tests to use freezegun (#105520) 2023-12-12 08:29:10 +01:00
Jan Bouwhuis a66c9bb7b6
Update stale doc strings in entity platform tests (#105526) 2023-12-12 08:28:08 +01:00
Brett Adams 8922c93259
Improve tests in Tessie (#105430) 2023-12-11 20:30:54 -10:00
Maciej Bieniek bf93929826
Add support for Shelly Gen3 devices (#104874)
* Add support for Gen3 devices

* Add RPC_GENERATIONS const

* Add gen3 to tests

* More tests

* Add BLOCK_GENERATIONS const

* Use *_GENERATIONS constants from aioshelly
2023-12-11 22:58:56 +01:00
Erwin Douna 662e19999d
Add Fastdotcom DataUpdateCoordinator (#104839)
* Adding DataUpdateCoordinator

* Updating and adding test cases

* Optimizing test

* Fix typing

* Prevent speedtest at startup

* Removing typing on Coordinator

* Update homeassistant/components/fastdotcom/coordinator.py

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

* Putting back typing

* Update homeassistant/components/fastdotcom/__init__.py

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

* Adding proper StateType typing

* Fix linting

* Stricter typing

* Creating proper test case for coordinator

* Fixing typo

* Patching librbary

* Adding unavailable state test

* Putting back in asserts

* Update tests/components/fastdotcom/test_coordinator.py

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

* Update tests/components/fastdotcom/test_coordinator.py

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

* Update tests/components/fastdotcom/test_coordinator.py

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

* Update tests/components/fastdotcom/test_coordinator.py

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

* Update tests/components/fastdotcom/test_coordinator.py

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

* Coordinator workable proposal

* Update tests/components/fastdotcom/test_coordinator.py

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

* Working test cases

* Update tests/components/fastdotcom/test_coordinator.py

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

* Update tests/components/fastdotcom/test_coordinator.py

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

* Update tests/components/fastdotcom/test_coordinator.py

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

* Update tests/components/fastdotcom/test_coordinator.py

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

* Fixing tests and context

* Fix the freezer interval to 59 minutes

* Fix test

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-12-11 22:28:04 +01:00
Joost Lekkerkerker a187a39f0b
Add config flow to Suez water (#104730)
* Add config flow to Suez water

* fix tests

* Complete coverage

* Change version to 2024.7

* Fix final test

* Add issue when import is successful

* Move hassdata

* Do unique_id

* Remove import issue when entry already exists

* Remove import issue when entry already exists
2023-12-11 22:06:16 +01:00
J. Nick Koston e890671192
Relocate Bluetooth manager to habluetooth library (#105110)
* Relocate Bluetooth manager to habluetooth library

* Relocate Bluetooth manager to habluetooth library

* Relocate Bluetooth manager to habluetooth library

* fixes

* fix patching time

* fix more tests

* fix more tests

* split

* Bump habluetooth to 0.7.0

changelog: https://github.com/Bluetooth-Devices/habluetooth/compare/v0.6.1...v0.7.0

This is the big change that will move the manager so the HA
PR that will follow this will be a bit larger than the rest of them
since the manager is connected to everything

* fix types

* fix types

* fix types

* fix patch targets

* fix flakey logbook tests (will need another PR)

* mock shutdown

* bump again

* value can be a float now

* Revert "value can be a float now"

This reverts commit b7e7127143.

* float
2023-12-11 15:42:00 -05:00
Erik Montnemery dd338799d4
Make it possible to inherit EntityDescription in frozen and mutable dataclasses (#105211) 2023-12-11 20:00:55 +01:00
Joakim Plate bb0d082b25
Correctly report unavailable battery for value 255 of percentage (#104566)
* Ignore unavailable battery level for zha

* Adjust unavailable test
2023-12-11 19:17:06 +01:00
Michael Hansen 80607f7750
Disconnect before reconnecting to satellite (#105500)
Disconnect before reconnecting
2023-12-11 11:18:46 -05:00
Erik Montnemery 94fd7d0353
Improve test of config entry store (#105487)
* Improve test of config entry store

* Tweak test
2023-12-11 10:48:12 -05:00
Denis Shulyaka 1242456ff1
Bump openai end switch from dall-e-2 to dall-e-3 (#104998)
* Bump openai

* Fix tests

* Apply suggestions from code review

* Undo conftest changes

* Raise repasir issue

* Explicitly use async mock for chat.completions.create

It is not always detected correctly as async because it uses a decorator

* removed duplicated message

* ruff

* Compatibility with old pydantic versions

* Compatibility with old pydantic versions

* More tests

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Apply suggestions from code review

---------

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2023-12-11 09:47:26 -05:00
Joost Lekkerkerker 32681acc79
Remove Aftership import issue when entry already exists (#105476) 2023-12-11 12:09:43 +01:00
Jan-Philipp Benecke 47819bde4f
Migrate sonarr tests to use freezegun (#105410) 2023-12-11 10:47:51 +01:00
Jan-Philipp Benecke b4731674f8
Migrate octoprint tests to use freezegun (#105408) 2023-12-11 10:42:16 +01:00
Bouwe Westerdijk 3e3f9cf092
Bump plugwise to v0.35.3 (#105442) 2023-12-11 10:29:50 +01:00
Jan-Philipp Benecke fbfe434e8b
Migrate tag & tts tests to use freezegun (#105411) 2023-12-11 09:09:23 +01:00
Brandon Rothweiler 58d9d0daa5
Add reauth to A. O. Smith integration (#105320)
* Add reauth to A. O. Smith integration

* Validate reauth uses the same email address

* Only show password field during reauth
2023-12-10 14:30:24 -08:00
Erik Montnemery b5af987a18
Bump hatasmota to 0.8.0 (#105440)
* Bump hatasmota to 0.8.0

* Keep devices with deep sleep support always available

* Add tests
2023-12-10 23:16:06 +01:00
Allen Porter 4752d37df7
Fix fitbit oauth reauth debug logging (#105450) 2023-12-10 23:09:58 +01:00
Jan Bouwhuis a7155b154e
Fix alexa calling not featured cover services (#105444)
* Fix alexa calls not supported cover services

* Follow up comment and additional tests
2023-12-10 17:27:01 +01:00
Florian B 063ac53f01
Fix adding/updating todo items with due date in CalDAV integration (#105435)
* refactor: return date/datetime for due date

* fix: explicitly set due date on vTODO component

Using `set_due` automatically handles converting the Python-native
date/datetime values to the correct representation required by RFC5545.

* fix: fix tests with changed due date handling

* fix: item.due may not be a str

* refactor: keep local timezone of due datetime

* refactor: reorder import statement

To make ruff happy.

* fix: fix false-positive mypy error
2023-12-10 08:23:05 -08:00
Jan-Philipp Benecke ff85d0c290
Migrate mqtt tests to use freezegun (#105414) 2023-12-10 09:25:16 +01:00
Brett Adams 1cc47c0553
Add reauth to Tessie (#105419)
* First pass at Tessie

* Working POC

* async_step_reauth

* Config Flow tests

* WIP

* Add test requirement

* correctly gen test requirements

* 100% coverage

* Remove remnants of copy paste

* Add TPMS

* Fix docstring

* Remove redundant line

* Fix some more copied docstrings

* Grammar

* Create reusable StrEnum

* Streamline get

* Add a couple more sensors

* Removed need for a model

* Move MODELS

* Remove DOMAIN from config flow

* Add translation strings

* Remove unused parameter

* Simplify error handling

* Refactor coordinator to class

* Add missing types

* Add icon to shift state

* Simplify setdefault

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

* Use walrus for async_unload_platforms

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

* Reformat entity init

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

* Remove Unique ID

* Better Config Flow Tests

* Fix all remaining tests

* Standardise docstring

* Remove redudnant test

* Set TessieDataUpdateCoordinator on entity

* Correct some sensors

* add error types

* Make shift state a ENUM sensor

* Add more sensors

* Fix translation string

* Add precision suggestions

* Move session from init to coordinator

* Add api_key type

* Remove api_key parameter

* Meta changes

* Update TessieEntity and TessieSensor translations

* Goodbye translation keys

* bump tessie-api to 0.0.9

* Fix only_active to be True

* Per vehicle coordinator

* Rework coordinator

* Fix coverage

* WIP

* The grand rework

* Add comments

* Use ENUM more

* Add ENUM translations

* Update homeassistant/components/tessie/sensor.py

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

* Add entity_category

* Remove reauth

* Remove session

* Update homeassistant/components/tessie/__init__.py

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

* Add property tag

* Add error text

* Complete config flow tests

* Fix property and rename

* Fix init test

* Reworked coordinator tests

* Add extra checks

* Update homeassistant/components/tessie/__init__.py

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

* Update homeassistant/components/tessie/coordinator.py

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

* Apply suggestions from code review

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

* Ruff fix

* Update homeassistant/components/tessie/config_flow.py

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

* Remove future ENUMs

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

* Ruff fix

* Update homeassistant/components/tessie/config_flow.py

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

* Remove reauth and already configured strings

* Lowercase sensor values for translation

* Update homeassistant/components/tessie/__init__.py

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

* Fixed, before using lambda

* Add value lambda

* fix lambda

* Fix config flow test

* @bdraco fix for 500 errors

* format

* Add reauth

* Reuse string in reauth

* Ruff

* remove redundant check

* Improve error tests

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-09 23:37:57 -08:00
elmurato 7b32e4142e
Make API init async in Minecraft Server (#105403)
* Make api init async

* Remove duplicate assignment of address and set server to None in constructor
2023-12-09 21:15:48 -08:00
Jan-Philipp Benecke a8148cea65
Migrate roku tests to use freezegun (#105418) 2023-12-09 12:47:19 -10:00
Brett Adams 64a5271a51
Add Tessie Integration (#104684)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-09 12:46:32 -10:00
vexofp 327016eaeb
Accept HTTP 200 through 206 as success for RESTful Switch (#105358) 2023-12-09 12:45:33 -10:00
Raman Gupta 4e1677e3f0
Remove zwave_js device on device reset (#104291)
* Reload zwave_js config entry on device reset

* remove device

* Just remove the device and don't reload

* revert change to notification message

* Assert device is no longer there
2023-12-09 23:33:31 +01:00
vexofp 885410bcfc
Prevent duplicate default SSLContext instances (#105348)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-09 11:30:12 -10:00
Jan-Philipp Benecke a090bcb8a5
Migrate time_date tests to use freezegun (#105409) 2023-12-09 21:35:52 +01:00
J. Nick Koston a0bf170fb4
Avoid ffmpeg subprocess for many component tests (#105354) 2023-12-09 19:41:37 +01:00
Maciej Bieniek 35b733fa2c
Bump `aioshelly` to version 7.0.0 (#105384)
* Remove get_rpc_device_sleep_period() function

* Bump aioshelly version to 7.0.0

* Remove firmware compatibility check from BLE scanner

* Remove firmware compatibility check from light transition

* Update default fw ver

* Use LightEntityFeature in tests
2023-12-09 17:12:05 +02:00
Jan-Philipp Benecke b5785003a3
Migrate unifi tests to use freezegun (#105343) 2023-12-09 12:55:40 +01:00
Brett Adams d54c36307a
Fix the ruff-format error (#105376) 2023-12-09 11:53:47 +01:00
Jan-Philipp Benecke 2d02cdcd0d
Migrate gree tests to use freezegun (#105340) 2023-12-09 10:19:42 +01:00
J. Nick Koston cc85e89cf2
Make network fixture scoped to session to speed up tests (#105353) 2023-12-09 10:19:08 +01:00
Jan-Philipp Benecke 4d708f1931
Migrate template tests to use freezegun (#105341) 2023-12-09 09:47:28 +01:00
Lucas Mindêllo de Andrade f567bf6dfe
Sun WEG integration (#88272)
* feat(sunweg): initial support

* chore: removed commented out code

* chore: removed warning

* fix: set never_resets for total sensors

* test: some tests

* fix(sunweg): default plantid type

* fix(sunweg): return first plant id

* test(sunweg): improved code coverage

* chore(sunweg): missing FlowResult return type

* chore(sunweg): removed unused strings

* perf(sunweg): using only one api instance

* chore(sunweg): removed uneeded atribute

* refact(sunweg): small refactoring

* refact(sunweg): typing

* chore(sunweg): comments

* chore(sunweg): bump version

* chore(sunweg): bump lib version

* test(sunweg): different mocking and coverage

* test: fixed setup component parameter

* feat: dynamic metrics

* fix(sunweg): ruff

* fix(sunweg): mypy

* refact(sunweg): codereview suggestions

* chore(sunweg): removed unused string

* chore(sunweg): typehint and code formatting
2023-12-09 09:45:40 +01:00
Brett Adams e1df1f9ffe
Replace aiohttp mock with patch in Advantage Air (#104932)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-08 15:15:57 -10:00
Jan-Philipp Benecke a7845406a5
Migrate homeassistant component tests to use freezegun (#105333) 2023-12-08 21:18:09 +01:00
Bouwe Westerdijk 46e75ed94b
Bump plugwise to v0.34.5 (#105330) 2023-12-08 21:15:33 +01:00
G Johansson 99cf4a6b2d
Add rollback on exception that needs rollback in SQL (#104948) 2023-12-08 21:13:37 +01:00
Jan Bouwhuis 4bb0e13cda
Workaround `to_json` template filter in parsing dict key (#105327)
* Work-a-round orjson for `to_json` fiter in case dict key is str subclass

* Add option instead

* Remove json.dumps work-a-round

* Update homeassistant/helpers/template.py

* Fix test

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-12-08 20:57:53 +01:00
Erik Montnemery af715a4b9a
Add workaround for orjson not handling subclasses of str (#105314)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-12-08 18:13:34 +01:00
Excentyl 46d626280e
Initialize energy_state without price (#97031)
Co-authored-by: Erik <erik@montnemery.com>
2023-12-08 17:46:08 +01:00
Brandon Rothweiler 1c7bd3f729
Add A. O. Smith integration (#104976) 2023-12-08 17:17:42 +01:00
Michael Hansen fdeb9e36c3
Use area id for context instead of name (#105313) 2023-12-08 10:05:21 -06:00
Jan Bouwhuis e5a115ce1f
Fix mqtt json light state updates using deprecated color handling (#105283) 2023-12-08 16:54:02 +01:00
Erik Montnemery b0ef9623f9
Add test for energy cost sensor for late price sensor (#105312) 2023-12-08 16:51:07 +01:00
Raj Laud 45f7ffb34c
Add support for accessing Squeezebox over over https (#95088)
* Supports access to squeezebox server behind https reverse proxy

* Update squeezebox test

* Update homeassistant/components/squeezebox/config_flow.py

Co-authored-by: Robert Resch <robert@resch.dev>

* Update homeassistant/components/squeezebox/config_flow.py

Co-authored-by: Robert Resch <robert@resch.dev>

* Update squeezebox unit tests based on code review

* Migration unit test

* Run black on suggestions accepted in code review

* Apply suggestions from code review

Instead of upgrading squeezebox config, just assume a default of https=False.

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

* Update test_init.py

Remove migrate entry test since we are no longer migrating

* Delete tests/components/squeezebox/test_init.py

Remove unused test

---------

Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-12-08 15:51:19 +01:00
Jan-Philipp Benecke 6b7dace8d4
Migrate samsungtv tests to use freezegun (#105286) 2023-12-08 14:37:02 +01:00
Jan Bouwhuis 8721327176
Fix CI test_invalid_rrule_fix test by freezing the time (#105294) 2023-12-08 14:35:01 +01:00
Yuxin Wang 88ddc25129
Replace apcaccess dependency with aioapcaccess in apcupsd (#104571)
* Replace apcaccess dependency with async version aioapcaccess

* Upgrade the dependency to the latest version (v0.4.2)

* Handle asyncio.IncompleteReadError
2023-12-08 12:40:09 +01:00
Øyvind Matheson Wergeland 9fb9ff4f90
Remove workaround for default lock code in Matter (#105173)
* Matter: Remove workaround for default lock code

* Review

* Review 2
2023-12-08 11:46:27 +01:00
Duco Sebel 156dac394a
Add migration for old HomeWizard sensors (#105251)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-12-08 09:39:39 +01:00
ollo69 b29e9e2df0
Fix AsusWrt invalid data type with tuple type (#105247) 2023-12-08 09:01:22 +01:00
osohotwateriot 664d2410d5
Add OSO Energy integration (#70365)
* Add OSO Energy integration

* Add min/max for v40 level and bump pyosoenergyapi to 1.0.2

* OSO Energy address review comments

* Bump pyosoenergyapi to 1.0.3 and remove scan interval

* Remove unnecessary code

* Update homeassistant/components/osoenergy/__init__.py

Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>

* Fixes to latest version

* Add support to set temperature

* Update homeassistant/components/osoenergy/config_flow.py

Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>

* Fixes after review

* Remove unused code

* Add support for translations and modify services

* Apply suggestions from code review

Co-authored-by: Robert Resch <robert@resch.dev>

* Refactor services and constants according to the PR suggestions

* Remove unnecessary code

* Remove unused import in constants

* Refactoring and support for multiple instances

* Apply suggestions from code review

Co-authored-by: Robert Resch <robert@resch.dev>

* Refactor code and apply review suggestions

* Bump pyosoenergyapi to 1.0.5

* Remove services to reduce initial PR

* Remove extra state attributes and make OSO Entity generic

---------

Co-authored-by: Daniel Hjelseth Høyer <github@dahoiv.net>
Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
Co-authored-by: Robert Resch <robert@resch.dev>
2023-12-08 08:51:59 +01:00
Michael Hansen 43daeb2630
Set device id and forward errors to Wyoming satellites (#105266)
* Set device id and forward errors

* Fix tests
2023-12-07 19:44:43 -06:00
Michael Hansen e9f8e7ab50
Add Wyoming satellite audio settings (#105261)
* Add noise suppression level

* Add auto gain and volume multiplier

* Always use mock TTS dir in Wyoming tests

* More tests
2023-12-07 17:02:55 -05:00
Jan-Philipp Benecke d1aa690c24
Migrate non-component tests to use freezegun/freezer (#105142) 2023-12-07 22:58:09 +01:00
Joost Lekkerkerker 00e87b9dff
Migrate Gree to has entity name (#104739)
* Migrate Gree to has entity name

* Migrate Gree to has entity name
2023-12-07 22:47:52 +01:00
On Freund c4d77877d2
Fix update of uncategorized OurGroceries items (#105255)
* Fix update of uncategorized OurGroceries items

* Address code review comments
2023-12-07 22:11:08 +01:00
Jan-Philipp Benecke 8a4b761c78
Use freezegun in cert_expiry tests (#105125) 2023-12-07 21:55:37 +01:00
Michael Hansen 4c4ad9404f
Don't return TTS URL in Assist pipeline (#105164)
* Don't return TTS URL

* Add test for empty queue
2023-12-07 15:28:04 -05:00
Jan-Philipp Benecke 6666b796f2
Migrate auth tests to use freezegun (#105243) 2023-12-07 21:18:10 +01:00
G Johansson 2daa94b600
Fix check_date service in workday (#105241)
* Fix check_date service in workday

* Add test
2023-12-07 20:04:39 +01:00