1
mirror of https://github.com/home-assistant/core synced 2024-09-28 03:04:04 +02:00
Commit Graph

2401 Commits

Author SHA1 Message Date
Christopher Fenner
47cbe8f00c
Add support for multiple devices linked to a Viessmann account (#96044)
* care about all devices

* use first device for diagnostics

* update constants

* handle multiple devices

* handle multiple devices

* handle multiple devices

* handle multiple devices

* handle multiple devices

* code style

* code style

* code style

* code style

* code style

* remove unused import

* remove unused import

* use has_entity_name and add serial to device name

* use has_entity_name and add serial to device name

* use has_entity_name and add serial to device name

* use has_entity_name and add serial to device name

* use has_entity_name and add serial to device name

* remove unused constant

* Update const.py

* Update binary_sensor.py

* change format

* change format

* fix line duplication

* fix line duplication

* change format

* fix typo

* use serial in device name if multiple devices are found

* add common base class

* use base class

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update sensor.py

* Update binary_sensor.py

* correct import

* use base class

* fix cdestyle findings

* fix pylint findings

* fix mypy findings

* fix codestyle finidings

* move has_entity_name to base class

* Revert "fix mypy findings"

This reverts commit 2d78801a69.

* fix type issue

* move multiple device handling

* fix import

* remove special handling for device name

* extract api getter

* Update __init__.py

* Update __init__.py

* Update entity.py

* Update button.py

* Update binary_sensor.py

* Update climate.py

* Update sensor.py

* Update water_heater.py

* Apply suggestions from code review

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

* Update __init__.py

* fix mypy & black

* move get_device to utils

* rename const

* Apply suggestions from code review

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

* store device in config entry

* extract types

* fix diagnostics

* handle new platform

* handle api rate limit

* add types

* add types

* rename

* add types

* ignore gateways for now

* Update .coveragerc

* adjust types

* fix merge issues

* rename

* Update types.py

* fix type

* add test method

* simplify

* ignore unused devices

* Apply suggestions from code review

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

* fix findings

* handle unsupported devices

* Apply suggestions from code review

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

* Update types.py

* fix format

* adjust variable naming

* Update conftest.py

* Update conftest.py

* remove kw_only

* Apply suggestions from code review

* Update __init__.py

* Update binary_sensor.py

* Update button.py

* Update climate.py

* Update const.py

* Update diagnostics.py

* Update number.py

* Update sensor.py

* Update types.py

* Update water_heater.py

* fix comment

* Apply suggestions from code review

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-02-15 13:58:00 +01:00
Åke Strandberg
e2ff5bc248
Add myuplink binary_sensor platform (#110388)
* Add binary_sensor platform

* Address review comments

* Add one file more to .coveragerc
2024-02-13 15:59:38 +01:00
Aaron Bach
e3c838d512
Update Notion auth to store refresh tokens instead of account passwords (#109670) 2024-02-12 20:35:06 -07:00
Jiayi Chen
4e2f599720
Update Growatt server URLs (#109122) 2024-02-07 09:35:50 +01:00
J. Nick Koston
ae5d4e183a
Remove remaning ESPHome files from coveragerc (#109400) 2024-02-02 14:52:09 -06:00
Jan Rieger
bbdb9b61c4
Add config flow to GPSD (#106196) 2024-01-31 18:38:14 +01:00
Joakim Sørensen
640463c559
Add Traccar server integration (#109002)
* Add Traccar server integration

* Add explination

* Update homeassistant/components/traccar_server/coordinator.py

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

* Add data_description

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-31 14:50:18 +01:00
Joakim Sørensen
52a692df3e
Add Elvia integration (#107405) 2024-01-31 14:47:37 +01:00
Robert Resch
4f4d79137e
Add Ecovacs number entities (#109209) 2024-01-31 14:43:35 +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
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
escoand
e7d5ae7ef6
Add Nextcloud update entity (#106690)
* add nextcloud update entity

* don't init update entity on older nextcloud versions

* ruff

* pass skipUpdate to module

* bump deps

* bump requirements

* Update homeassistant/components/nextcloud/update.py

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

* Update homeassistant/components/nextcloud/update.py

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

* bump requirements

* Update homeassistant/components/nextcloud/update.py

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

* Update homeassistant/components/nextcloud/update.py

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2024-01-30 23:01:26 +01:00
Kristof Mariën
0013f184b3
Extract foscam base entity for reuse (#108893)
* Extract foscam base entity for reuse

* Cleanup

* More cleanup

* Cleanup constructor

* Use more constants
2024-01-29 23:02:19 +01:00
wilburCforce
39d263599e
Add lutron fan entity (#107402)
* add support for fan entity

* removed unused variables

* removed preset leftovers - not needed

* added deprecation for fans

* Update __init__.py

* fix typing

* initial updates based on review

* updated to search on unique ID instead of entity ID.

* updates for nits

* nits updates

* updates for new callback

* removed async per nits

* wrapped comments into shorter lines

* Add comment comma

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-01-29 20:58:12 +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
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
Simone Chemelli
f413ff2837
Add clima support to Comelit integration (#108858)
* Add clima support to Comelit integration

* address first part of review comments

* applied more review comments

* remove old multiplier

* removed preset modes (not always configured)

* small tweak

* apply StrEnum class
2024-01-28 18:50:38 +01:00
suaveolent
f2100f80c4
Add device info to lupusec (#108910)
* added device info and unique id

* removed wrong attribute

* added base entity

* rename domain

* added entity.py to coveragerc

* added base entity for sensors and alarm panel

* add generic type translation

* rename functions

* rename device name to device model

* set _attr_name = None

* pass in only the entry_id instead of the full config_entry

* set unique id to device_id or entry id

* use deviceinfo class

* moved     _attr_name = None to entities

* Update homeassistant/components/lupusec/alarm_control_panel.py

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

* Update homeassistant/components/lupusec/entity.py

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

* Update homeassistant/components/lupusec/entity.py

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

* remove DOMAIN from unique id

* removed redundant function

* Update homeassistant/components/lupusec/alarm_control_panel.py

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

* Update homeassistant/components/lupusec/entity.py

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

---------

Co-authored-by: suaveolent <suaveolent@users.noreply.github.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-01-28 16:06:57 +01:00
RJPoelstra
9413d15c25
Add enum sensor to Vogel's MotionMount integration (#108643)
Add enum sensor entity
2024-01-28 15:02:39 +01:00
Robert Resch
b1b53ac893
Add Ecovacs image entities (#108924)
* Add Ecovacs image entities

* Fix
2024-01-26 20:33:21 +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
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
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
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
Dave Leaver
e3a73c12bc
Add airtouch5 (#98136)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-01-23 14:49:47 +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
RJPoelstra
298b0d1105
Add binary sensor to MotionMount integration (#107659)
* Add binary sensor for `isMoving`

* Sort platforms alphabetically

* Update doc strings
2024-01-19 16:01:20 +01:00
Joost Lekkerkerker
c4f033e61c
Add test for failed initialization in Flexit BACnet (#108294) 2024-01-18 14:55:44 +01:00
Aaron Bach
f0a63f7189
Move Guardian coordinator to suggested location (#108182)
* Move Guardian coordinator to suggested location

* Fix coverage
2024-01-16 15:38:20 -07: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
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
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
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
Matrix
83fbcb11ea
Add YoLink SpeakerHub Service (#107787)
* Add YoLink SpeakerHub Service

* fix as suggestion

* service's params descriptions
2024-01-12 08:18:44 +01:00
Phil Bruckner
24ddc939c0
Remove Life360 integration (#107805) 2024-01-11 21:49:39 +01:00
Matrix
f217d438cd
Add SpeakerHub support to YoLink (#104678)
* SpeakerHub support

* Remove unnecessary code

* fix entity description

* Fix as suggestion

* fixes

* fixes as suggestion & remove Speker Hub service
2024-01-11 11:04:14 +01:00
Aaron Bach
bc4c3bf9e7
Add valve platform to Guardian (#107423) 2024-01-10 13:03:18 -10:00
Álvaro Fernández Rojas
9036d67588
Rename AEMET weather_update_coordinator (#107740)
* aemet: rename weather_update_coordinator

Use "coordinator" instead, like other integrations.

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

* coverage: remove AEMET coordinator

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

---------

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-01-10 20:33:44 +01:00
RJPoelstra
c833f275d6
Add select platform to Vogel's MotionMount integration (#107132) 2024-01-06 23:44:28 -10:00
jimmyd-be
ee67c97274
Add time entity to Renson (#105031)
* Add time entity to Renson

* Update homeassistant/components/renson/time.py

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

* remove deleted sensors from strings.json

* Fix Ruff issue

* Fixed loading issue

* Try to fix frozen error

* Revert "Try to fix frozen error"

This reverts commit 803104c292.

* Try to fix frozen error

* Revert "Try to fix frozen error"

This reverts commit 8ba2dcce94.

* Update homeassistant/components/renson/time.py

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

* Change import + api argument

* use _attr_has_entity_name

* Update homeassistant/components/renson/time.py

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

---------

Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
2024-01-06 09:27:34 +01:00
Joost Lekkerkerker
2b43271c3b
Move Lutron entry data to typed class (#107256)
* Move Lutron entry data to typed class

* Move Lutron entry data to typed class

* Exclude file

* Update homeassistant/components/lutron/__init__.py

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

---------

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
2024-01-05 22:04:10 +01:00
Alexander Somov
d754ea7e22
Add new Rabbit Air integration (#66130)
* Add new Rabbit Air integration

* Remove py.typed file

It is not needed and was just accidentally added to the commit.

* Enable strict type checking for rabbitair component

Keeping the code fully type hinted is a good idea.

* Add missing type annotations

* Remove translation file

* Prevent data to be added to hass.data if refresh fails

* Reload the config entry when the options change

* Add missing type parameters for generics

* Avoid using assert in production code

* Move zeroconf to optional dependencies

* Remove unnecessary logging

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

* Remove unused keys from the manifest

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

* Replace property with attr

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

* Allow to return None for power

The type of the is_on property now allows this.

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

* Remove unnecessary method call

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

* Update the python library

The new version properly re-exports names from the package root.

* Remove options flow

Scan interval should not be part of integration configuration. This was
the only option, so the options flow can be fully removed.

* Replace properties with attrs

* Remove multiline ternary operator

* Use NamedTuple for hass.data

* Remove unused logger variable

* Move async_setup_entry up in the file

* Adjust debouncer settings to use request_refresh

* Prevent status updates during the cooldown period

* Move device polling code to the update coordinator

* Fix the problem with the switch jumping back and forth

The UI seems to have a timeout of 2 seconds somewhere, which is just a
little bit less than what we normally need to get an updated state. So
the power switch would jump to its previous state and then immediately
return to the new state.

* Update the python library

The new version fixes errors when multiple requests are executed
simultaneously.

* Fix incorrect check for pending call in debouncer

This caused the polling to stop.

* Fix tests

* Update .coveragerc to exclude new file.
* Remove test for Options Flow.

* Update the existing entry when device access details change

* Add Zeroconf discovery step

* Fix tests

The ZeroconfServiceInfo constructor now requires one more argument.

* Fix typing for CoordinatorEntity

* Fix signature of async_turn_on

* Fix depreciation warnings

* Fix manifest formatting

* Fix warning about debouncer typing

relates to 5ae5ae5392

* Wait for config entry platform forwards

* Apply some of the suggested changes

* Do not put the MAC address in the title. Use a fixed title instead.
* Do not format the MAC to use as a unique ID.
* Do not catch exceptions in _async_update_data().
* Remove unused _entry field in the base entity class.
* Use the standard attribute self._attr_is_on to keep the power state.

* Store the MAC in the config entry data

* Change the order of except clauses

OSError is an ancestor class of TimeoutError, so TimeoutError should be
handled first

* Fix depreciation warnings

* Fix tests

The ZeroconfServiceInfo constructor arguments have changed.

* Fix DeviceInfo import

* Rename the method to make it clearer what it does

* Apply suggestions from code review

* Fix tests

* Change speed/mode logic to use is_on from the base class

* A zero value is more appropriate than None

since None means "unknown", but we actually know that the speed is zero
when the power is off.

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-01-05 16:34:28 +01:00
MisterCommand
0d7627da22
Add Hong Kong Observatory integration (#98703)
* Add Hong Kong Observatory integration

* Move coordinator to a separate file

* Map icons to conditions

* Fix code for review

* Skip name

* Add typings to data_coordinator

* Some small fixes

* Rename coordinator.py
2024-01-05 14:52:46 +01:00
Guy Shefer
70e2ff351d
Add Tami4 integration boil water button (#103400)
* Implement boil water button

* Sort platforms list

* Get API directly

* Cleanup

* Rename boil button string

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

* Add button to .coveragerc

* Change ButtonEntityDescription to EntityDescription

* Update homeassistant/components/tami4/button.py

* Update homeassistant/components/tami4/button.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-31 15:39:00 +01:00
Cyrill Raccaud
b935facec8
Add coordinator to Swiss public transport (#106278) 2023-12-27 12:54:41 +01:00
Joost Lekkerkerker
01ded7daea
Add config flow to Streamlabs water (#104962)
* Add config flow to Streamlabs water

* Add config flow to Streamlabs water

* Add config flow to Streamlabs water

* Add issue when import is successful

* Remove import issue when entry already exists

* Remove import issue when entry already exists

* Fix feedback

* Fix feedback

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-12-26 22:24:28 +01:00
G Johansson
4f0ee20ec5
Add config flow to System Monitor (#104906)
* Initial commit for config flow to System Monitor

* sensors

* Fixes

* Works

* Add import

* entity_registry_enabled_default = False

* entity_category = diagnostic

* Create issue

* issue in config flow

* Tests

* test requirement

* codeowner

* Fix names

* processes

* Fix type

* reviews

* get info during startup once

* Select process

* Legacy import of resources

* requirements

* Allow custom

* Fix tests

* strings

* strings

* Always enable process sensors

* Fix docstrings

* skip remove sensors if no sensors

* Modify sensors

* Fix tests
2023-12-26 18:29:32 +01:00
Simone Chemelli
2cd6c2b6bf
Add alarm platform to Comelit (#104718)
* initial work on alarm

* final work on alarm

* coveragerc

* add tests

* add code validation

* remove sensor changes for a dedicated PR

* code optimization and cleanup

* tweaks

* tweak #2

* apply suggestion

* code quality

* code quality #2

* fix cover.py

* api typing

* use base classes where possibile

* apply const as per review comment

* cleanup unload entry

* apply review comments
2023-12-26 18:27:33 +01:00
Tobias Perschon
c8f9285aba
Switch unifi_direct to external library (#105046)
* switch to external library

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* use mac as name if no hostname is available

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* update requirements_test_all

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* update .coveragerc

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* update codeowners and remove old tests

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* reverted get_device_name to old behaviour

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* typing and some cleanup

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* typing fix

Signed-off-by: Tobias Perschon <tobias@perschon.at>

* code cleanup

Signed-off-by: Tobias Perschon <tobias@perschon.at>

---------

Signed-off-by: Tobias Perschon <tobias@perschon.at>
2023-12-26 13:22:53 +01:00