Commit Graph

2528 Commits (cac55d0f47ef41b653dede98476c2e9859813176)

Author SHA1 Message Date
epenet 0a625baeed
Rename fritz coordinator module (#117440)
* Rename fritz coordinator module

* Update .coveragerc

* Adjust .coveragerc

* Adjust coverage

* Adjust coverage
2024-05-15 21:58:29 +02:00
epenet aa2485c7b9
Move vallox coordinator to separate module (#117503)
* Move vallox coordinator to separate module

* Move logic into coordinator class

* Adjust
2024-05-15 21:01:21 +02:00
Marlon 3604a34823
Post review comments on APsystems (#117504)
* Cleanup for apsystems and fix for strings

* Migrate to typed ConfigEntry Data for apsystems

* Improve strings for apsystems

* Improve config flow tests for apsystems by cleaning up fixtures

* Do not use Dataclass for Config Entry Typing

* Improve translations for apsystems by using sentence case and removing an apostrophe

* Rename test fixture and remove unnecessary comment in tests from apsystems

* Remove default override with default in coordinator from apsystems
2024-05-15 19:56:12 +02:00
epenet 4e600b7b19
Move venstar coordinator to separate module (#117500) 2024-05-15 15:18:26 +02:00
epenet 6c892b227b
Rename mikrotik coordinator module (#117488) 2024-05-15 12:02:33 +02:00
Erik Montnemery e6296ae502
Revert "Add Viam image processing integration" (#117477) 2024-05-15 09:20:40 +02:00
Marlon d4d30f1c46
Add integration for APsystems EZ1 microinverter (#114531)
* Add APsystems local API integration

* Fix session usage in config_flow in apsystems local api

* Remove skip check option for apsystems_loca api

* Update APsystems API dependency and increased test coverage to 100%

* Utilize EntityDescriptions for APsystems Local integration

* Ensure coverage entries are sorted (#114424)

* Ensure coverage entries are sorted

* Use autofix

* Adjust

* Add comment to coverage file

* test CI

* revert CI test

---------

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

* Use patch instead of Http Mocks for APsystems API tests

* Fix linter waring for apsystemsapi

* Fix apsystemsapi test

* Fix CODEOWNERS for apsystemsapi

* Address small PR review changes for apsystems_local

* Remove wrong lines in coveragerc

* Add serial number for apsystems_local

* Remove option of custom refresh interval fro apsystems_local

* Remove function override and fix stale comments

* Use native device id and name storage instead of custom one for apsystems_local

* Use runtime_data for apsystems_local

* Don't store entry data in runtime data

* Move from apsystems_local to apsystems domain

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2024-05-14 22:50:25 -04:00
Nick Hehr 55bf0b6647
Add Viam image processing integration (#101786)
* feat: scaffold integration, configure client

* feat: register services, allow API key auth flow

* feat: register detection, classification services

* test(viam): add test coverage

* chore(viam): update viam-sdk version

* fix(viam): add service schemas and translation keys

* test(viam): update config flow to use new selector values

* chore(viam): update viam-sdk to 0.11.0

* feat: add exceptions translation stings

* refactor(viam): use constant keys, defer filesystem IO execution

* fix(viam): add missing constants, resolve correct image for services

* fix(viam): use lokalize string refs, resolve more constant strings

* fix(viam): move service registration to async_setup

* refactor: abstract services into separate module outside of manager

* refactor(viam): extend common vol schemas

* refactor(viam): consolidate common service values

* refactor(viam): replace FlowResult with ConfigFlowResult

* chore(viam): add icons.json for services

* refactor(viam): use org API key to connect to robot

* fix(viam): close app client if user abort config flow

* refactor(viam): run ruff formatter

* test(viam): confirm 100% coverage of config_flow

* refactor(viam): simplify manager, clean up config flow methods

* refactor(viam): split auth step into auth_api & auth_location

* refactor(viam): remove use of SelectOptionDict for auth choice, update strings

* fix(viam): use sentence case for translation strings

* test(viam): create mock_viam_client fixture for reusable mock
2024-05-14 13:35:56 +02:00
Federico D'Amico 746cfd3492
Add climate platform to microBees (#111152)
* Add climate platform to microBees

* add list comprehension

* fixes

* fixes

* fixes

* fix multiline ternary

* use a generator expression instead of filter + lambda.

* bug fixes

* Update homeassistant/components/microbees/climate.py

---------

Co-authored-by: Marco Lettieri <m.lettieri@microbees.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-14 12:11:19 +02:00
Laurence Presland c3f95a4f7a
Implement support for SwitchBot Meter, MeterPlus, and Outdoor Meter (#115522)
* Implement support for SwitchBot MeterPlus

Add temperature, humidity, and battery sensor entities for the MeterPlus device

* Rename GH username

* Update homeassistant/components/switchbot_cloud/coordinator.py

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

* Refactor to use EntityDescriptions

Concat entity ID in SwitchBotCloudSensor init

* Remove __future__ import

* Make scan interval user configurable

* Add support for Meter and Outdoor Meter

* Revert "Make scan interval user configurable"

This reverts commit e256c35bb7.

* Remove device-specific default scan intervals

* Update homeassistant/components/switchbot_cloud/sensor.py

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

* Update homeassistant/components/switchbot_cloud/sensor.py

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

* Update homeassistant/components/switchbot_cloud/sensor.py

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

* Fix ruff errors

* Reorder manifest keys

* Update CODEOWNERS

* Add sensor.py to coveragerc

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-13 15:18:28 +02:00
Jan Bouwhuis a1bc929421
Migrate Tibber notify service (#116893)
* Migrate tibber notify service

* Tests and repair flow

* Use notify repair flow helper

* Cleanup strings after using helper, use HomeAssistantError

* Add entry state assertions to unload test

* Update comment

* Update comment
2024-05-12 19:52:08 +02:00
Kevin Worrel c1f0ebee2c
Add screenlogic service tests (#116356) 2024-05-09 07:19:58 -05:00
Jake Martin 6e024d54f1
Add Monzo integration (#101731)
* Initial monzo implementation

* Tests and fixes

* Extracted api to pypi package

* Add app confirmation step

* Corrected data path for accounts

* Removed useless check

* Improved tests

* Exclude partially tested files from coverage check

* Use has_entity_name naming

* Bumped monzopy to 1.0.10

* Remove commented out code

* Remove reauth from initial PR

* Remove useless code

* Correct comment

* Remove reauth tests

* Remove device triggers from intial PR

* Set attr outside constructor

* Remove f-strings where no longer needed in entity.py

* Rename field to make clearer it's a Callable

* Correct native_unit_of_measurement

* Remove pot transfer service from intial PR

* Remove reauth string

* Remove empty fields in manifest.json

* Freeze SensorEntityDescription and remove Mixin

Also use list comprehensions for producing sensor lists

* Use consts in application_credentials.py

* Revert "Remove useless code"

Apparently this wasn't useless

This reverts commit c6b7109e47202f866c766ea4c16ce3eb0588795b.

* Ruff and pylint style fixes

* Bumped monzopy to 1.1.0

Adds support for joint/business/etc account pots

* Update test snapshot

* Rename AsyncConfigEntryAuth

* Use dataclasses instead of dictionaries

* Move OAuth constants to application_credentials.py

* Remove remaining constants and dependencies for services from this PR

* Remove empty manifest entry

* Fix comment

* Set device entry_type to service

* ACC_SENSORS -> ACCOUNT_SENSORS

* Make value_fn of sensors return StateType

* Rename OAuthMonzoAPI again

* Fix tests

* Patch API instead of integration for unavailable test

* Move pot constant to sensor.py

* Improve type safety in async_get_monzo_api_data()

* Update async_oauth_create_entry() docstring

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-07 20:38:58 +02:00
G Johansson b3008b074e
Remove ambiclimate integration (#116410) 2024-05-06 22:15:04 +02:00
Mr. Bubbles b53081dc51
Add update coordinator for Habitica integration (#116427)
* Add DataUpdateCoordinator and exception handling for service

* remove unnecessary lines

* revert changes to service

* remove type check

* store coordinator in config_entry

* add exception translations

* update HabiticaData

* Update homeassistant/components/habitica/__init__.py

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

* Update homeassistant/components/habitica/sensor.py

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

* remove auth exception

* fixes

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-05-05 17:02:28 +02:00
Joost Lekkerkerker a2bd045c9d
Improve coordinator in Ondilo ico (#116596)
* Improve coordinator in Ondilo ico

* Improve coordinator in Ondilo ico
2024-05-02 15:57:47 +02:00
Manuel Dipolt 2beab34de8
Add sensor platform to romy integration (#112388)
* poc romy status sensor working

* poc romy adc sensor working

* code review changes

* code review changes base enitity.py see branch romy_binary_sensor

* code review change: move CoordinatorEntity to the base class

* code review changes: sensors disabled per default

* code review: icons.json added

* checkout main entity.py

* code review changes: sensors enabled per default again

* disable rssi sensor per default

* Update homeassistant/components/romy/strings.json

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

* code review changes

* code review changes

* code review changes

* pylint fix

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-24 17:06:46 +02:00
Manuel Dipolt 220dc1f125
Add binary sensor platform to romy integration (#112998)
* wip

* poc working, reworked to a binary sensor list

* Update homeassistant/components/romy/binary_sensor.py

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

* Update homeassistant/components/romy/binary_sensor.py

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

* Update homeassistant/components/romy/binary_sensor.py

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

* Update homeassistant/components/romy/binary_sensor.py

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

* Update homeassistant/components/romy/binary_sensor.py

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

* code review changes, adjust translation key names

* code review clean up: removed unecessary RomyBinarySensorEntityDescription

* code review changes: translation names

* code review changes, put DeviceInfo into RomyEntity

* code review change: change docked icon to type plug

* code review change: move CoordinatorEntity to the base class

* code review changes: sensors disabled per default

* code review: icons.json added

* code review changes: sensors enabled per default again

* checkout main entity.py

* type hinting changes

* Update homeassistant/components/romy/binary_sensor.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-24 15:59:09 +02:00
osohotwateriot 44208a5be0
Add OSO Energy sensors (#108226)
* Add OSO Energy sensors

* Fix comments

* Fixes after review

* Fix sensor names and translations

* Fixes after review

* Fix validation errors

* Fixes after review

* Remove profile sensor
2024-04-24 08:19:26 +02:00
Michael 35db2e4101
Complete test coverage for Tankerkonig (#115920)
* complete tests

* update snapshots after rebase
2024-04-23 23:42:17 +02:00
Joost Lekkerkerker 2977ec4872
Add event platform to Lutron (#109121)
* Add event platform to Lutron

* Add event platform to Lutron

* Fix

* Fix

* Fix

* Add deprecation note

* Fix

* Fix

* Update homeassistant/components/lutron/event.py

* Update homeassistant/components/lutron/event.py

* Fix
2024-04-23 11:54:19 +02:00
Quentame f927b27ed4
Add Epic Games Store integration (#104725)
* Add Epic Games Store integration

Squashed commit of the following PR: #81167

* Bump epicstore-api to 0.1.7 as it handle better error 1004

Thanks to d7469f7c99

* Use extra_state_attributes instead of overriding state_attributes

* Review: change how config_flow.validate_input is handled

* Use LanguageSelector and rename locale to language

* Review: init-better use of hass.data.setdefault

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

* Review: don't need to update at init

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

* Revert "Review: don't need to update at init" --> not working otherwise

This reverts commit 1445a87c8e9b7247f1c9835bf2e2d7297dd02586.

* Review: fix config_flow.validate_input/retactor following lib bump

* review: merge async_update function with event property

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

* hassfest

* Fix duplicates data from applied comment review 5035055

* review: thanks to 5035055 async_add_entities update_before_add param is not required anymore

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

* Fix Christmas special "Holiday sale" case

* gen_requirements_all

* Use CONF_LANGUAGE from HA const

* Move CalendarType to const

* manifest: integration_type -> service

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

* calendar: remove date start/end assert

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

* const: rename SUPPORTED_LANGUAGES

* hassfest

* config: Move to ConfigFlowResult

* coordinator: main file comment

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

* ruff & hassfest

* review: do not guess country

* Add @hacf-fr as codeowner

* review: remove games extra_attrs
Was dropped somehow:
- 73c20f34803b0a0ec242bf0740494f17a68f6f59 review: move games extra_attrs to data service
- other commit that removed the service part

* review: remove unused error class
was removed:
- 040cf945bb5346b6d42b3782b5061a13fb7b1f6b

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-04-22 09:54:47 +02:00
epenet bea4c52d10
Ignore coverage for aiohttp_resolver backport helper (#115177)
* Ignore coverage for aiohttp_resolver backport helper

* Adjust generate to sort core items

* Adjust validate to sort core items

* Split line

* Apply suggestion

Co-authored-by: Dave T <17680170+davet2001@users.noreply.github.com>

* Fix suggestion

---------

Co-authored-by: Dave T <17680170+davet2001@users.noreply.github.com>
2024-04-12 16:33:05 +02:00
Joost Lekkerkerker 80450adb1a
Remove Epson Workforce integration (#115201)
* Remove Epson Workforce integration

* Remove Epson Workforce integration
2024-04-09 10:38:17 +02:00
Robert Contreras af7d0187cb
Add tests to Home Connect integration (#114214)
* Add tests to Home Connect integration

* Fix misspelling

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

* Changes to tests with properly setup fixtures.

* Consolidated api tests, patched library instead of code

* Consolidate sensor edge cases, switch mock assertion to call_count

* Adjust assertion

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-09 08:52:39 +02:00
Jan Bouwhuis 2e3cb1a767
Correct changes hassfest coverage backports (#115044) 2024-04-06 21:17:44 +02:00
Joost Lekkerkerker 57cc3495c2
Sort coveragerc again (#115017)
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2024-04-06 15:51:56 +02:00
J. Nick Koston f497c461ed
Switch to using the AsyncResolver with aiohttp (#114529)
* Bump aiodns to 3.2.0

changelog: https://github.com/saghul/aiodns/compare/v3.1.1...v3.2.0

* Switch to using the AsyncResolver with aiohttp

This avoids creating executor jobs to do DNS resolution

AsyncResolver was not usable before https://github.com/aio-libs/aiohttp/pull/8270
because it did not fallback to fallback to A records and only returned AAAA records
in most cases when IPv6 was available

This is a backport of https://github.com/aio-libs/aiohttp/pull/8270

* Switch to using the AsyncResolver with aiohttp

This avoids creating executor jobs to do DNS resolution

AsyncResolver was not usable before https://github.com/aio-libs/aiohttp/pull/8270
because it did not fallback to fallback to A records and only returned AAAA records
in most cases when IPv6 was available

This is a backport of https://github.com/aio-libs/aiohttp/pull/8270

* Switch to using the AsyncResolver with aiohttp

This avoids creating executor jobs to do DNS resolution

AsyncResolver was not usable before https://github.com/aio-libs/aiohttp/pull/8270
because it did not fallback to fallback to A records and only returned AAAA records
in most cases when IPv6 was available

This is a backport of https://github.com/aio-libs/aiohttp/pull/8270

* Switch to using the AsyncResolver with aiohttp

This avoids creating executor jobs to do DNS resolution

AsyncResolver was not usable before https://github.com/aio-libs/aiohttp/pull/8270
because it did not fallback to fallback to A records and only returned AAAA records
in most cases when IPv6 was available

This is a backport of https://github.com/aio-libs/aiohttp/pull/8270

* fixes

* fix mocking in next_dns

* fix unmocked calls in blink

* more mocking fixes

* more fixes

* more fixes

* Fix missing mocking in nextdns tests

extracted from #114539

* extract from context
2024-04-05 23:15:51 -04:00
Jan-Philipp Benecke 613bdebfe5
Migrate sabnzbd to use data update coordinator (#114745)
* Migrate sabnzbd to use data update coordinator

* Add to coveragerc

* Setup coordinator after migration

* Use kB/s as UoM

* Add suggested
2024-04-03 15:15:23 +02:00
Aidan Timson 17f0002549
Azure DevOps integration tests (#114577)
* Add tests to azure devops

* Remove Azure DevOps files from coverage

* Add assertion for entity registration in test_sensors()

* Remove unnecessary code in test_sensor.py

* Refactor test_sensors function

* Fix

* Test unique id

* Refactor

* Refactor reauth_flow test in azure_devops module

* Suggested changes, batched

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

* Changes

* Use snapshot

* Remove redundant entry fetch

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-04-02 21:23:55 +02:00
Joakim Sørensen a1ae4ec23d
Add sensor entities to Traccar Server (#111374) 2024-04-02 12:11:28 +02:00
epenet ad3577804b
Ensure coverage entries are sorted (#114424)
* Ensure coverage entries are sorted

* Use autofix

* Adjust

* Add comment to coverage file

* test CI

* revert CI test

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-01 14:12:24 +02:00
Lennard Beers 282cbfc048
Add eq3btsmart integration (#109291)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-28 15:20:56 -10:00
G Johansson 65230908c6
Remove deprecated forecast attribute from WeatherEntity (#110761)
* Remove deprecated forecast attribute from WeatherEntity

* Fix some

* Ruff

* ipma

* buienradar

* some more

* Some more

* More and more

* strings

* attr_forecast

* Fix nws

* Fix

* remove from coverage

* Remove recorder test

* Review comments
2024-03-27 16:51:29 +01:00
Joost Lekkerkerker c222cfd692
Add coordinator to Rova (#114288)
* Add coordinator to Rova

* Add coordinator to Rova

* Fix

* Update homeassistant/components/rova/sensor.py

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

* Fix

---------

Co-authored-by: Jan-Philipp Benecke <github@bnck.me>
2024-03-27 14:14:49 +01:00
Lenn 6423501498
Add buttons to Motionblinds BLE integration (#114227)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-03-27 11:05:26 +01:00
Lenn 7b56643278
Add select to Motionblinds BLE integration (#114228)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-03-27 10:50:04 +01:00
Lenn 70c4fa8475
Add Motionblinds BLE integration (#109497)
* initial fork

* intial tests

* Initial test coverage

* extra coverage

* complete config flow tests

* fix generated

* Update CODEOWNERS

* Move logic to PyPi library and update to pass config_flow test and pre-commit

* Remove Button, Select and Sensor platform for initial PR

* Update manifest.json

* Change info logs to debug in cover

* Use _abort_if_unique_id_configured instead of custom loop checking existing entries

* Change platforms list to PLATFORMS global

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Remove VERSION from ConfigFlow

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Replace all info logs by debug

* Use instance attributes in ConfigFlow

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Add return type and docstring to init in ConfigFlow

* Add recovery to tests containing errors

* Make NoBluetoothAdapter and NoDevicesFound abort instead of show error

* Change info logs to debug

* Add and change integration type from hub to device

* Use CONF_ADDRESS from homeassistant.const

* Move cover attributes initialization out of constructor

* Change CONF_ADDRESS in tests from const to homeassistant.const

* Remove unused part of tests

* Change 'not motion_device' to 'motion_device is None'

* Change _attr_connection_type to _connection_type

* Add connections to DeviceInfo

* Add model to DeviceInfo and change MotionBlindType values

* Remove identifiers from DeviceInfo

* Move constants from const to library

* Move calibration and running to library, re-add all platforms

* Remove platforms from init

* Remove button platform

* Remove select platform

* Remove sensor platform

* Bump motionblindsble to 0.0.4

* Remove closed, opening and closing attribute default values

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Remove CONFIG_SCHEMA from init

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Remove unused platform attributes and icons

* Re-add _attr_is_closed to GenericBlind to fix error

* Use entry.async_create_background_task for library instead of entry.async_create_task

* Move updating of position on disconnect to library

* Remove type hints, keep for _attr_is_closed

* Use DISPLAY_NAME constant from library for display name

* Add TYPE_CHECKING condition to assert in config_flow

* Re-add CONFIG_SCHEMA to __init__ to pass hassfest

* Change FlowResult type to ConfigFlowResult

* Fix import in tests

* Fix ruff import

* Fix tests by using value of enum

* Use lowercase name of MotionBlindType enum for data schema selector and translation

* Fix using name instead of value for MotionBlindType

* Improve position None handling

Co-authored-by: starkillerOG <starkiller.og@gmail.com>

* Improve tilt None handling

Co-authored-by: starkillerOG <starkiller.og@gmail.com>

* Change BLIND_TO_ENTITY_TYPE name

* Set entity name of cover to None and use DeviceInfo name

* Add base entity

* Move async_update to base entity

* Move unique ID with suffix to base class

* Add entity.py to .coveragerc

* Remove extra state attribute connection type

* Remove separate line hass.data.setdefault(DOMAIN, {})

* Remove use of field for key and translation_key in MotionCoverEntityDescription

* Remove entity translation with extra state_attributes from strings.json

* Use super().__init__(device, entry)

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

* Change if block in async_update_running

* Use if blocks in async_update_position

* Add additional scanner check before show_form

* Remove default value of device_class in MotionCoverEntityDescription

* Fix entry.data[CONF_BLIND_TYPE] uppercase

* Fix device info model name

* Bump motionblindsble to 0.0.5

* Fix tests

* Move entity_description to MotionblindsBLEEntity

* Change double roller blind name

* Bump motionblindsble to 0.0.6

* Fix ruff

* Use status_query for async_update

* Bump motionblindsble to 0.0.7

* Change bluetooth local name

* Set kw_only=True for dataclass

* Change name of GenericBlind

* Change scanner_count conditional

* Wrap async_register_callback in entry.async_on_unload

* Bump motionblindsble to 0.0.8

* Use set_create_task_factory and set_call_later_factory

* Update bluetooth.py generated

* Simplify COVER_TYPES dictionary

* Move registering callbacks to async_added_to_hass

* Remove check for ATTR_POSITION and ATTR_TILT_POSITION in kwargs

* Add naming consistency for device and entry

* Use if block instead of ternary for _attr_unique_id

* Improve errors ternary in config_flow

* Use set instead of list for running_type

* Improve errors ternary in config_flow

* Remove init from MotionblindsBLECoverEntity and move debug log to async_added_to_hass

* Update debug log create cover

* Fix ruff

* Use identity check instead of equals

* Use identity check instead of equals

* Change MotionblindsBLECoverEntityDescription name

* Change debug log text

* Remove ATTR_CONNECTION from const

* Add types for variables in async_setup_entry

* Add types for variables in async_setup_entry

* Change PositionBlind class name to PositionCover etc

* Improve docstrings

* Improve docstrings

---------

Co-authored-by: starkillerOG <starkiller.og@gmail.com>
Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-26 09:52:04 +01:00
Matrix 63b4fd09c1
Add YoLink Water Meter Support (#114148)
* Add YS-5006/5007/5008 Water Meter Support

* Add YoLink Water Meter Support

* Update .coveragerc

* fix as suggestion
2024-03-26 09:29:14 +01:00
Manuel Dipolt e2a26f6470
Add base entity to romy integration (#113750)
* cherry picked base entity changes from the branches romy_binary_sensor & romy_sensor

* Update homeassistant/components/romy/entity.py

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Update homeassistant/components/romy/vacuum.py

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Update homeassistant/components/romy/entity.py

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Update homeassistant/components/romy/vacuum.py

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* Update homeassistant/components/romy/vacuum.py

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>

* code review changes, base entity/coordinator cleanup

---------

Co-authored-by: Josef Zweck <24647999+zweckj@users.noreply.github.com>
2024-03-25 14:28:07 +01:00
Brian Rogers dbb4cf0ee7
Add Rachio smart hose timer support (#107901)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-23 07:36:03 -10:00
Federico D'Amico 5b6361080c
Add cover platform to microBees (#111135) 2024-03-22 14:31:09 +01:00
Federico D'Amico aae85edb73
Add binary sensor platform to microBees (#111190) 2024-03-22 14:01:36 +01:00
Nalin Mahajan 18ef76a018
Add Room Audio Control to Control4 Integration (#87821)
* Add control4 room based media player (#13)

* update attribute names (#14)

* change to data class and set off to idle (#15)

Co-authored-by: nalin29 <nalin29@github.com>

---------

Co-authored-by: nalin29 <nalin29@github.com>
2024-03-19 11:44:52 +01:00
Gido 1ed8232b02
Add config flow to Rova (#113596)
* Add Config Flow for Rova component

* Add tests for Rova config flow

* Fix data type

* Add rova to requirements for tests

* Removed seperate function for area check and global variable

* Add unique name and id to rova entities

* Add support for multiple rova entries

* Fix correct error after connection timeout or http error

* Revert SENSOR_TYPES update

* Add existing rova configuration from yaml as new entity

* Add tests for import configuration.yaml flow

* Cleanup code

* Update valid rova area check in config flow

* Changed abort keys and messages

* Updated using self.add_suggested_values_to_schema

* Update to pass tests

* Added missing strings

* Update sensor unique_ids

* Fix service name formatting

* Update tests for Rova entry

* Update tests to recover after error

* Update test name

* Apply suggestions from code review

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-18 18:00:54 +01:00
Jack Boswell 34b0ff40f3
Allow configuring Starlink sleep schedule (#103057)
* Expose sleep config getters and setters

* Add a switch for toggling sleep schedule

* Add Time platform

* Add frozen to dataclasses

* Update tests

* Add starlink time to coveragerc

* No more mixin

* Update time.py

* Update time.py

* Run data collectors asynchronously

* Fix timezone handling
2024-03-18 16:18:32 +01:00
Erwin Douna e882d47cde
Add Downloader config flow, including tests (#98722)
* Adding base line, including tests

* Adding validatge input and expanding tests

* Updating manifest

* Minor patch

* Revert minor patch, wrong nesting

* Adding proper translations

* Including abort message

* Update homeassistant/components/downloader/config_flow.py

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

* Rename exception class

* Refactor import

* Update strings

* Apply suggestions from code review

* Update homeassistant/components/downloader/__init__.py

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

* Update homeassistant/components/downloader/__init__.py

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

* Update homeassistant/components/downloader/__init__.py

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

* Update homeassistant/components/downloader/__init__.py

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

* Update homeassistant/components/downloader/__init__.py

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

* Update homeassistant/components/downloader/__init__.py

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

* Update homeassistant/components/downloader/__init__.py

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

* Reverting back filename and fix typing

* Reverting back mutex/lock

* Upgrade version

* Adding typing

* Removing coroutine

* Removing unload entry (for now)

* Removing comment

* Change type

* Putting download back in setup_entry

* Revert back code

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-03-18 16:16:24 +01:00
Erik Montnemery 7b20641651
Add tests of homeworks __init__ (#113581) 2024-03-17 10:22:08 +01:00
Erik Montnemery 398c38b50d
Add tests of homeworks button (#113578) 2024-03-17 10:06:57 +01:00
Erik Montnemery 1a70dbfd94
Add tests of homeworks light (#113579) 2024-03-17 09:46:36 +01:00
Erik Montnemery 8f6c4f8b33
Add tests of homeworks binary sensor (#113577) 2024-03-17 09:45:49 +01:00
dontinelli 98132d1cd3
Add Fyta integration (#110816)
* Initial commit for fyta integration

* Update __init__.py

Delete BinarySensor for first PR

* Update __init__.py

Rewind wrongful deletion of comma

* Delete homeassistant/components/fyta/binary_sensor.py

Delete binary_sensor for first pr of integration

* Update manifest.json

Updated requirement to new version of fyta_cli 0.2.1, where bug in import of modules has been resolved.

* Update requirements_test_all.txt

adjust to updated manifest

* Update requirements_all.txt

adjust to updated manifest

* Update test_config_flow.py

* Update config_flow.py

update file to correct error with _entry attribute

* Fyta integration - update initial PR based on review in initial PR #110816 (#2)

* adjustments to pass test for config_flow

* backport of changes in intitial PR to dev

* update text_config_flow

* changes based on review in initial PR #110816

* Update homeassistant/components/fyta/sensor.py

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

* Update homeassistant/components/fyta/config_flow.py

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

* Update homeassistant/components/fyta/config_flow.py

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

* Update homeassistant/components/fyta/sensor.py

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

* Update homeassistant/components/fyta/sensor.py

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

* Update homeassistant/components/fyta/coordinator.py

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

* Update homeassistant/components/fyta/config_flow.py

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

* Update homeassistant/components/fyta/strings.json

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

* Update homeassistant/components/fyta/strings.json

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

* Update homeassistant/components/fyta/manifest.json

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

* Adjustments based on PR-commet of Feb 19 (#3)

* add test for config_flow.validate_input

* update based on pr review

* update based on pr review

* further refinings based on PR review

* Update tests/components/fyta/test_config_flow.py

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

* Update test_config_flow.py

Update tests based on PR comment

* Update homeassistant/components/fyta/sensor.py

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

* Update homeassistant/components/fyta/sensor.py

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

* add handling and test for duplicate entry

* Update homeassistant/components/fyta/coordinator.py

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

* Update homeassistant/components/fyta/sensor.py

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

* Update homeassistant/components/fyta/entity.py

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

* Update test_config_flow.py

parametrize test for exceptions

* Update config_flow.py

Move _async_abort_entries_match, add arguments

* Update coordinator.py

* Update typing in coordinator.py

* Update coordinator.py

update typing

* Update coordinator.py

corrected typo

* Update coordinator.py

* Update entity.py

* Update sensor.py

* Update icons.json

* Update homeassistant/components/fyta/entity.py

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

* Update homeassistant/components/fyta/entity.py

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

* Update entity.py

* Update test_config_flow.py

* Update config_flow.py (change FlowResult to ConfigFlowResult)

* Update config_flow.py

* Update homeassistant/components/fyta/config_flow.py

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

* Update homeassistant/components/fyta/config_flow.py

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

* Update homeassistant/components/fyta/coordinator.py

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

* Update coordinator.py

* Update config_flow.py (typing FlowResult -> ConfigFlowResult)

* Update config_flow.py

* Aktualisieren von config_flow.py

* remove coordinator entities

* Update strings.json

remove plant_number

* Update icons.json

remove plant_number

* Update manifest.json

Update requirement to latest fyta_cli version

* Update requirements_all.txt

* Update requirements_test_all.txt

* Update homeassistant/components/fyta/sensor.py

* Update homeassistant/components/fyta/sensor.py

* Update homeassistant/components/fyta/coordinator.py

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

* Update homeassistant/components/fyta/coordinator.py

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

* Update homeassistant/components/fyta/coordinator.py

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

* Update homeassistant/components/fyta/entity.py

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

* Update homeassistant/components/fyta/strings.json

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

* Update homeassistant/components/fyta/strings.json

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

* Update tests/components/fyta/test_config_flow.py

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

* Update tests/components/fyta/test_config_flow.py

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

* move test-helpers into conftest.py, adjust import of coordinator.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-03-15 18:13:35 +01:00
Shay Levy e0b1531afa
Remove OpenCV integration (#113455) 2024-03-15 12:23:30 +01:00
Matthias Lohr 7359d66d32
add switch platform for tolo (#113440)
* upgrade tololib dependency to v1.0.0

* add switch to enable/disable aroma therapy

* aroma therapy and salt bath switch

* Update homeassistant/components/tolo/strings.json

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

* removed key from specific property list, it's required by default

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-14 19:10:29 +01:00
Erik Montnemery a16ea3d7bd
Deprecate the map integration (#113215)
* Deprecate the map integration

* Revert changes in DashboardsCollection._async_load_data

* Add option to allow single word in dashboard URL

* Update tests

* Translate title

* Add icon

* Improve test coverage
2024-03-14 14:04:41 +01:00
Aaron Bach 20647af5ae
Move Notion coordinator to its own module (#112756)
Co-authored-by: Cretezy <Cretezy@users.noreply.github.com>
2024-03-12 21:51:13 +01:00
Erik Montnemery 2cdf6b9937
Add binary_sensor to homeworks (#112418)
* Add binary_sensor to homeworks

* Update tests
2024-03-12 19:25:27 +01:00
Shai Ungar eb81bf1d49
Improve 17track tests (#112734)
* 17Track tests

* add 17Track sensor to coverage

* extract repeated code

* 1. _goto_future - call tick only once
2. change test name to reflect test
3. remove ifs from test

* remove undersocre from _goto_future
2024-03-10 18:57:28 +01:00
Erik Montnemery fa4c0d78e9
Restore the juicenet integration (#112578) 2024-03-07 16:41:54 +01:00
Sid d50e4f6645
Add snapshot tests to webmin (#112518)
add snapshot tests to webmin
2024-03-06 20:22:08 +01:00
Erik Montnemery a515603aaf
Add button to homeworks (#112269) 2024-03-05 19:10:13 +01:00
Isak Nyberg 0663a4be3b
Add permobil binary sensor (#112130)
* add binary sensor

* remove _LOGGER and mixin
2024-03-04 20:11:14 +01:00
Erik Montnemery 7e7f25c859
Add config flow to homeworks (#112042) 2024-03-04 19:09:39 +01:00
Isak Nyberg fb10ef9ac0
Add permobil entity (#111761)
* add permobil entity

* small fixes

* remove sensor init
2024-02-28 22:55:47 +01:00
Simone Chemelli 5c124e5fd2
Add Comelit humidifier/dehumidifier (#111203)
* Add Comelit humidifier/dehumidifier

* optimize turn_on

* fix entity naming

* raise ServiceValidationError

* apply review comment

* apply review comments

* rename HumidifierComelitAction
2024-02-28 14:15:44 +01:00
Federico D'Amico 1109aba211
Add button platform to microBees (#111141)
* add button platform to microBees

* use list comprehension for async_add_entities

* add a transaltion_key and fix list comprehension

* add panic button

* remove BUTTON_PRODUCT_IDS
2024-02-27 19:41:42 +01:00
Robert Resch d7fb949994
Deprecate mailbox platform (#110930) 2024-02-27 13:50:02 +01:00
Jeef bc20e7900c
WeatherFlow Forecast (REST API) (#106615)
* rebase off dev

* Update homeassistant/components/weatherflow_cloud/const.py

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

* Addressing 1st round of PR Comments

* Update homeassistant/components/weatherflow_cloud/config_flow.py

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

* addressing PR Comments

* fixing last comment that i can see

* Update homeassistant/components/weatherflow_cloud/coordinator.py

OOPS

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

* Update homeassistant/components/weatherflow_cloud/weather.py

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

* Update homeassistant/components/weatherflow_cloud/coordinator.py

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

* switching to station id

* Update homeassistant/components/weatherflow_cloud/strings.json

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

* addressing PR

* Updated tests to be better

* Updated tests accordingly

* REAuth flow and tests added

* Update homeassistant/components/weatherflow_cloud/strings.json

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

* Update homeassistant/components/weatherflow_cloud/coordinator.py

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

* Addressing PR comments

* Apply suggestions from code review

* ruff fix

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-02-26 22:40:21 +01:00
Erik Montnemery 730fe760cf
Remove JuiceNet integration (#111477)
* Remove JuiceNet integration

* Adjust issue

* Add test

* Fix stale DOMAIN constant
2024-02-26 21:08:36 +02:00
Sid 174ebe70d7
Add webmin integration (#106976)
* add webmin integration 1

* refactor, add memory sensors

* Fix docstring

* addressed reviews

* address reviews

* address reviews

* use translation strings for sensors

* add async_abort_entries_match

* apply review comments

* address reviews

* add async_set_unique_id

* add identifiers to device_info

* disable all sensors by default

* move icons to icons.json

* show Faults when given from server in config flow

* add test for Fault

* Apply review suggestions

* Create helper functions for webmin instance and sorted mac addresses

* fix tests
2024-02-26 17:10:11 +01:00
Federico D'Amico bf9c4197b9
Add light platform to microBees and change docstring in sensor (#111093)
* Add light platform to microBees and change docstring in sensor

* update .coveragerc

* fixes review

* fixes review

* fixes async_add_entities
2024-02-24 20:07:04 +01:00
Åke Strandberg 2614d6fece
Add tests to myuplink binary_sensor (#110995) 2024-02-21 12:32:25 +01:00
Marco Lettieri cd05972276
Add sensor platform to microBees (#111008)
* add microBees sensor

* add a sensor.py in .coveragerc

* fixes review

---------

Co-authored-by: FedDam <noceracity@gmail.com>
2024-02-20 15:32:19 +01:00
Marco Lettieri 3a4c6fc7f3
Add microBees integration (#99573)
* Create a new homeassistan integration for microBees

* black --fast homeassistant tests

* Switch platform

* rename folder

* rename folder

* Update owners

* aiohttp removed in favor of hass

* Update config_flow.py

* Update __init__.py

* Update const.py

* Update manifest.json

* Update string.json

* Update servicesMicrobees.py

* Update switch.py

* Update __init__.py

* Update it.json

* Create a new homeassistan integration for microBees

* black --fast homeassistant tests

* Switch platform

* rename folder

* rename folder

* Update owners

* aiohttp removed in favor of hass

* Update config_flow.py

* Update __init__.py

* Update const.py

* Update manifest.json

* Update string.json

* Update servicesMicrobees.py

* Update switch.py

* Update __init__.py

* Update it.json

* fixes review

* fixes review

* fixes review

* pyproject.toml

* Update package_constraints.txt

* fixes review

* bug fixes

* bug fixes

* delete microbees connector

* add other productID in switch

* added coordinator and enanchments

* added coordinator and enanchments

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* fixes from suggestions

* add test

* add test

* add test

* add test

* requested commit

* requested commit

* requested commit

* requested commit

* reverting .strict-typing and added microbees to .coveragerc

* remove log

* remove log

* remove log

* remove log

* add test for microbeesExeption and Exeption

* add test for microbeesExeption and Exeption

* add test for microbeesException and Exception

* add test for microbeesException and Exception

* add test for microbeesException and Exception

---------

Co-authored-by: FedDam <noceracity@gmail.com>
Co-authored-by: Federico D'Amico <48856240+FedDam@users.noreply.github.com>
2024-02-19 15:12:03 +01:00
kingy444 6e2f64fdc2
Add number platform to powerview to control velocity on gen 3 hubs (#110724)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-02-17 09:52:13 -06:00
jimmyd-be 6f74ea9186
Add breeze switch to Renson integration (#101641)
* Add breeze switch

* Cleanup code

* Replace switch entity with new fan entity

* Revert "Replace switch entity with new fan entity"

This reverts commit 4fc1ac22e67091a7e980aefd217652f2a88bed17.
2024-02-16 17:56:09 +01:00
Matthew FitzGerald-Chamberlain ce8cf314f9
Add Aprilaire integration (#95093)
* Add Aprilaire integration

* Fix test errors

* Update constants

* Code review cleanup

* Reuse coordinator from config flow

* Code review fixes

* Remove unneeded tests

* Improve translation

* Code review fixes

* Remove unneeded fixture

* Code review fixes

* Code review updates

* Use base data coordinator

* Deduplicate based on MAC

* Fix tests

* Check mac address on init

* Fix mypy error

* Use config entry ID for entity unique ID

* Fix tests

* Code review updates

* Fix mypy errors

* Code review updates

* Add data_description

* Update homeassistant/components/aprilaire/coordinator.py

Co-authored-by: Jon Oberheide <506986+jonoberheide@users.noreply.github.com>

* Update .coveragerc

* Update homeassistant/components/aprilaire/coordinator.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Jon Oberheide <506986+jonoberheide@users.noreply.github.com>
2024-02-16 08:30:51 +01:00
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