Commit graph

19514 commits

Author SHA1 Message Date
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
Joost Lekkerkerker c4f033e61c
Add test for failed initialization in Flexit BACnet (#108294) 2024-01-18 14:55:44 +01:00
Jonas Fors Lellky 7d5a672ed1
Add tests to flexit_bacnet integration (#108291)
* Add fixture for update method

* Mock flexit_bacnet

* Adds test for climate

* Adds snapshot testing

* Adds test for init, refactor test for config flow
2024-01-18 14:37:43 +01:00
Josef Zweck 83e0a7528d
Add diagnostics to La Marzocco (#108240)
* add diagnostics

* make firmware section easier to read
2024-01-18 10:57:41 +01:00
J. Nick Koston 26cc6a5bb4
Add state caching to button entities (#108272) 2024-01-18 08:53:55 +01:00
J. Nick Koston cfbfdf7949
Fix apple_tv IP Address not being updated from discovery (#107611) 2024-01-17 17:43:14 -10:00
puddly 867caab70a
Speed up ZHA initialization and improve startup responsiveness (#108103)
* Limit concurrency of startup traffic to allow for interactive usage

* Drop `retryable_req`, we already have request retrying

* Oops, `min` -> `max`

* Add a comment describing why `async_initialize` is not concurrent

* Fix existing unit tests

* Break out fetching mains state into its own function to unit test
2024-01-17 18:36:28 -05:00
Jan Bouwhuis f704a1a05a
Remove legacy VacuumEntity base class support (#108189) 2024-01-17 23:19:49 +01:00
John Allen a385ca93bd
Send target temp to Shelly TRV in F when needed (#108188) 2024-01-17 22:06:11 +02:00
Cyrill Raccaud 802f0da493
Switch for swiss_public_transport to unique_id instead of unique_entry (#107910)
* use unique_id instead of unique_entry

* move entry mock out of patch context
2024-01-17 19:08:33 +01:00
Martin Hjelmare 9d5f714e29
Decrease fitbit logging verbosity on connection error (#108228)
* Add test for connection error

* Decrease fitbit connection error log verbosity
2024-01-17 07:07:02 -08:00
Jan Bouwhuis c47fb5d161
Remove deprecated redundant dry and fan modes from zwave_js climates (#108124)
Remove deprecated redundant dry and fan modes from zwave_js climates
2024-01-17 15:55:46 +01:00
Erik Montnemery 91815ed5f9
Assert default response from conversation trigger (#108231) 2024-01-17 15:47:06 +01:00
Josef Zweck 90f4900f2c
Add button platform to La Marzocco (#108236)
* add button

* Update homeassistant/components/lamarzocco/button.py

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

* Update homeassistant/components/lamarzocco/strings.json

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

* update snapshot

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-17 15:20:24 +01:00
Josef Zweck ee44e9d4d6
Add update platform to La Marzocco (#108235)
* add update

* requested changes

* improve

* docstring

* docstring
2024-01-17 14:49:08 +01:00
Franck Nijhof 3eb1283fa5
Disable Python 3.12 incompatible integrations (#108163) 2024-01-17 14:47:03 +01:00
J. Nick Koston 15384f4661
Remove unused entity_sources argument from shared_attrs_bytes_from_event (#108210) 2024-01-17 08:45:04 -05:00
Josef Zweck 2cd828b2d0
Add number platform to La Marzocco (#108229)
* add number

* remove key entities

* remove key numbers

* rename entities

* rename sensors
2024-01-17 14:15:48 +01:00
Josef Zweck 74d53a4231
Add select platform to La Marzocco integration (#108222)
* add select

* change check, icons

* fix docstrings, use []
2024-01-17 13:21:33 +01:00
G Johansson bdda38f274
Allow selecting camera in Trafikverket Camera (#105927)
* Allow selecting camera in Trafikverket Camera

* Final config flow

* Add tests

* Fix load_int

* naming
2024-01-17 11:54:13 +01:00
Josef Zweck e811cf1ae8
Add binary sensor platforms to La Marzocco (#108212)
* add sensor

* remove switch

* requested changes

* property instead of function

* add missing snapshot

* rename var, fixture

* add binary sensors

* reorder strings

* rename sensor

* switch to supported_fn
2024-01-17 11:42:22 +01:00
Christophe Gagnier 44f2b8e6a3
Implement TechnoVE integration (#106029)
* Implement TechnoVE integration

Only the basic sensors for now.

* Add technoVE to strict typing

* Implement TechnoVE PR suggestions

* Remove Diagnostic from TechnoVE initial PR

* Switch status sensor to Enum device class

* Revert zeroconf for adding it back in subsequent PR

* Implement changes from feedback in TechnoVE PR

* Update homeassistant/components/technove/models.py

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

* Update homeassistant/components/technove/sensor.py

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

* Update homeassistant/components/technove/models.py

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

* Remove unnecessary translation keys

* Fix existing technoVE tests

* Use snapshot testing for TechnoVE sensors

* Improve unit tests for TechnoVE

* Add missing coverage for technoVE config flow

* Add TechnoVE coordinator tests

* Modify device_fixture for TechnoVE from PR Feedback

* Change CONF_IP_ADDRESS to CONF_HOST for TechnoVE

* Update homeassistant/components/technove/config_flow.py

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

* Update homeassistant/components/technove/models.py

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

* Update homeassistant/components/technove/models.py

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

* Implement feedback from TechnoVE PR

* Add test_sensor_update_failure to TechnoVE sensor tests

* Add test for error recovery during config flow of TechnoVE

* Remove test_coordinator.py from TechnoVE

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
2024-01-17 11:04:35 +01:00
Josef Zweck a8b67d5a0a
Add sensor platform to La Marzocco integration (#108157)
* add sensor

* remove switch

* requested changes

* property instead of function

* add missing snapshot

* rename var, fixture
2024-01-17 09:12:49 +01:00
G Johansson d4f9ad9dd3
Create update coordinator for Systemmonitor (#106693) 2024-01-16 15:07:55 -10:00
Jan-Philipp Benecke 10014838ef
Dynamically map state class, device class and UoM in ZHA smart energy metering sensor (#107685)
* Dynamically map state class, device class and UoM in ZHA smart energy metering sensor

* Fix some state & device classes and add scaling

* Fix added imperial gallons tests

* Use entity description instead of custom class & add one entity to tests

* Apply code review suggestion

* Scale only when needed

* Revert "Scale only when needed"

This reverts commit a9e0403402.

* Avoid second lookup of entity description

* Change test to not mix sensor types
2024-01-17 00:40:00 +01:00
Aaron Bach 25f4fe4a85
Bump aiokafka to 0.10.0 (#108165) 2024-01-16 23:16:31 +01:00
Michael Hansen db81f4d046
Wyoming satellite ping and bugfix for local wake word (#108164)
* Refactor with ping

* Fix tests

* Increase test coverage
2024-01-16 15:43:30 -06:00
G Johansson 7dffc9f515
Remove config import from netatmo (#107972)
* Remove config import from netatmo

* Fix tests
2024-01-16 22:17:18 +01:00
G Johansson 0ba0f57439
Add entity name translations to System Monitor (#107952) 2024-01-16 21:39:03 +01:00
J. Nick Koston 60ab360fe7
Avoid bytes to string to bytes conversion in websocket api (#108139) 2024-01-16 21:37:34 +01:00
G Johansson ad35113e86
Remove config import in Neato (#107967)
Co-authored-by: jbouwh <jan@jbsoft.nl>
2024-01-16 21:08:05 +01:00
Luke Lashley fa5af8f187
Add Translation for Roborock exceptions (#105427)
* add translations to exceptions

* Make errors more user understandable

* make command not ternary operator

* removed non-user facing exceptions

* Add user facing exceptions and code coverage

* add match

* fix linting

* Apply suggestions from code review

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-01-16 21:00:20 +01:00
G Johansson 639f06843b
Remove config import from surepetcare (#107971)
Co-authored-by: jbouwh <jan@jbsoft.nl>
2024-01-16 20:57:23 +01:00
Galorhallen ddaf194f91
Add Govee local light integration (#106697)
* Added govee_local_api

* Code cleanup

* Fix discovery

* Add missing supported device

* Fix autodiscovery

* Add missing quality scale in manifest.json

* QA

* QA: Moved coordinator creation to __init__.py

* QA

* Fix typo and update test

* QA

* Removed unecessary code

* Fix typo

* Fix typo

* QA, typing and strings

* Removed unsed logger in __init__.py

* QA, using ColorMode for lights capabilities

* Bump govee_local_api to 1.4.0

Moved capabilities to library.

* Update requirements

* Update library to 1.4.1 with unsupported dvice warning

* Fix tests after library update

* QA

* Add test for retry config

* Update integration name and domain

* Update homeassistant/components/govee_light_local/light.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-16 20:00:29 +01:00
Josef Zweck 95ed1ada50
Add late PR improvements to La Marzocco (#108162)
* add Martin's suggestions

* use password description

* fix for reauth + test

* fix invalid_auth test

* Update homeassistant/components/lamarzocco/config_flow.py

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

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-16 19:35:50 +01:00
Jan Bouwhuis 3ff74fe20f
Refactor demo vacuum's to only use StateVacuum base class and features (#108150)
* Demo cleanup

* Refactor vacuum demo to only use state vacuum base class

* Remove unneeded feature checks

* Remove exclusion issue for mqtt an demo
2024-01-16 16:44:12 +01:00
Josef Zweck 6bc36666b1
Add integration lamarzocco (#102291)
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: tronikos <tronikos@users.noreply.github.com>
Co-authored-by: Luke Lashley <conway220@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: dupondje <jean-louis@dupond.be>
2024-01-16 15:24:16 +01:00
Bouwe Westerdijk a874895a81
Add gateway_mode Select to Plugwise (#108019) 2024-01-16 14:35:09 +01:00
J. Nick Koston 3d595fff13
Avoid duplicate timestamp conversions for websocket api and recorder (#108144)
* Avoid duplicate timestamp conversions for websocket api and recorder

We convert the time from datetime to timestamps one per
open websocket connection and the recorder for every
state update. Only do the conversion once since its
~30% of the cost of building the state diff

* more

* two more

* two more in live history
2024-01-16 14:05:01 +01:00
Jan Bouwhuis 26058bf922
Add serial_number attribute to MQTT device properties (#108105) 2024-01-16 14:02:34 +01:00
Joakim Plate 523352c97e
Avoid keeping config dir in path (#107760) 2024-01-16 13:38:47 +01:00
Robert Resch 7fe6fc987b
Add config flow for Ecovacs (#108111)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-16 13:31:42 +01:00
Jan Bouwhuis 3e72c346b7
Remove MELCloud YAML import support (#108113) 2024-01-16 13:29:26 +01:00
G Johansson fa2f9eac1a
Remove config import in meteo_france (#107970)
Co-authored-by: jbouwh <jan@jbsoft.nl>
2024-01-16 13:27:49 +01:00
Jan Bouwhuis b46d0fb07c
Remove YAML import support for plum_lightpad (#108114) 2024-01-16 13:13:33 +01:00
Pedro Lamas 6cab4486f7
Fix loading empty yaml files with include_dir_named (#107853) 2024-01-16 10:23:04 +01:00
Paarth Shah 5afe155cd9
Fix MatrixBot not resolving room aliases per-command (#106347) 2024-01-16 10:07:51 +01:00
Jan-Philipp Benecke 28281523ec
Add pylint plugin to check for sorted platforms list (#108115) 2024-01-16 09:47:53 +01:00
Erik Montnemery fb24e086b2
Hide FlowResultType.SHOW_PROGRESS_DONE from frontend (#107799)
* Hide FlowResultType.SHOW_PROGRESS_DONE from frontend

* Update tests
2024-01-16 09:04:27 +01:00
Leendert Gravendeel 5011a25ea6
Add Epion integration (#107570)
* Adding initial Epion Air integration logic

* Skipping sensors with missing data

* Patching Epion integration

* Adding additional Epion measurement types

* Cleaning up logging

* Cleaning up code

* Fixing error handling for invalid Epion keys

* Adding tests and improving error handling

* Patching Epion tests

* Cleaning up Epion integration code

* Bumping Epion package and including missing files

* Moving data updates to coordinator and addressing feedback

* Improve exception handling

* Exposing model name and firmware version

* Cleaning up code according to review

* Cleaning up code according to review

* Adding check to prevent duplicate account setup

* Refactoring tests and checking for duplicates

* Cleaning up test code according to review

* Cleaning up test code

* Removing entity name overrides

* Fix code format for tests

* Adding missing newlines in JSON files

* Fixing formatting

* Updating device method to always return a device

* Updating coordinator
2024-01-16 06:39:50 +01:00
Jan Bouwhuis 1a4d1907c9
Make ATTR_SERIAL_NUMBER a generic homeassistant constant (#108106) 2024-01-15 20:33:15 +01:00
Shay Levy 28e18ce7bf
Fix Shelly Gen1 entity description restore (#108052)
* Fix Shelly Gen1 entity description restore

* Update tests/components/shelly/test_sensor.py

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

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-15 20:53:56 +02:00
G Johansson 3bc20a072a
Fix test_sensor_process_fails test in System Monitor (#108110) 2024-01-15 19:46:28 +01:00
G Johansson 5b3e1306f8
Add tests for System Monitor (#107891)
* Add tests

* no coordinator

* Coverage

* processes

* test init

* util

* test icon

* Add tests

* Mod tests

* Add tests

* Test attributes

* snapshots

* icon

* test disk mounts

* fixes

* svmem

* cache_clear

* test icon

* reset icon test

* test_processor_temperature

* fix tests on macos

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-15 18:26:49 +01:00
G Johansson 749ef45727
Add availability to command_line (#105300)
* Add availability to command_line

* Add tests

* freezer
2024-01-15 18:20:34 +01:00
Jan-Philipp Benecke bd37d3776b
Set webhook local_only to True by default (#107670) 2024-01-15 11:09:40 +01:00
Marcel van der Veldt 52acc4bbab
Fix turning on the light with a specific color (#108080) 2024-01-15 11:08:38 +01:00
Jan Bouwhuis 45acd56861
Remove YAML auth setup support from home_connect (#108072) 2024-01-15 09:00:59 +01:00
J. Nick Koston b47861d973
Update shelly bluetooth scanner to version 2.0 (#107917) 2024-01-14 09:44:42 -10:00
Erik Montnemery 00165fef5b
Improve the test class used for testing FlowManager.async_show_progress (#107786)
* Improve the test class used for testing FlowManager.async_show_progress

* Address review comments
2024-01-14 18:39:45 +01:00
G Johansson 7a6dca0987
Sensibo include mac in diagnostics redact filter (#107986)
* Add mac to redaction in Sensibo diagnostics

* Add full snapshot

* use constant
2024-01-14 15:34:14 +01:00
wittypluck d94421e1a4
Reset UniFi bandwidth sensor when client misses heartbeat (#104522)
* Reset UniFi bandwidth sensor when client misses heartbeat

* Fix initialization sequence

* Code simplification: remove heartbeat_timedelta, unique_id and tracker logic

* Add unit tests

* Remove unused _is_connected attribute

* Remove redundant async_initiate_state

* Make is_connected_fn optional, heartbeat detection will only happen if not None

* Add checks on is_connected_fn
2024-01-14 15:19:43 +01:00
Jan-Philipp Benecke 7c848d78ab
Remove deprecated services from Litterrobot (#107882) 2024-01-14 11:50:12 +01:00
Tobias Sauerwein f808c2ff14
Add Netatmo fan platform (#107989)
* Add fan platform

to support NLLF centralized ventilation devices

* Update tests/components/netatmo/test_fan.py

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

* Update tests/components/netatmo/test_fan.py

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

* Update tests/components/netatmo/test_fan.py

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

* Update tests/components/netatmo/test_fan.py

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

* add snapshots

* update snapshot

* fix docstring

* address comment

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-14 11:47:20 +01:00
Bouwe Westerdijk b034d6d0a1
Bump plugwise to v0.36.2 (#108012) 2024-01-14 11:25:45 +01:00
Joost Lekkerkerker 965499dd90
Add entity translations to Glances (#107189) 2024-01-14 11:12:30 +01:00
Erik Montnemery 7fc3f8e473
Improve calls to async_show_progress in octoprint (#107792) 2024-01-14 11:06:35 +01:00
Erik Montnemery 3895defff9
Improve calls to async_show_progress in homeassistant_hardware (#107789) 2024-01-14 10:41:44 +01:00
Sam Reed bca629ed31
Drop facebox integration (#107005) 2024-01-14 10:40:05 +01:00
Jan-Philipp Benecke c86b45b454
Remove deprecated vacuum service from roborock (#107895) 2024-01-14 09:57:17 +01:00
Erik Montnemery d4cb055d75
Improve calls to async_show_progress in improv_ble (#107790) 2024-01-14 09:37:54 +01:00
Jan Bouwhuis 4b8d8baa69
Remove deprecated YAML import from generic camera (#107992) 2024-01-14 09:36:00 +01:00
Jan Bouwhuis f48d057307
Remove YAML support from gdacs (#107962) 2024-01-14 09:03:00 +01:00
Brett Adams 8b4d99f7d2
Add route sensors to Tessie (#106530)
* keys may be missing at startup

* Add route sensors and tracker location

* Fix keys and add translation

* Allow a sensor to have no value

* Move attribute to sensor

* Remove state attribute string
2024-01-14 08:08:54 +01:00
J. Nick Koston 07810926d0
Update habluetooth to 2.2.0 (#108000)
* Update habluetooth to 2.2.0

* fixes

* lib
2024-01-13 23:50:47 -05:00
J. Nick Koston e7c25d1c36
Migrate powerwall unique ids to use the gateway din (#107509) 2024-01-13 16:17:37 -10:00
J. Nick Koston 454c62b5b4
Avoid total_seconds conversion every state write when context is set (#107617) 2024-01-13 21:04:32 -05:00
J. Nick Koston f1228a1cfb
Add H5106 support to govee-ble (#107781)
* Bump govee-ble to 0.27.0

changelog: https://github.com/Bluetooth-Devices/govee-ble/compare/v0.26.0...v0.27.0

note: H5106 is partially supported, full support will be added in another PR + docs

* .1

* Add Govee H5106 support

* 0.27.2

* commit the tests
2024-01-13 21:02:38 -05:00
J. Nick Koston 9c82df4b98
Fix duplicate config entry additions in tests (#107984)
zha and plex still add the same config entry multiple times
but they are going to need seperate PRs as they have more
complex logic
2024-01-13 21:01:18 -05:00
Simone Chemelli ef8d394c16
Update sleep period for Shelly devices with buggy fw (#107961)
* update sleep period for Shelly devices with buggy fw

* code quality

* update model list

* add test

* Apply review comments

* fix test

* use costant
2024-01-13 22:33:02 +01:00
puddly b0adaece25
Reload ZHA only a single time when the connection is lost multiple times (#107963)
* Reload only a single time when the connection is lost multiple times

* Ignore when reset task finishes, allow only one reset per `ZHAGateway`
2024-01-13 16:32:25 -05:00
J. Nick Koston 6ada825805
Use faster is_admin check for websocket state and event subscriptions (#107621) 2024-01-13 10:42:41 -10:00
J. Nick Koston 3649cb96de
Refactor config entry storage and index (#107590) 2024-01-13 10:34:15 -10:00
J. Nick Koston b1d0c6a4f1
Refactor User attribute caching to be safer and more efficient (#96723)
* Cache construction of is_admin

This has to be checked for a lot of api calls and the websocket
every time the call is made

* Cache construction of is_admin

This has to be checked for a lot of api calls and the websocket
every time the call is made

* Cache construction of is_admin

This has to be checked for a lot of api calls and the websocket
every time the call is made

* modernize

* coverage

* coverage

* verify caching

* verify caching

* fix type

* fix mocking
2024-01-13 15:10:50 -05:00
J. Nick Koston 852a73267f
Fix atag test mutating config entry after its adding to hass (#107603) 2024-01-13 20:34:49 +01:00
Antoni Czaplicki ca421d4f86
Add support for Uonet+ Vulcan integration on Python 3.12 (#107959)
* Bump vulcan-api to 2.3.2

* Enable vulcan integration on Python 3.12

* Stop skipping tests for vulcan integration on Python 3.12
2024-01-13 19:58:02 +01:00
Brett Adams 6cbf1da76a
Add charge cable lock to Tessie (#107212)
* Add cable lock

* Translate exception

* Use ServiceValidationError
2024-01-13 19:03:10 +01:00
Michael Arthur b1a246b817
Add account sensors to electric kiwi integration (#97681)
* add account sensors

* tidy up same issues as other sensors

* add unit tests for sensors

edit and remove comments

assert state and remove HOP sensor types since they aren't being used

* try and fix tests

* add frozen true

* Update tests/components/electric_kiwi/test_sensor.py

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

* return proper native types

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

* tidy up attr unique id

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

* add entities once and use native values properly

* Improve conftest

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

* tidy tests/components/electric_kiwi/test_sensor.py

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

* add assert to component_setup

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

* add extra parameters to test

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

* Update tests/components/electric_kiwi/test_sensor.py

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

* Update tests/components/electric_kiwi/test_sensor.py

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

* change coordinator name

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

* tidy up sensor translation names

* Apply suggestions from code review

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-01-13 18:12:40 +01:00
Grant 8395d84bbb
Add fan mode support to SmartThings fan entity (#106794)
* Fix the fan to support preset modes

* Add more tests and fix some comments

* Don't override inherited member

* Don't check for supported feature as the check is already performed before here

* Do not check for feature on properties

* Update homeassistant/components/smartthings/fan.py

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

* Fix tests

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-01-13 17:25:26 +01:00
Erik Montnemery 24c23d7323
Warn if integrations call async_show_progress without passing a task (#107796) 2024-01-13 11:56:05 +01:00
Joost Lekkerkerker 9471f81a18
Give name to Netatmo device snapshots (#107938) 2024-01-13 11:09:47 +01:00
Joost Lekkerkerker f601104418
Snapshot Netatmo devices (#107935) 2024-01-13 10:59:36 +01:00
Joost Lekkerkerker 902619a4db
Add snapshot tests to Netatmo platforms (#107932)
* Add snapshot tests to Netatmo platforms

* Add snapshot tests to Netatmo platforms
2024-01-13 10:18:21 +01:00
Joost Lekkerkerker 7bcfcfef5f
Improve Netatmo tests (#107902)
* Improve Netatmo tests

* Improve Netatmo tests
2024-01-12 23:27:31 +01:00
Jan-Philipp Benecke 68698cacac
Remove deprecated YAML support from litejet (#107884) 2024-01-12 16:50:15 -05:00
J. Nick Koston 3a4c64b0a7
Fix missing timeout exception check in powerwall config flow (#107899)
* Fix missing timeout exception check in powerwall config flow

powerwall recently switched to asyncio, and every place we
check for unreachable we need to check for timeout error.
There was one missed

```
09:08 homeassistant homeassistant[546]: 2024-01-12 10:09:08.899 ERROR (MainThread) [homeassistant.components.powerwall.config_flow] Unexpected exception
Jan 12 20:09:08 homeassistant homeassistant[546]: Traceback (most recent call last):
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/src/homeassistant/homeassistant/components/powerwall/config_flow.py", line 168, in _async_try_connect
Jan 12 20:09:08 homeassistant homeassistant[546]:     info = await validate_input(self.hass, user_input)
Jan 12 20:09:08 homeassistant homeassistant[546]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/src/homeassistant/homeassistant/components/powerwall/config_flow.py", line 76, in validate_input
Jan 12 20:09:08 homeassistant homeassistant[546]:     site_info, gateway_din = await _login_and_fetch_site_info(
Jan 12 20:09:08 homeassistant homeassistant[546]:                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/src/homeassistant/homeassistant/components/powerwall/config_flow.py", line 43, in _login_and_fetch_site_info
Jan 12 20:09:08 homeassistant homeassistant[546]:     await power_wall.login(password)
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/powerwall.py", line 58, in login
Jan 12 20:09:08 homeassistant homeassistant[546]:     return await self.login_as(User.CUSTOMER, password, email, force_sm_off)
Jan 12 20:09:08 homeassistant homeassistant[546]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/powerwall.py", line 49, in login_as
Jan 12 20:09:08 homeassistant homeassistant[546]:     response = await self._api.login(user, email, password, force_sm_off)
Jan 12 20:09:08 homeassistant homeassistant[546]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/api.py", line 172, in login
Jan 12 20:09:08 homeassistant homeassistant[546]:     return await self.post(
Jan 12 20:09:08 homeassistant homeassistant[546]:            ^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/local/lib/python3.12/site-packages/tesla_powerwall/api.py", line 146, in post
Jan 12 20:09:08 homeassistant homeassistant[546]:     response = await self._http_session.post(
Jan 12 20:09:08 homeassistant homeassistant[546]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 601, in _request
Jan 12 20:09:08 homeassistant homeassistant[546]:     await resp.start(conn)
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 960, in start
Jan 12 20:09:08 homeassistant homeassistant[546]:     with self._timer:
Jan 12 20:09:08 homeassistant homeassistant[546]:   File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 735, in __exit__
Jan 12 20:09:08 homeassistant homeassistant[546]:     raise asyncio.TimeoutError from None
Jan 12 20:09:08 homeassistant homeassistant[546]: TimeoutError

```

* cov
2024-01-12 21:39:27 +01:00
Cyrill Raccaud 96a9ebf137
Fix missing unique_id for spt integration (#107087)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-12 12:55:09 +01:00
Peter Winkler 2508b55b0f
Add myUplink integration (#86522)
* First checkin for myUplink

* Refactored coordinator and sensor state classe

* Updated .coveragerc

* Update test_config_flow

* Fix test_config_flow for myuplink

* Only set state class for temperature sensor

* PR comment updates

* Type strong dict

* use asyncio.timeouts

* PR updates (part 1)

* Updated to myuplink 0.0.9

* Add strict typing

* Fix typing

* Inherit CoordinatorEntity

* Clean up coordinator and sensors

* Use common base entity

* Improve device point sensor

* Exclude entity from coverage

* Set device point entity name if there's no entity description

* Update homeassistant/components/myuplink/sensor.py

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

* Update homeassistant/components/myuplink/entity.py

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

* Update homeassistant/components/myuplink/entity.py

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

* Remvoed firmware + connstate sensors

* Always add device point parameter name

* Removed MyUplinkDeviceSensor

* Removed unused class

* key="celsius",

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-12 12:17:07 +01:00
J. Nick Koston 4b7a313ece
Use identity checks for CoreState (#107846)
Some of the checks used ==, and some used is. Switch
everything to is as its faster
2024-01-12 10:21:26 +01:00
Erik Montnemery e7628d23d2
Don't include position in binary valve attributes (#107531) 2024-01-12 09:55:28 +01:00
Martin Hjelmare f8318bbbc7
Fix cloud tts loading (#107714) 2024-01-12 09:47:08 +01:00