Commit graph

19514 commits

Author SHA1 Message Date
Simone Chemelli f77e4b24e6
Code quality for Vodafone tests (#109078)
vodafone pylance fixes
2024-01-31 13:15:26 +01:00
Jan Bouwhuis dcd677fea8
Make google_assistant report_state test timezone aware (#109200) 2024-01-31 13:12:26 +01:00
Michael 30c5baf522
Add configflow to Proximity integration (#103894)
* add config flow

* fix tests

* adjust and fix tests

* fix tests

* config_zones as fixture

* add config flow tests

* use coordinator.async_config_entry_first_refresh

* use entry.entry_id for hass.data

* fix doc string

* remove unused unit_of_measurement string key

* don't store friendly_name, just use self.name

* abort on matching entiry

* break out legacy setup into seperate function

* make tracked entites required

* move _asnyc_setup_legacy to module level

* use zone name as config entry title

* add entity_used_in helper

* check entry source if imported

* create repair issue for removed tracked entities

* separate state change from registry change event handling

* migrate unique ids after tracked entity renamed

* use full words for the variable names

* use defaultdict

* add test

* remove unnecessary if not in check

* use unique_id of tracked entity

* use the entity registry entry id

* Apply suggestions from code review

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-31 12:47:23 +01:00
Brandon Rothweiler a3352ce457
Minor fixes to A. O. Smith integration (#107421) 2024-01-31 11:22:25 +01:00
Mandar Patil 60fbb8b698
Add session energy sensor for Tesla Wall Connector (#102635)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-31 11:00:04 +01:00
Manuel Dipolt 0c83fd0897
Add romy vacuum integration (#93750)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Allen Porter <allen.porter@gmail.com>
2024-01-31 10:48:44 +01:00
Steven B f725258ea9
Add coordinator to ring integration (#107088) 2024-01-31 10:37:55 +01:00
Christopher Fenner 7e3a459c2f
Add test case for binary sensors in ViCare (#108769)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-01-31 09:30:51 +01:00
Robert Resch 01df5f9cab
Add Ecovacs button entities (#109189) 2024-01-31 09:00:43 +01:00
Raman Gupta 9ed50d8b0c
Add last seen sensor for zwave_js devices (#107345) 2024-01-31 01:17:43 -05:00
Josh Pettersen b629ad9c3d
Add individual battery banks as devices (#108339) 2024-01-30 19:03:01 -10:00
J. Nick Koston 9c22226fed
Ensure bluetooth auto recovery does not run in tests (#109163)
If time was moved forward too much the scanner would try to auto recover
2024-01-30 23:48:05 -05:00
Josh Pettersen 961a1c4d00
Change the suggested energy units to kWh (#109184)
* Change the suggested energy units to kWh since the practical value is pretty large.

* Fix unit tests
2024-01-30 23:40:05 -05:00
Raman Gupta b8c9da4705
Add icon and state translations for zwave_js sensors (#109186) 2024-01-30 23:38:27 -05:00
David F. Mulcahey 3115af1041
Add update platform to ZHA (bumps zigpy to 0.61.0) (#107612)
* stub out zha update entity

* update matcher

* updates based on assumptions / conversation

* hook into current installed version

* post rebase cleanup

* incorporate zigpy changes

* fix async_setup_entry

* fix sw_version

* make ota work with config diagnostic match

* fix version format

* sync up with latest Zigpy changes

* fix name attribute

* disable ota providers for tests

* update device list

* review comment

* add current_file_version to Ota ZCL_INIT_ATTRS

* updates to update and start tests

* get installed version from restore data

* better version handling

* remove done todo notes

* reorganize test

* move image notify to cluster handler

* add test for manual update check

* firmware update success test

* coverage

* use zigpy defs

* clean up after rebase

* bump Zigpy

* cleanup from review comments

* fix busted F string

* fix empty error

* move inside check

* guard zigbee network from bulk check for updates
2024-01-30 22:34:48 -05:00
Jan Bouwhuis 320bf53f75
Add OnOff trait for climate entities in google_assistant (#109160) 2024-01-30 21:27:36 -05:00
Caius-Bonus a7a41e54f6
Add ZHA ZCL thermostat entities (#106563) 2024-01-31 03:26:19 +01:00
Franck Nijhof 82e1ed43f8
Migrate Tuya integration to new sharing SDK (#109155)
* Scan QR code to log in And Migrate Tuya integration to new sharing SDK (#104767)

* Remove non-opt-in/out reporting

* Improve setup, fix unload

* Cleanup token listner, remove logging of sensitive data

* Collection of fixes after extensive testing

* Tests happy user config flow path

* Test unhappy paths

* Add reauth

* Fix translation key

* Prettier manifest

* Ruff format

* Cleanup of const

* Process review comments

* Adjust update token handling

---------

Co-authored-by: melo <411787243@qq.com>
2024-01-30 21:22:22 -05:00
Jan Bouwhuis 712ba2fdca
Add alexa PowerController on enabled features for climate entities (#109174)
Depend alexa PowerController on enabled features for climate entities
2024-01-30 20:38:32 -05:00
Duco Sebel 41fdcce226
Bumb python-homewizard-energy to 4.3.0 (#109131) 2024-01-31 01:50:00 +01:00
Erik Montnemery fcfacaaabd
Store preferred border agent extended address for each thread dataset (#109065) 2024-01-31 00:57:46 +01:00
Robert Resch 09a89cd3e9
Fix Ecovacs duration sensors (#108868) 2024-01-31 00:43:39 +01:00
Jack 2909e1c4fe
Fix ZHA handling of power factor ElectricalMeasurement attribute sensor (#107641)
* Correct handling of power_factor ElectricalMeasurement attribute

The Zigbee Cluster Library defines PowerFactor as an int8 with value supported from -100 to 100.

Currently the zha sensor handler attempts to apply the ac_power_divisor and ac_power_multiplier formatters against the attribute value, the spec outlines that this should not be the case.

The impact of the current code is that quirks not using the default values of 1 are multiplying/dividing
power and power factor values prior to updating the cluster attribute.

This results in either a non-conformant power_factor e.g. the value was multiplied by 10 so that an ac_power_divider of 10 could be used, or the power readings sacrificing a point of measurement for lower readings.

Two quirks currently use this workaround:
 * ts0601_din_power.py
 * ts0601_rcbo.py

* Update ZHA Metering formatter to perform None check on _div_mul_prefix

To address feedback:
https://github.com/home-assistant/core/pull/107641#discussion_r1447547054

* _div_mul_prefix needs self reference

* Simplify None check for _div_mul_prefix

Co-authored-by: Joakim Plate <elupus@ecce.se>

* Updates to formatting and CI test typing fix

* Use ' | ' in place of Union

* Add tests for power_factor sensor

---------

Co-authored-by: Joakim Plate <elupus@ecce.se>
2024-01-30 23:11:18 +01:00
Robert Resch b409933d19
Add DurationConverter (#108865)
* Add DurationConverter

* Update withings snapshots

* Add sensor test

* Fix tests

* Update snapshots after #108902 was merged
2024-01-30 23:08:12 +01:00
TheJulianJES 0b09ffbcde
Bump zha-quirks to 0.0.110 (#109161)
* Bump zha-quirks to 0.0.110

* Reflect removal of `IasWd` cluster for Heiman sensor in tests
2024-01-30 16:39:59 -05:00
Simone Chemelli d4c91bd0b7
Add a repair issue for Shelly devices with unsupported firmware (#109076)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-30 10:59:33 -10:00
Martin Hjelmare e1576d5998
Handle deprecated cloud tts voice (#109124)
* Handle deprecated cloud tts voice

* Add test

* Fix test logic

* Add breaks in ha version

* Adjust translation string
2024-01-30 21:58:16 +01:00
puddly 758e7489f1
Fix ZHA cover inversion handling missing attributes (#109151)
* Allow `window_covering_type` to be `None`

* Create a `window_covering_mode` attribute and simplify inversion switch

* Revert "Create a `window_covering_mode` attribute and simplify inversion switch"

This reverts commit 048d649b4d.

* check both config status and mode

* coverage

---------

Co-authored-by: David Mulcahey <david.mulcahey@icloud.com>
2024-01-30 15:51:38 -05:00
J. Nick Koston a22244707b
Create an issue when database backups fail because the system runs out of resources (#109020) 2024-01-30 10:23:58 -10:00
Simone Chemelli 6174aa4e59
Remove Shelly RSSI sensor if Wi-FI is not configured (#108390)
* Remove Shelly RSSI sensor if Wi-FI is not configured

* fix tests
2024-01-30 21:18:54 +01:00
Jack 4ec3a17ed0
Add missing ZHA metering device types (#109126)
* Update smartenergy.py metering_device_type enums

* Added missing enum 127

* Enum 127 is also electric metering type

* Meter type constants and status enums in smartenergy cluster handler

Addresses 
https://github.com/home-assistant/core/pull/109126#discussion_r1471383887

Whilst I have the code open I've also added status handlers for the non-electrical meter types.

* New tests for different metering device type statuses
2024-01-30 15:09:15 -05:00
Jan Bouwhuis 04f0128a1c
Simplify MQTT device triggers in automations (#108309)
* Simplify MQTT device trigger

* Add test non unique trigger_id

* Adjust deprecation warning

* Make discovery_id optional

* refactor double if

* Improve validation, add tests and deprecation comments

* Avoid breaking change

* Inmprove error message

* Match on discovery_id instead of discovery_info

* Revert an unrelated change

* follow up comments

* Add comment and test on device update with non unique trigger

* Update homeassistant/components/mqtt/device_trigger.py

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

* Update homeassistant/components/mqtt/device_trigger.py

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

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-01-30 20:50:39 +01:00
Ernst Klamer 70ee6a16ee
Add event entity to Xiaomi-BLE integration (#108811) 2024-01-30 08:42:56 -10:00
Jan Bouwhuis 6023980c2e
Set TURN_ON and TURN_OFF feature on MQTT climate entities (#109146) 2024-01-30 19:35:46 +01:00
Robert Resch 7d2c6a1bb6
Add check for valid initial_suggested_unit (#108902)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-01-30 18:55:59 +01:00
Robert Resch c363edad4a
Update Ecovacs binary sensor keys (#109145) 2024-01-30 18:55:37 +01:00
G Johansson cac0d07549
Add TURN_ON/OFF ClimateEntityFeature for smartthings (#108979) 2024-01-30 17:56:52 +01:00
Joost Lekkerkerker 360697836f
Add support for custom integrations in Analytics Insights (#109110) 2024-01-30 17:52:28 +01:00
Robert Resch d752ab3aa4
Update climate snapshots to fix CI (#109141) 2024-01-30 16:54:41 +01:00
G Johansson bc720b48b4
Add TURN_OFF and TURN_ON to ClimateEntityFeature (#101673)
* Add ClimateEntityFeature.TURN_OFF

* Fixes

* Fixes

* wording

* Change to services

* Fixing

* Fixing

* Last bits

* Review comments

* Add hvac_modes checks

* Fixes

* Add tests

* Review comments

* Update snapshots

* balboa

* coolmaster

* ecobee

* mqtt

* nest

* plugwise

* smarttub

* whirlpool

* zwave_js

* fix test climate

* test climate

* zwave

* nexia

* nuheat

* venstar

* tado

* smartthings

* self.hvac_modes not None

* more tests

* homekit_controller

* homekit controller snapshot
2024-01-30 15:07:47 +01:00
Joakim Plate cece117c93
Flow rate unit conversions and device class (#106077)
* Add volume flow rate conversions

* Add missing translations

* Adjust liter unit and add gallons per minute

* Adjust to min instead of m for minutes

* Add matching class for number

* Add some tests for number and sensor platform

* Add deprecated constants

* Add explicit list of flow rate for check

This reverts commit 105171af31.
2024-01-30 15:01:08 +01:00
David F. Mulcahey 92795fecf5
Clean up ZHA cover entity and add support for inverting cover entities derived from the window covering cluster (#108238) 2024-01-30 13:59:00 +01:00
Simone Chemelli f7909ee34a
Clean up Fritz options flow (#109111)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-01-30 13:19:40 +01:00
Michael Hansen 9752e70675
Intents package combines sentences/responses per language (#109079) 2024-01-30 12:38:29 +01:00
Robert Resch 6fdad44941
Improve invalid error messages in the config flows (#108075) 2024-01-30 12:24:19 +01:00
Brett Adams 128700d41b
Fix tessie tests (#109113)
* Fix device tracker test

* Snapshot cleanup
2024-01-30 11:34:30 +01:00
Simone Chemelli 09fb043f65
Add configure option to Vodafone Station for consider home (#108594)
* Add configure option to Vodafone Station for consider home

* add test

* improve tests

* reload on option change
2024-01-30 10:28:01 +01:00
Raman Gupta 821d273e4d
Add support for ignoring zwave_js device config file changes (#108990)
* Add support for ignoring zwave_js device config file changes

* mistake

* fixes

* Small tweaks and add/update tests
2024-01-30 10:16:08 +01:00
Allen Porter 1069693292
Update calendar tests to use mock entities instead of demo platform (#105317)
* Update calendar tests to use mock entities instead of demo platform

* Add Generator type to fixture

* Fix generator syntax

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-30 06:36:14 +01:00
Raman Gupta 18d395821d
Don't remove zwave_js devices automatically (#98145) 2024-01-29 21:36:41 -05:00
Simone Chemelli 03df4fde97
Code quality for Comelit tests (#109077) 2024-01-30 00:17:55 +01:00
J. Nick Koston 825fed8319
Bump aiohttp to 3.9.3 (#109025)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-29 23:15:18 +01:00
Paul Bottein 02ac985120
Use right initial attribute value for demo climate (#108719) 2024-01-29 21:46:04 +01:00
Erik Montnemery 7ef3ed6107
Fix light color mode in govee_light_local (#108762) 2024-01-29 21:40:21 +01:00
Robert Svensson f1392f8519
Try to reconnect to UniFi on 403 (#109067) 2024-01-29 21:39:15 +01:00
Teemu R 6f88cd3273
Bump python-kasa to 0.6.2 (#109064) 2024-01-29 10:19:44 -10:00
Jan-Philipp Benecke 80bfd4cef7
Raise ValueError when last_reset set and not total state class (#108391)
* Raise ValueError when last_reset set and not total state class

* Fix test

* Break long string into smaller ones
2024-01-29 20:21:35 +01:00
Joost Lekkerkerker aefae5bdae
Prepare Analytics insights for more sensors (#108976) 2024-01-29 19:34:53 +01:00
Martijn van der Pol b386960661
Add default parameter to as_datetime template function/filter (#107229)
* improve as_datetime

* Improve `as_datetime` Jinja filter/function

* review

* resolve more review items

* change test for datetime input

* Update docstring

* update docstrings for tests

* remove whitespace

* only_default

* Update do string and comment

* improve comment

* Adjust comment

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-29 18:05:44 +01:00
kpine be8af7bea3
Fix zwave_js set_config_parameter WS api regression (#109042) 2024-01-29 18:04:05 +01:00
karwosts f456e3a071
Allow delete_all_refresh_tokens to delete a specific token_type (#106119)
* Allow delete_all_refresh_tokens to delete a specific token_type

* add a test

* minor string change

* test updates

* more test updates

* more test updates

* fix tests

* do not delete current token

* Update tests/components/auth/test_init.py

* Update tests/components/auth/test_init.py

* Option to not delete the current token

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-29 17:09:23 +01:00
Simone Chemelli 075dab250e
Code quality for Shelly tests (#109054)
* Code quality for Shelly tests

* clean-up
2024-01-29 16:02:51 +01:00
Cyrill Raccaud f82fb63dce
Add bring integration (#108027)
* add bring integration

* fix typings and remove from strictly typed
- wait for python-bring-api to be ready for strictly typed

* make entity unique to user and list
- before it was only list, therefore the same list imported by two users would have failed

* simplify bring attribute

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

* cleanup and code simplification

* remove empty fields in manifest

* __init__.py aktualisieren

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

* __init__.py aktualisieren

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

* strings.json aktualisieren

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

* streamline async calls

* use coordinator refresh

* fix order in update call and simplify bring list

* simplify the config_flow

* Update homeassistant/components/bring/manifest.json

Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>

* add unit testing for __init__.py

* cleanup comments

* use dict instead of list

* Update homeassistant/components/bring/todo.py

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

* clean up

* update attribute name

* update more attribute name

* improve unit tests

- remove patch and use mock in conftest

* clean up tests even more

* more unit test inprovements

* remove optional type

* minor unit test cleanup

* Update .coveragerc

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
2024-01-29 15:08:11 +01:00
Duco Sebel d631cad07f
Add new sensors exposed by HomeWizard kWh meter (#108850)
* Add new sensors exposed by kWh meter

* Add entity translation placeholders

* Fix Mypy issue

* Adjusts tests

* Remove suggested display precision for disabled-by-default sensors

* Update test-snapshots

* Update snapshots
2024-01-29 14:42:16 +01:00
Marc Mueller 030727b078
Remove deprecated event_loop fixtures in tests (#109048) 2024-01-29 14:24:58 +01:00
Duco Sebel dbc568cd53
Simplify HomeWizard sensor names (#108854)
* Simplify HomeWizard sensor names

* Simplify translations even more by using default device_class names
2024-01-29 13:24:00 +01:00
Isak Nyberg 789055fd68
Fix Permobil eula error (#107290)
* bump mypermobil to 0.1.8

* add eula check in config flow

* Update strings.json

* add test for email code with signed eula

* fix docstring character limit

* add placeholder description for MyPermobil
2024-01-29 12:48:55 +01:00
Christophe Gagnier 91e7e5e01a
Add binary sensors to TechnoVE integration (#108938)
* Add binary sensors to TechnoVE integration

* Add unit tests for TechnoVE binary sensors

* Implement PR feedback for TechnoVE

* Limit to appropriate sensors in TechnoVE tests

* Removed leftover code

* Implement feedback in TechnoVE PR #108938
2024-01-29 11:56:57 +01:00
Jan-Philipp Benecke 95aea1488d
Add pylint plugin to check if coordinator is placed in its own module (#108174)
* Add pylint plugin to check if coordinator is placed in its own module

* Remove unintended changes

* Remove pylint disable and let CI only fail on W,E,F

* Make check conventional

* Apply review suggestion

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

* Use option instead

* Remove pylint arguments from pre-commit

* Partially revert "Remove pylint disable and let CI only fail on W,E,F"

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-29 10:30:19 +01:00
Arie Catsman 2b33feb341
Add phase entities to Enphase Envoy (#108725)
* add phase entities to Enphase Envoy

* Implement review feedback for translation strings

* Enphase Envoy multiphase review changes

Move device name logic to separate function.
Refactor native value for phases
Use dataclasses.replace for phase entities, add on-phase to base class as well, no need for phase entity descriptions anymore

* Enphase Envoy reviewe feedback

Move model determination to library.
Revert states test for future split to sensor test.

* Enphase_Envoy use model description from pyenphase library

* Enphase_Envoy refactor Phase Sensors

* Enphase_Envoy use walrus in phase sensor

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-28 22:46:47 +01:00
G Johansson e13a34df0f
Separate fixture in Sensibo (#109000) 2024-01-28 22:43:22 +01:00
J. Nick Koston b54e282801
Remove follow symlinks support from CachingStaticResource (#109015) 2024-01-28 10:07:12 -10:00
Brett Adams b28e8a3cf0
Add tests to Teslemetry (#108884)
* Add tests

* Add partial sleep test

* Remove useless AsyncMock

* Review feedback

* Patch imports

* Fix mock_test
2024-01-28 21:04:44 +01:00
J. Nick Koston 7667024a2f
Remove extra confirmation step in tplink authenticated discovery flow (#109016)
Remove extra confirmation step in tplink discovery flow

After discovery, and manually entering credentials, we would ask
the user if they still wanted to set up the device. Instead we
now set create the config entry as soon as they enter correct
credentials as its clear that they want to proceed.
2024-01-28 20:23:07 +01:00
Erik Montnemery 8abb4e5f52
Improve display of errors with no message in script trace (#108735) 2024-01-28 19:27:14 +01:00
karwosts a2d707442a
Fix error when passing a whole number to location selector (#108952)
* Fix error when passing an integer to location selector

* fix tests

* more fix tests

* don't mutate original dict

* remove string testcase
2024-01-28 14:13:00 +01:00
Joost Lekkerkerker a793a5445f
Add options flow to Analytics Insights (#108716)
* Add options flow to Analytics Insights

* Fix options flow function
2024-01-27 22:24:35 +01:00
mkmer 019e80b204
Use version property in Blink (#108911) 2024-01-27 19:45:13 +01:00
jan iversen 3cc5ffaa4b
Replace modbus number_validator by HA standard (#108939) 2024-01-27 16:39:33 +01:00
Brett Adams 858fb1fa37
Add snapshot testing to Tessie (#108346)
* Redo Binary Sensors

* Redo Button

* Redo Climate

* Stage unfixed platforms

* Redo Cover

* Redo device tracker

* Redo lock

* Redo Media Player

* Redo Number

* Redo Select

* Redo Sensor

* Redo Switch

* Redo Update

* Fix setup_platform

* Add mixing snapshot

* Fix config flow

* Centralise entity testing

* Update snapshot

* Rename test_entities

* Fix assert_entities
2024-01-27 13:43:55 +01:00
David F. Mulcahey 950660b953
Reorganize ZHA device availability code (#108856)
* Correct ZHA device availability at startup

* don't set available property from gateway

* cleanup
2024-01-27 07:17:05 -05:00
matt7aylor dec9eb9ae4
Matter sensors for air quality measurements (#108173)
* Matter sensors for air quality measurements
Add sensors for CO2, PM1, PM2.5, PM10 and TVOC

* Add initial tests for matter air quality sensor

* Remove VOC data as requires unit extraction from cluster
2024-01-27 08:46:24 +01:00
J. Nick Koston 5dac5d5c7e
Refactor logbook helpers to reduce splits and lookups (#108933)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-01-26 20:07:24 -10:00
Michael Hansen 61c6c70a7d
Improved Assist debug (#108889)
* Differentiate builtin/custom sentences and triggers in debug

* Refactor so async_process runs triggers

* Report relative path of custom sentences file

* Add sentence trigger test
2024-01-26 23:04:45 -05:00
J. Nick Koston 0120d00081
Switch unifiprotect to use async_update_reload_and_abort helper (#108934) 2024-01-26 22:55:58 -05:00
J. Nick Koston 5177d022e8
Switch imap to use async_update_reload_and_abort helper (#108935) 2024-01-26 22:55:26 -05:00
Robert Resch b1b53ac893
Add Ecovacs image entities (#108924)
* Add Ecovacs image entities

* Fix
2024-01-26 20:33:21 +01:00
Michael d007327cf5
Deprecate legacy Proximity entity (#108730)
* deprecate proximity entity

* add test

* extend tests

* adjust strings

* make issue fixable

* use default repairflow
2024-01-26 19:04:48 +01:00
Jan Bouwhuis 7bec5ef6bc
Use unknown color_mode for MQTT json lights if color mode is not set (#108909) 2024-01-26 14:42:47 +01:00
Josef Zweck 00c2ba69f7
Add webhook support to tedee integration (#106846)
* start work on webhooks

* start work on webhooks

* use background task

* websocket improvement

* add test

* add webhook id to mock_config_entry

* some changes

* add webhook to manifest

* fix test

* reset poll timer on webhook update

* reset poll timer on webhook update

* code cleanup

* generate webhook id in config flow

* fix merge

* undo var rename

* remove

* ruff

* ruff

* only delete specific webhook

* clarify warning

* version bump

* minor improvements

* requested changes

* unregister function

* move more of unregistration logic

* test pushed data

* add comment

* Update config_flow.py

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

* ruff

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-26 10:48:16 +01:00
Joost Lekkerkerker d4ac5e492b
Add entity registry test to Withings (#108900) 2024-01-26 09:33:56 +01:00
J. Nick Koston dff5e45761
Small speed up to listing config entries in the websocket api (#108892) 2024-01-25 20:20:19 -10:00
David F. Mulcahey 3f31a76692
Apply consistent naming to ZHA cluster handler implementations (#108851)
* Apply consistent naming to ZHA cluster handler implentations

* remove import alias

* remove if statement around assert in test
2024-01-25 20:09:38 -05:00
Massimo Savazzi eb85f469e9
Add binary sensor platform to JVC Projector (#108668)
* JVC Projector Binary Sensor

* Fixed PR as per request, removed Name, removed Read_Only.

* Fixed as per Joostlek suggestions

* Update homeassistant/components/jvc_projector/coordinator.py

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

* Update homeassistant/components/jvc_projector/binary_sensor.py

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

* Added changes as per requests

* fixed docstring

* Update homeassistant/components/jvc_projector/strings.json

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

* Update homeassistant/components/jvc_projector/binary_sensor.py

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

* Added icon property to binary sensor. Removed icons.json file as not used anymore

* Fixed tests

* Added icons file

* Update homeassistant/components/jvc_projector/icons.json

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

* Update test_binary_sensor.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-25 22:49:03 +01:00
J. Nick Koston 3447e7fddb
Fix ESPHome color modes for older firmwares (#108870) 2024-01-25 10:18:53 -10:00
Jonas Fors Lellky 2b799830db
Add switch to flexit bacnet integration (#108866)
* Add platform switch to flecit_bacnet integration

* Move testing of the switch to it’s own test

* Assert correct method is called one time

* Test switch on/off error recovery

* Review comment
2024-01-25 20:59:36 +01:00
dougiteixeira 7713cf377d
Add utility meter option for the sensor to always be available (#103481)
* Adds option for the sensor to always be available

* Remove logger debug

* Add migration config entry version

* Update homeassistant/components/utility_meter/config_flow.py

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

* Update homeassistant/components/utility_meter/sensor.py

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

* Remove migration config entry version

* Change CONF_SENSOR_ALWAYS_AVAILABLE optional in CONFIG_SCHEMA

* Remove CONF_SENSOR_ALWAYS_AVAILABLE in tests

* Remove CONF_SENSOR_ALWAYS_AVAILABLE in tests

* Remove CONF_SENSOR_ALWAYS_AVAILABLE in tests

* Add option in yaml

* Update homeassistant/components/utility_meter/strings.json

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

* Update homeassistant/components/utility_meter/strings.json

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

* Changes tests

* Add test_always_available

* Use freezegun

* Update homeassistant/components/utility_meter/strings.json

---------

Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-01-25 20:46:33 +01:00
suaveolent faad9a7584
Add ConfigFlow for Lupusec (#108740)
* init support for config flow for lupusec

* correctly iterate over BinarySensorDeviceClass values for device class

* bump lupupy to 0.3.2

* Updated device info for lupusec

* revert bump lupupy for separate pr

* fixed lupusec test-cases

* Change setup to async_setup

* remove redundant check for hass.data.setdefault

* init support for config flow for lupusec

* correctly iterate over BinarySensorDeviceClass values for device class

* bump lupupy to 0.3.2

* Updated device info for lupusec

* revert bump lupupy for separate pr

* fixed lupusec test-cases

* Change setup to async_setup

* remove redundant check for hass.data.setdefault

* resolve merge error lupupy

* connection check when setting up config entry

* removed unique_id and device_info for separate pr

* changed name to friendly name

* renamed LUPUSEC_PLATFORMS to PLATFORMS

* preparation for code review

* necessary changes for pr

* changed config access

* duplicate entry check

* types added for setup_entry and test_host_connection

* removed name for lupusec system

* removed config entry from LupusecDevice

* fixes for sensors

* added else block for try

* added integration warning

* pass config to config_flow

* fix test cases for new config flow

* added error strings

* changed async_create_entry invocation

* added tests for exception handling

* use parametrize

* use parametrize for tests

* recover test

* test unique id

* import from yaml tests

* import error test cases

* Update tests/components/lupusec/test_config_flow.py

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

* fixed test case

* removed superfluous test cases

* self._async_abort_entries_match added

* lib patching call

* _async_abort_entries_match

* patch lupupy lib instead of test connection

* removed statements

* test_flow_source_import_already_configured

* Update homeassistant/components/lupusec/config_flow.py

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

* removed unique_id from mockentry

* added __init__.py to .coveragerc

---------

Co-authored-by: suaveolent <suaveolent@users.noreply.github.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-25 18:52:30 +01:00
Martin Hjelmare 53b73bd0bd
Make device tracker latitude and longitude optional (#108838)
* Make device tracker latitude and longitude optional

* Update test
2024-01-25 13:25:17 +01:00
Duco Sebel 1fa7ceede3
Use entity translations placeholders in HomeWizard (#108741)
* Adopt Entity placeholders

* Undo some snapshot changes
2024-01-25 13:15:20 +01:00
Cody C 6e59568ba3
Use feed name as entity name in GeoJSON (#108753)
* Add support for entity name in GeoJSON

Previously GeoJSON names were just the config entry ID. This is not very user friendly. Particularly so when there are many config entries and many, many entities from those same many config entries.

* Update GeoJSON tests to support entity names
2024-01-25 13:05:07 +01:00
Frank Wickström 6f81d21a35
Add Huum integration (#106420)
* Add Huum integration

* Use DeviceInfo instead of name property for huum climate

* Simplify entry setup for huum climate entry

* Don’t take status as attribute for huum climate init

* Remove unused import

* Set unique id as entity id in huum init

* Remove unused import for huum climate

* Use entry ID as unique ID for device entity

* Remove extra newline in huum climate

* Upgrade pyhuum to 0.7.4

This version no longer users Pydantic

* Parameterize error huum tests

* Update all requirements after pyhuum upgrade

* Use Huum specific naming for ConfigFlow

* Use constants for username and password in huum config flow

* Use constants for temperature units

* Fix typing and pylint issues

* Update pyhuum to 0.7.5

* Use correct enums for data entry flow in Huum tests

* Remove test for non-thrown CannotConnect in huum flow tests

* Refactor failure config test to also test a successful flow after failure

* Fix ruff-format issues

* Move _status outside of __init__ and type it

* Type temperature argument for _turn_on in huum climate

* Use constants for auth in huum config flow test

* Refactor validate_into into a inline call in huum config flow

* Refactor current and target temperature to be able to return None values

* Remove unused huum exceptions

* Flip if-statment in async_step_user flow setup to simplify code

* Change current and target temperature to be more future proof

* Log exception instead of error

* Use custom pyhuum exceptions

* Add checks for duplicate entries

* Use min temp if no target temp has been fetched yet when heating huum

* Fix tests so that mock config entry also include username and password

* Fix ruff styling issues

I don’t know why it keeps doing this. I run `ruff` locally, and then it does not complain, but CI must be doing something else here.

* Remove unneded setting of unique id

* Update requirements

* Refactor temperature setting to support settings target temparature properly
2024-01-25 12:55:55 +01:00
Brett Adams 909cdc2e5c
Add Teslemetry Integration (#108147)
* Copy Paste Find Replace

* Small progress

* wip

* more wip

* Add SSE listen and close

* More rework

* Fix coordinator

* Get working

* Bump to 0.1.3

* Push to 0.1.4

* Lots of fixes

* Remove stream

* Add wakeup

* Improve set temp

* Be consistent with self

* Increase polling until streaming

* Work in progress

* Move to single climate

* bump to 0.2.0

* Update entity

* Data handling

* fixes

* WIP tests

* Tests

* Delete other tests

* Update comment

* Fix init

* Update homeassistant/components/teslemetry/entity.py

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

* Add Codeowner

* Update coverage

* requirements

* Add failure for subscription required

* Add VIN to model

* Add wake

* Add context manager

* Rename to wake_up_if_asleep

* Remove context from coverage

* change lock to context

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

* Improving Logger

* Add url to subscription error

* Errors cannot markdown

* Fix logger

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

* rename logger

* Fix error logging

* Apply suggestions from code review

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-25 12:54:47 +01:00
Duco Sebel 0c9a30ab69
Add support for externally connected utility devices in HomeWizard (#100684)
* Backport code from #86386

* Add tests

* Remove local dev change

* Implement device class validation based on unit

* Swap sensor and externalsensor classes (based on importance)

* Use translations for external sensor entities

* Re-add meter identifier as sensor for external devices

* Add migration for Gas identifier

* Rename HomeWizardExternalIdentifierSensorEntity class

* Fix all existing tests

* Reimplement tests for extenal devices with smapshots

* Remove non-used 'None' type in unit

* Add migration test

* Clean up parameterize

* Add test to fix last coverage issue

* Fix non-frozen mypy issue

* Set device name via added EntityDescription field

* Remove device key translations for external sensors,

* Bring back translation keys

* Set device unique_id as serial number

* Remove meter identifier sensor

* Simplify external device initialization

* Adjust tests

* Remove unused gas_meter_id migration

* Remove external_devices redaction

* Remove old gas meter id sensor after migration
2024-01-25 12:51:50 +01:00
RoboMagus c54b65fdf0
Add 'last_reset' for 'total' state_class template sensor (#100806)
* Add last_reset to trigger based template sensors

* Add last_reset to state based template sensors

* CI check fixes

* Add pytests

* Add test cases for last_reset datetime parsing

* Add test for static last_reset value

* Fix ruff-format
2024-01-25 11:12:03 +01:00
J. Nick Koston 82d21136bd
Do not try to cleanup invalid config entries without an AccessoryPairingID (#108830) 2024-01-24 22:49:27 -10:00
Martin Hjelmare fabf8802f5
Fix matter color modes (#108804)
* Fix matter light color modes

* Make onoff light fixture only onoff

* Make dimmable light only a dimmable light

* Make color temp light fixture only a color temp light
2024-01-25 09:15:38 +01:00
Robert Svensson 195ef6d769
Fix lights reporting unsupported colormodes in deCONZ (#108812) 2024-01-25 08:38:57 +01:00
J. Nick Koston 0628546a0e
Add basic tests for powerview scenes (#108818) 2024-01-24 17:50:06 -10:00
J. Nick Koston d588ec8202
Fix ESPHome not fully removing entities when entity info changes (#108823) 2024-01-24 17:29:11 -10:00
John Hess 7f56330e3b
Bump thermopro-ble to 0.9.0 (#108820) 2024-01-24 17:26:58 -10:00
Michael f5d439799b
Add expiration of unused refresh tokens (#108428)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-24 13:24:22 -10:00
Robert Resch 0d22822ed0
Add Ecovacs diagnostics (#108791)
* Add Ecovacs diagnostics

* Fix test
2024-01-24 23:30:14 +01:00
Jan Bouwhuis 066692506c
Fix unhandled exception on humidifier intent when available_modes is None (#108802) 2024-01-24 22:14:15 +01:00
CR-Tech df9faeae6f
Add write_registers support for Fan Mode in modbus (#108053) 2024-01-24 20:48:55 +01:00
Martin Hjelmare 852e4c21c6
Complete device tracker entity tests (#108768) 2024-01-24 19:50:55 +01:00
Erik Montnemery 909e58066d
Fix changed_variables in automation and script traces (#108788) 2024-01-24 19:12:45 +01:00
Luke Lashley aa86d87a31
Bump python-roborock to 39.1 (#108751) 2024-01-24 19:11:39 +01:00
Erik Montnemery 9c727e5ea8
Add icon to areas (#108650) 2024-01-24 19:11:03 +01:00
Jan Bouwhuis a90d8b6a0c
Stabilize alexa discovery (#108787) 2024-01-24 18:56:21 +01:00
Robert Resch 5467fe8ff1
Add Ecovacs select entities (#108766)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-24 17:17:43 +01:00
Erik Montnemery 4b2b4ae36b
Add invert option to switch_as_x (#107535)
* Add invert option to switch_as_x

* Store invert flag in entity options

* Add options flow

* Update strings

* Add tests

* Address review comment

* Update homeassistant/components/switch_as_x/strings.json

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

* Address review comments

* Inline get_suggested which was only used once in tests

* Address review comments

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-01-24 16:35:08 +01:00
Erik Montnemery c3de193e2e
Adjust color_mode checks when lights render effects (#108737)
* Adjust color_mode checks when lights render effects

* Improve comment

* Avoid calling effect property if light does not support effects

* Fix test
2024-01-24 15:44:45 +01:00
Erik Montnemery 431e4b38ac
Improve tests of script trace (#108733) 2024-01-24 15:29:35 +01:00
Erik Montnemery 97e038eb2e
Fix light color mode in netatmo (#108759) 2024-01-24 15:29:16 +01:00
Erik Montnemery 4a2a7872fb
Fix light color mode in tplink (#108760) 2024-01-24 15:28:40 +01:00
Jack af1ba4b22f
Add ZHA metering summation received sensor (#107576)
* Add sensor for exposing Summation Received from Metering cluster

* Ruff format

* Test updates for new sensor

* Update test_sensor.py to support summation_received

* Correct report_count for smart meterning and some pylint warning fixes
2024-01-24 07:56:49 -05:00
Daniel a67113a95a
Parse template result in async_render_with_possible_json_value (#99670)
* Optionally parse templates rendered with possible json

* Remove duplicate strip

* Add tests for parsing template result
2024-01-24 12:12:28 +01:00
Markus Jacobsen 1d7e0e7fe4
Add bang_olufsen integration (#93462)
* Add bangolufsen integration

* add untested files to .coveragerc

* Simplify integration to media_player platform

* Remove missing files from .coveragerc

* Add beolink_set_relative_volume custom service
Tweaks

* Remove custom services
Remove grouping as it was dependent on custom services

* Update API to 3.2.1.150.0
Reduce and optimize code with feedback from joostlek
Tweaks

* Updated testing

* Remove unused options schema

* Fix bugfix setting wrong state

* Fix wrong initial state

* Bump API

* Fix Beosound Level not reconnecting properly

* Remove unused constant

* Fix wrong variable checked to determine source

* Update integration with feedback from emontnemery

* Update integration with feedback from emontnemery

* Remove unused code

* Move API client into dataclass
Fix not all config_flow exceptions caught
Tweaks

* Add Bang & Olufsen brand

* Revert "Add Bang & Olufsen brand"

This reverts commit 57b2722078.

* Remove volume options from setup
Simplify device checks
rename integration to bang_olufsen
update tests to pass
Update API

* Remove _device from base
Add _device to websocket

* Move SW version device update to websocket
Sort websocket variables

* Add WebSocket connection test

* Remove unused constants

* Remove confirmation form
Make discovered devices get added to Home Assistant immediately
Fix device not being available on mdns discovery
Change config flow aborts to forms with error

* Update tests for new config_flow
Add missing api_exception test

* Restrict manual and discovered IP addresses to IPv4

* Re-add confirmation step for zeroconf discovery
Improve error messages
Move exception mapping dict to module level

* Enable remote control WebSocket listener

* Update tests
2024-01-24 12:00:51 +01:00
Steven B 393dee1524
Handle IP address changes properly for tplink (#108731)
* Update device config for SETUP_RETRY and use CONF_HOST on startup

* Make entry state checks use a constant

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

* Update tests

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-24 11:24:44 +01:00
J. Nick Koston 21f646c5a7
Add LeaOne integration (#108617) 2024-01-23 22:08:20 -10:00
Duco Sebel f7b0a15aa5
Bumb python-homewizard-energy to 4.2.1 (#108738) 2024-01-24 08:31:23 +01:00
puddly 22eed5419e
Reduce log level of ZHA endpoint handler init (#108749)
* Reduce the log level of endpoint handler init failure to debug

* Reduce log level in unit test
2024-01-23 21:04:59 -05:00
Michael Hansen cffd95a015
Pause Wyoming satellite on mute (#108322)
Pause satellite on mute
2024-01-23 20:37:25 -05:00
Michael Hansen d8a1c58b12
Fix intent loading and incorporate unmatched entities more (#108423)
* Incorporate unmatched entities more

* Don't list targets when match is incomplete

* Add test for out of range
2024-01-23 20:31:57 -05:00
Erik Montnemery 823f268054
Randomize thread network names (#108302)
* Randomize thread network names

* Use PAN ID as network name suffix

* Apply suggestions from code review

Co-authored-by: Stefan Agner <stefan@agner.ch>

* Update tests

* Format code

* Change format of network name again

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2024-01-23 22:58:28 +01:00
jan iversen d8f16c14ab
Get modbus coverage back to 100% (#108734)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-23 21:50:25 +01:00
Robert Resch 37f5c75752
Add sensors to Ecovacs (#108686)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-23 21:17:18 +01:00
Erik Montnemery 069c2b7e38
Improve tests of script trace (#108717)
* Improve tests of script trace

* Update tests after rebase

* Apply suggestions from code review

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

* Apply suggestions from code review

* Adjust

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-23 19:53:09 +01:00
Jan-Philipp Benecke 13887793a7
Remove home_plus_control and mark as virtual integration supported by Netatmo (#107587)
* Mark home_plus_control a virtual integration using Netatmo

* Apply code review suggestion

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

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2024-01-23 16:18:03 +01:00
mkmer f3b1f47d34
Return PRESET_NONE in Honeywell (#108599)
* Return PRESET_NONE

* format preset_hold

* Address Hold in tests

* Add translations
2024-01-23 15:57:55 +01:00
Erik Montnemery 9bff039d17
Add set_conversation_response script action (#108233)
* Add set_conversation_response script action

* Update homeassistant/components/conversation/trigger.py

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

* Revert accidental change

* Add test

* Ignore mypy

* Remove incorrect callback decorator

* Update homeassistant/helpers/script.py

* Add test with templated set_conversation_response

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-01-23 09:13:42 -05:00
Dave Leaver e3a73c12bc
Add airtouch5 (#98136)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-01-23 14:49:47 +01:00
G Johansson 65581e94ea
Add config flow for Time & Date (#104183)
Co-authored-by: Erik <erik@montnemery.com>
2024-01-23 12:18:31 +01:00
Michael eaa32146a6
Add sensor platform to Proximity (#101497)
* add sensor platform

* transl. of distance already covered by dev.class

* add untested files to .coveragerc

* add missing state translations

* remove translation key for distance sensor

* proximity entity do not use HA number system

* fix

* extend tests

* make const final to be usable as key for TypedDict

* remove proximity from .coveragerc

* replace typeddict by simple dict definition

* make black happy

* rework to create proximity sensor for each tracked entity and always recalculate all entites

* apply review comments

* move direction of travel calc out of the loop

* make direction of travel an enum sensor

* remove unique_id from sensors

* don't set distance=0 when in monitored zone

* set None when direction is unknown

* keep distance 0 in case arrived for legacy entity

* exclude from nearest when in ignored zone

* keep distance=0 when arrived

* use description name for entity name

* remove uneeded typing

* uses consistent variable name

* fix debug messages

* use entity_id as loop var

* rename device_state to tracked_entity_state

* correct MRO for sensor entity classes
2024-01-23 10:56:02 +01:00
Joost Lekkerkerker d9f1450ee6
Add Homeassistant Analytics Insights integration (#107634)
* Add Homeassistant Analytics integration

* Add Homeassistant Analytics integration

* Add Homeassistant Analytics integration

* Fix feedback

* Fix test

* Update conftest.py

* Add some testcases

* Make code clear

* log exception

* Bump python-homeassistant-analytics to 0.2.1

* Bump python-homeassistant-analytics to 0.3.0

* Change domain to homeassistant_analytics_consumer

* Add integration name to config flow selector

* Update homeassistant/components/homeassistant_analytics_consumer/manifest.json

Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>

* Fix hassfest

* Apply suggestions from code review

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

* Bump python-homeassistant-analytics to 0.4.0

* Rename to Home Assistant Analytics Insights

* Update homeassistant/components/analytics_insights/config_flow.py

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

* Update homeassistant/components/analytics_insights/manifest.json

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

* Rename to Home Assistant Analytics Insights

* add test

* Fallback to 0 when there is no data found

* Allow to select any integration

* Fix tests

* Fix tests

* Update tests/components/analytics_insights/conftest.py

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

* Update tests/components/analytics_insights/test_sensor.py

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

* Fix format

* Fix tests

---------

Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-01-23 10:32:31 +01:00
Koen van Zuijlen acd07b4826
Fix for justnimbus integration (#99212)
* Fix for justnimbus integration

* Fixed tests and moved const

* fix: added reauth flow

* fix: fixed reauth config flow

* chore: added config_flow reauth test

* chore: Processed PR feedback

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-01-23 08:56:11 +01:00
G Johansson f9a4840ce2
Group sensor calculate attributes (#106972)
* Group sensor calculate attributes

* Use entity helpers

* Fix sensor tests

* Test change of uom

* Add tests and fix UoM issue

* Fix test

* Fix state class

* repair and logs

* delete issues

* pass through hass

* Update descriotion text to be more descriptive

* Comments

* Add pr to comment

* fix if in updating

* Fix test valid units

* Fix strings

* Fix issues
2024-01-23 08:16:51 +01:00
J. Nick Koston 2eea658fd8
Convert getting and removing access tokens to normal functions (#108670) 2024-01-22 20:51:33 -10:00
Christophe Gagnier 4358c24edd
Add zeroconf to TechnoVE integration (#108340)
* Add zeroconf to TechnoVE integration

* Update homeassistant/components/technove/config_flow.py

Co-authored-by: Teemu R. <tpr@iki.fi>

* Update zeroconf test to test if update is called.

When a station is already configured and it is re-discovered through zeroconf, make sure we don't call its API for nothing.
2024-01-23 06:32:42 +01:00
J. Nick Koston 7c86ab14c3
Refactor service enumeration methods to better match existing use cases (#108671) 2024-01-22 14:21:17 -10:00
J. Nick Koston f6bc5c98b3
Handle tplink credential change at run time (#108692) 2024-01-22 13:30:21 -10:00
Jan-Philipp Benecke 0b79504cf0
Extend config entry update/abort helper to also update unique id (#108681)
* Extend config entry update/abort helper to also update unique id

* Move kwarg to end

* Make additionals kwargs only
2024-01-22 23:01:55 +01:00
J. Nick Koston 07926660bc
Use new config entry update/abort helper in isy994 (#108678)
Use new config entry update/abort helper in isy994

uses the new helper from https://github.com/home-assistant/core/pull/108034
2024-01-22 22:33:49 +01:00
J. Nick Koston 4378a171b2
Use new config entry update/abort helper in yalexs_ble (#108675)
Use new config entry update/abort helper in yalexs_ble

uses the new helper from https://github.com/home-assistant/core/pull/108034
2024-01-22 22:25:48 +01:00
Jan-Philipp Benecke 4760114408
Fix flaky sensibo test (#108669) 2024-01-22 21:47:28 +01:00
Brett Adams e1fd5e83a7
Add time to charge sensor to Tessie (#108342)
* Add time to charge and type checking

* Revert drive_state_shift_state change

* Use original name

* Use function instead of lambda

* Update homeassistant/components/tessie/sensor.py

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

* Fix callback

* Avoid having to test None

* Go back to if

* Use minutes instead of hours

---------

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
2024-01-22 21:45:08 +01:00
Joost Lekkerkerker 21009bef02
Add icon translations to Airly (#108404)
* Add icon translations to Airly

* Fix test

* Fix tests
2024-01-22 21:17:04 +01:00
Joost Lekkerkerker e47ed16980
Use snapshot testing in Airly sensor (#108608)
* Use snapshot testing in Airly sensor

* Apply suggestions from code review

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

* Fix tests

---------

Co-authored-by: Robert Resch <robert@resch.dev>
2024-01-22 20:59:24 +01:00
Michael 3d1751bdfa
Prevent runtime issue during entity registration in coordinator of AVM Fritz!Tools (#108667)
prevent dictionary changed size during iteration
2024-01-22 14:26:46 -05:00
Franck Nijhof 80207835d7
Move core fundamental components into bootstrap (#105560)
Co-authored-by: Erik <erik@montnemery.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-22 20:09:48 +01:00
Jan-Philipp Benecke 988d72b8b6
Add helper function to update and reload config entry to config flow (#108034)
* Add helper function to update and reload config entry to config flow

* Use async_create_task

* Remove await

* Reload only when update & add task name

* Rename function
2024-01-22 17:40:20 +01:00
Martin Hjelmare e086cd9fef
Add cloud tts entity (#108293)
* Add cloud tts entity

* Test test_login_view_missing_entity

* Fix pipeline iteration for migration

* Update tests

* Make migration more strict

* Fix docstring
2024-01-22 17:24:15 +01:00
Robert Resch 881872fdb4
Add binary_sensor to Ecovacs (#108544) 2024-01-22 13:36:26 +01:00
Jan-Philipp Benecke 09be3ffc29
Add icon translations to WLED (#108604) 2024-01-22 09:04:37 +01:00
J. Nick Koston fb62b6f01e
Fix unifi test_tracked_clients test (#108638)
Fix unifi test_tracked_clients client

This test relied on the sensor platform getting set up and creating
the device before the device_tracker platform was setup since the
device_tracker platform will disable the entity because there is
not matching device entry for it via

4ee6735cbb/homeassistant/components/device_tracker/config_entry.py (L336)

There is no guarantee the sensor platform will get set up before
the device tracker platform so the test was subject to a race
where it would fail if the device tracker platform was setup first
2024-01-22 08:35:24 +01:00
J. Nick Koston 8d4a1f475e
Bump habluetooth to 2.3.1 (#108628) 2024-01-21 18:39:17 -10:00
Aaron Godfrey 71e636572f
Send recurrence data when updating a task in todoist (#108269)
* Send recurrence data when updating a task in todoist

* Update tests/components/todoist/test_todo.py

Co-authored-by: Allen Porter <allen.porter@gmail.com>

* Move logic into _task_api_data.

* Add comment about sending potentinally stale data.

---------

Co-authored-by: Allen Porter <allen.porter@gmail.com>
2024-01-21 15:09:08 -08:00
Erik Montnemery e90b42d3d0
Fix FlowHandler show progress (#108586) 2024-01-21 22:40:48 +01:00
Joost Lekkerkerker 883711fb35
Add icon translations to Withings (#108385)
* Add icon translations to Withings

* Add icon translations to Withings

* Add icon translations to Withings

* Add icon translations to Withings

* Add icon translations to Withings
2024-01-21 21:34:44 +01:00
Jan-Philipp Benecke 4d5a511001
Add icon translations to co2signal (#108611) 2024-01-21 21:23:11 +01:00
Jonas Fors Lellky 702529627e
Add missing property in flexit bacnet test (#108606)
Add missing property on mocked device

Also update the snapshot
2024-01-21 20:56:16 +01:00
J. Nick Koston 6525dad57a
Add bthome event platform (#108268)
Co-authored-by: Ernst Klamer <e.klamer@gmail.com>
2024-01-21 08:17:55 -10:00
Steven B 9b3d3b3b2d
Add authentication to tplink integration for newer devices (#105143)
* Add authentication flows to tplink integration to enable newer device protocol support

* Add websession passing to tplink integration discover methods

* Use SmartDevice.connect()

* Update to use DeviceConfig

* Use credential hashes

* Bump python-kasa to 0.6.0.dev0

* Fix tests and address review comments

* Add autodetection for L530, P110, and L900

This adds mac address prefixes for the devices I have.
The wildcards are left quite lax assuming different series may share the same prefix.

* Bump tplink to 0.6.0.dev1

* Add config flow tests

* Use short_mac if alias is None and try legacy connect on discovery timeout

* Add config_flow tests

* Add init tests

* Migrate to aiohttp

* add some more ouis

* final

* ip change fix

* add fixmes

* fix O(n) searching

* fix O(n) searching

* move code that cannot fail outside of try block

* fix missing reauth_successful string

* add doc strings, cleanups

* error message by password

* dry

* adjust discovery timeout

* integration discovery already formats mac

* tweaks

* cleanups

* cleanups

* Update post review and fix broken tests

* Fix TODOs and FIXMEs in test_config_flow

* Add pragma no cover

* bump, apply suggestions

* remove no cover

* use iden check

* Apply suggestions from code review

* Fix branched test and update integration title

* legacy typing

* Update homeassistant/components/tplink/__init__.py

* lint

* Remove more unused consts

* Update test docstrings

* Add sdb9696 to tplink codeowners

* Update docstring on test for invalid DeviceConfig

* Update test stored credentials test

---------

Co-authored-by: Teemu Rytilahti <tpr@iki.fi>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-21 16:25:12 +01:00
Jan-Philipp Benecke fcaa2fcf03
Make remaining WLED entities translatable (#108534) 2024-01-21 13:44:32 +01:00
Jan Rieger 969ee5dd9f
Add icon translation to Jellyfin (#108559) 2024-01-21 13:30:03 +01:00
Josef Zweck 5c0a67a3d2
Add icon translations for lamarzocco (#108569)
icon translations
2024-01-21 13:26:28 +01:00
Jonas Fors Lellky ed270f558a
Add binary sensors to flexit_bacnet integration (#108571)
* Adds binary sensors to flexit_bacnet integration

* Review comments

* Removes binary sensor for electric heater

Will add switch or service later
2024-01-21 12:35:21 +01:00
Jonas Fors Lellky 7c86ea7e16
Add sensors to the flexit_bacnet integration (#108297)
* Adds sensors to the flexit_bacnet integration

* Add one platform at a time

* Removes commented out code

And restores attributes that are needed

* Review changes

* More review fixes

* Adds translations for the flexit_bacnet sensors

* Review comments

* Adds test for flexit_bacnet sensor

* Refactors the sensor test

* Review comment

* Review comment

* Review comments
2024-01-21 12:04:46 +01:00
J. Nick Koston d885bf886a
Ensure button platform does not restore unavailable state (#108316) 2024-01-21 01:04:13 -10:00
J. Nick Koston ec15b0def2
Always load auth storage at startup (#108543) 2024-01-20 16:16:43 -10:00
Florian Kisser b5bb97c856
Fix zha illuminance measured value mapping (#108547) 2024-01-20 20:37:13 -05:00
Franck Nijhof e71efa0e2b
Add icon translations to HomeWizard Energy (#108506)
* Add icon translations to HomeWizard Energy

* Update snapshots
2024-01-20 14:14:48 -05:00
Jan-Philipp Benecke c2820e3cde
Use right state class for volume and timestamp sensor in bthome (#107675) 2024-01-20 16:03:46 +01:00
Erik Montnemery 1cb5bbf865
Fix empty files included by !include_dir_named (#108489)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-20 15:12:32 +01:00
Franck Nijhof 4a824284d6
Mark flaky fritz update test as xfail (#108447) 2024-01-20 08:51:23 +01:00
J. Nick Koston 52b5d2e370
Avoid json encoder default fallback when serializing config (#108360)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-01-19 19:22:17 -10:00
J. Nick Koston 3184d3b168
Bump thermopro-ble to 0.8.0 (#108319) 2024-01-19 17:56:35 -10:00
Franck Nijhof 01372024f5
Add icon translations support (#103294)
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
2024-01-19 16:56:56 +01:00
Robert Resch ed449a5abd
Add support for MQTT based ecovacs vacuums (#108167)
* Add support for MQTT based ecovacs vacuums

* renames

* Add init import test

* bump deebot-client

* Translate continent options

* Apply suggestions from code review

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

* Remove continent

* use ServiceValidationError

* Small refactoring

* Simplify

* Fix tests

* Enable strict typing for ecovacs

* Apply suggestions from code review

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

* Implement suggestions

* improve test_async_setup_import

* Implement suggestions

* Update homeassistant/components/ecovacs/config_flow.py

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-19 16:52:30 +01:00
Kevin Stillhammer 384b22c777
Expose TimeoutError during google_travel_time config_flow (#108179)
Expose TimeoutError during config_flow
2024-01-19 15:26:26 +01:00
Franck Nijhof cdf3c07488
Add icon to entity registry list for display (#108313) 2024-01-19 15:11:27 +01:00
Erik Montnemery 3f5f1bc2f6
Fix homekit_controller test (#108375) 2024-01-19 13:05:55 +01:00
Marc Mueller bc2acb3c0e
Improve ffmpeg* typing (#108092) 2024-01-19 08:46:34 +01:00
Kostas Chatzikokolakis 6e8d491dae
Add iBeacon UUID allowlist (#104790) 2024-01-18 13:06:11 -10:00
Steve Easley a670ac25fd
Fix remote control codes for jvc_projector (#108253)
Update dependency to add/fix remote codes
2024-01-18 23:36:57 +01:00
J. Nick Koston c399cab427
Small speed up to checking core state (#107845) 2024-01-18 08:41:32 -10:00
Brett Adams 32b0bf6b4e
Improve coordinator logic in Tessie to allow sleep (#107988)
* Poll status before state

* Tests
2024-01-18 17:40:36 +01:00
Erik Montnemery cdb798bec0
Don't always set first thread dataset as preferred (#108278)
* Don't always set first thread dataset as preferred

* Update tests

* Make clarifying comments clearer

* Call asyncio.wait with return_when=ALL_COMPLETED

* Update otbr test

* Update homeassistant/components/thread/dataset_store.py

Co-authored-by: Stefan Agner <stefan@agner.ch>

* Update homeassistant/components/thread/dataset_store.py

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2024-01-18 16:32:29 +01:00
Jonas Fors Lellky bfe21b33f0
Add coordinator to Flexit bacnet (#108295)
* Adds coordinator and base entity class

* Patch the coordinator

* Adds device property to base class

And refactors accordingly

* Use const instead of string

* Moves _attr_has_entity_name to base entity

* Argument as positional

* Use device_id from init
2024-01-18 15:45:56 +01:00