Commit Graph

755 Commits (c46cccc3cd30130973b93a6ed679e5aa7d60f098)

Author SHA1 Message Date
Marc Mueller 881e201a15
Set platform for mypy (#115638) 2024-04-15 14:12:26 +02:00
Marc Mueller 6422bc4c19
Set follow_imports to normal [mypy] (#115521) 2024-04-15 00:26:06 +02:00
Steven B 6954fcc8ad
Add strict typing to ring integration (#115276) 2024-04-11 10:10:56 +02:00
Mischa Siekmann 6d54f686a6
Add Integration for Energenie Power-Sockets (#113097)
* Integration for Energenie Power-Strips (EGPS)

* cleanups reocommended by reviewer

* Adds missing exception handling when trying to send a command to an unreachable device.

* fix: incorrect handling of already opened devices in pyegps api. bump to pyegps=0.2.4

* Add blank line after file docstring, and other cosmetics

* change asyncio.to_thread to async_add_executer_job

* raises HomeAssistantError EgpsException in switch services.

* switch test parameterized by entity name

* reoved unused device registry

* add translation_key and update_before_add

* bump pyegps dependency to version to 0.2.5

* combined get_device patches and put into conftest.py

* changed switch entity to use _attr_is_on and cleanups

* further cleanup

* Apply suggestions from code review

* refactor: rename egps to energenie_power_sockets

* updated test snapshot

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-03-29 13:29:14 +01: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
Franck Nijhof 2388e2dda9
Drop Python 3.11 support (#114220) 2024-03-26 12:51:14 +01:00
Erik Montnemery 68141873cd
Enable strict typing of homeworks (#112267) 2024-03-04 19:50:33 +01:00
Stackie Jia 636c7ce350
Enable strict type checking on apple_tv integration (#101688)
* Enable strict type checking on apple_tv integration

* move some instance variables to class variables

* fix type of attr_value

* fix tests for description_placeholders assertion

* nits

* Apply suggestions from code review

* Update remote.py

* Apply suggestions from code review

* Update __init__.py

* Update __init__.py

* Update __init__.py

* Update config_flow.py

* Improve test coverage

* Update test_config_flow.py

* Update __init__.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-02-15 15:17:00 +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
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
Dave Leaver e3a73c12bc
Add airtouch5 (#98136)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-01-23 14:49:47 +01:00
Joost Lekkerkerker d9f1450ee6
Add Homeassistant Analytics Insights integration (#107634)
* Add Homeassistant Analytics integration

* Add Homeassistant Analytics integration

* Add Homeassistant Analytics integration

* Fix feedback

* Fix test

* Update conftest.py

* Add some testcases

* Make code clear

* log exception

* Bump python-homeassistant-analytics to 0.2.1

* Bump python-homeassistant-analytics to 0.3.0

* Change domain to homeassistant_analytics_consumer

* Add integration name to config flow selector

* Update homeassistant/components/homeassistant_analytics_consumer/manifest.json

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

* Fix hassfest

* Apply suggestions from code review

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

* Bump python-homeassistant-analytics to 0.4.0

* Rename to Home Assistant Analytics Insights

* Update homeassistant/components/analytics_insights/config_flow.py

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

* Update homeassistant/components/analytics_insights/manifest.json

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

* Rename to Home Assistant Analytics Insights

* add test

* Fallback to 0 when there is no data found

* Allow to select any integration

* Fix tests

* Fix tests

* Update tests/components/analytics_insights/conftest.py

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

* Update tests/components/analytics_insights/test_sensor.py

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

* Fix format

* Fix tests

---------

Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-01-23 10:32:31 +01:00
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
Marc Mueller b07b952ae6
Enable strict typing for intent_script (#108367) 2024-01-19 13:37:33 +01:00
Marc Mueller d7a9b7a4ab
Enable strict typing for map (#108368) 2024-01-19 13:36:44 +01:00
Marc Mueller e785b2f5bb
Enable strict typing for my (#108369) 2024-01-19 13:35:12 +01:00
Marc Mueller c6f1c4f550
Enable strict typing for default_config (#108366) 2024-01-19 13:34:40 +01:00
Marc Mueller 15bd31e8d8
Enable strict typing for api (#108363) 2024-01-19 13:33:20 +01:00
Marc Mueller 7e0e306c1f
Enable strict typing for bluetooth_adapters (#108365) 2024-01-19 13:18:05 +01:00
Marc Mueller afcb7a26cd
Enable strict typing for config (#108023) 2024-01-18 09:20:19 +01:00
Christophe Gagnier 44f2b8e6a3
Implement TechnoVE integration (#106029)
* Implement TechnoVE integration

Only the basic sensors for now.

* Add technoVE to strict typing

* Implement TechnoVE PR suggestions

* Remove Diagnostic from TechnoVE initial PR

* Switch status sensor to Enum device class

* Revert zeroconf for adding it back in subsequent PR

* Implement changes from feedback in TechnoVE PR

* Update homeassistant/components/technove/models.py

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

* Update homeassistant/components/technove/sensor.py

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

* Update homeassistant/components/technove/models.py

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

* Remove unnecessary translation keys

* Fix existing technoVE tests

* Use snapshot testing for TechnoVE sensors

* Improve unit tests for TechnoVE

* Add missing coverage for technoVE config flow

* Add TechnoVE coordinator tests

* Modify device_fixture for TechnoVE from PR Feedback

* Change CONF_IP_ADDRESS to CONF_HOST for TechnoVE

* Update homeassistant/components/technove/config_flow.py

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

* Update homeassistant/components/technove/models.py

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

* Update homeassistant/components/technove/models.py

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

* Implement feedback from TechnoVE PR

* Add test_sensor_update_failure to TechnoVE sensor tests

* Add test for error recovery during config flow of TechnoVE

* Remove test_coordinator.py from TechnoVE

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
2024-01-17 11:04:35 +01:00
Josef Zweck 6bc36666b1
Add integration lamarzocco (#102291)
Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
Co-authored-by: Abílio Costa <abmantis@users.noreply.github.com>
Co-authored-by: Paul Bottein <paul.bottein@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: tronikos <tronikos@users.noreply.github.com>
Co-authored-by: Luke Lashley <conway220@gmail.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: dupondje <jean-louis@dupond.be>
2024-01-16 15:24:16 +01:00
Marc Mueller 6a9fdaae7a
Enable strict typing for onboarding (#108097) 2024-01-15 16:53:24 +01:00
Marc Mueller 84038fb119
Enable strict typing for generic_thermostat (#108024) 2024-01-15 09:19:50 +01:00
Marc Mueller 16f110658c
Enable strict typing for duckdns (#108022) 2024-01-15 09:09:57 +01:00
Marc Mueller 5bde007048
Enable strict typing for prometheus (#108025) 2024-01-15 09:07:12 +01:00
Marc Mueller 01204356fa
Enable strict typing for timer (#107915) 2024-01-14 09:40:14 +01:00
Marc Mueller ec708811d0
Enable strict typing for trace (#107945) 2024-01-14 09:39:22 +01:00
Marc Mueller 88d7fc87c9
Enable strict typing for shopping_list (#107913) 2024-01-14 09:38:53 +01:00
Marc Mueller 5e79a0e583
Enable strict typing for search (#107912) 2024-01-13 10:40:50 -10:00
Marc Mueller 9221f5da10
Enable strict typing for webhook (#107946) 2024-01-13 09:08:26 -10:00
Marc Mueller 0cc43d0915
Enable strict typing for xiaomi_ble (#107948) 2024-01-13 16:57:54 +01:00
Marc Mueller 7c98c1e544
Enable strict typing for rest_command (#107911) 2024-01-13 08:48:42 +01:00
Marc Mueller ca1aaacc90
Enable strict typing for system_log (#107914) 2024-01-12 21:21:11 -10:00
Marc Mueller a9420bf05a
Enable strict typing for ios (#107382) 2024-01-12 14:43:17 +01:00
Marc Mueller 93dc0b9029
Enable strict typing for ecowitt (#107861) 2024-01-12 12:57:19 +01:00
Marc Mueller 7e28c788cb
Enable strict typing for bthome (#107859) 2024-01-12 12:56:13 +01:00
Marc Mueller 7023ac7366
Enable strict typing for cert_expiry (#107860) 2024-01-12 12:32:17 +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
Marc Mueller 3632d6be46
Enable strict typing for dlna_dms (#107305) 2024-01-08 10:45:51 +01:00
Marc Mueller d0e6ce193c
Enable strict typing for tod (#107284) 2024-01-08 10:44:47 +01:00
Marc Mueller c30bf1f6e1
Enable strict typing for nightscout (#107307) 2024-01-08 10:43:40 +01:00
Marc Mueller b22cd2deaa
Enable strict typing for system_health (#107283) 2024-01-08 10:40:49 +01:00
Marc Mueller 3c7a9272fa
Enable strict typing for intent (#107282) 2024-01-08 10:09:48 +01:00
Marc Mueller 78752264b3
Fully type homeassistant integration (#107380) 2024-01-08 10:07:30 +01:00
Marc Mueller 5ae419367e
Enable strict typing for generic_hygrostat (#107272) 2024-01-08 09:59:31 +01:00
Marc Mueller 265f587768
Enable strict typing for history_stats (#107273) 2024-01-08 09:58:07 +01:00
Marc Mueller f5d5e1dcbb
Enable strict typing for google_assistant_sdk (#107306) 2024-01-08 09:47:17 +01:00
Joost Lekkerkerker 7202126751
Add Met eireann to strict typing (#107486) 2024-01-08 09:13:15 +01:00
Marc Mueller e4ff51fa9a
Enable strict typing for youtube (#107440) 2024-01-07 10:43:54 +01:00
Marc Mueller d8c79964c8
Enable strict typing for waqi (#107439) 2024-01-07 10:43:42 +01:00
Marc Mueller be68feffdd
Enable strict typing for enphase_envoy (#107436) 2024-01-06 23:42:38 -10:00
Marc Mueller 5a39503acc
Enable strict typing for led_ble (#107437) 2024-01-06 23:41:54 -10:00
Marc Mueller de3fde5901
Enable strict typing for oralb (#107438) 2024-01-06 23:41:31 -10:00
Marc Mueller 902d5a79ca
Enable strict typing for p1_monitor (#107301) 2024-01-06 10:38:50 +01:00
Marc Mueller 135a718a0e
Enable strict typing for energyzero (#107300) 2024-01-06 10:33:22 +01:00
Marc Mueller 28c0c2d2ad
Enable strict typing for easyenergy (#107299) 2024-01-06 10:31:55 +01:00
Marc Mueller b2a4de6eed
Enable strict typing for duotecno (#107261) 2024-01-05 18:39:18 +01:00
Marc Mueller de72bbfaad
Enable strict typing for minecraft_server (#107262) 2024-01-05 18:38:31 +01:00
Marc Mueller f0b47bf00c
Enable strict typing for downloader (#107263) 2024-01-05 18:35:05 +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
Scott K Logan f249563608
Add Rainforest RAVEn integration (#80061)
* Add Rainforest RAVEn integration

* Add Rainforest Automation brand

* Add diagnostics to Rainforest RAVEn integration

* Drop a test assertion for an undefined behavior

* Add DEVICE_NAME test constant

* Catch up with reality

* Use Platform.SENSOR

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

* Make rainforest_raven translatable

* Stop setting device_class on unsupported scenarios

* Rename rainforest_raven.data -> rainforest_raven.coordinator

* Make _generate_unique_id more reusable

* Move device synchronization into third party library

* Switch from asyncio_timeout to asyncio.timeout

* Ignore non-electric meters

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

* Drop direct dependency on iso4217, bump aioraven

* Use RAVEn-specific exceptions

* Add timeouts to data updates

* Move DeviceInfo generation from Sensor to Coordinator

* Store meter macs as strings

* Convert to using SelectSelector

* Drop test_flow_user_invalid_mac

This test isn't necessary now that SelectSelector is used.

* Implement PR feedback

- Split some long format lines
- Simplify meter mac_id extraction in diagnostics
- Expose unique_id using an attribute instead of a property
- Add a comment about the meters dictionary shallow copy

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

* Simplify mac address redaction

Co-authored-by: Joakim Sørensen <ludeeus@ludeeus.dev>

* Freeze RAVEnSensorEntityDescription dataclass

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

---------

Co-authored-by: Robert Resch <robert@resch.dev>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Joakim Sørensen <ludeeus@ludeeus.dev>
2024-01-05 14:00:54 +01:00
Marc Mueller b3f997156a
Enable strict typing for counter (#106906) 2024-01-03 09:06:26 +01:00
Marc Mueller 1526c321f1
Enable strict typing for axis (#106844) 2024-01-02 20:55:59 +01:00
Marc Mueller 43fa51b696
Enable strict typing for blueprint (#106887) 2024-01-02 20:48:51 +01:00
Marc Mueller fde03d7888
Enable strict typing for co2signal (#106888) 2024-01-02 20:41:39 +01:00
Marc Mueller dcee8e67c4
Add strict typing to command_line (#106889)
* Add strict typing to command_line

* Code review
2024-01-02 20:04:28 +01:00
Franck Nijhof 2d0325a471
Mark stt entity component as strictly typed (#106723)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-01-02 17:07:47 +01:00
Erik Montnemery 8f9bd75a36
Enable strict typing of date_time (#106868)
* Enable strict typing of date_time

* Fix parse_datetime

* Add test

* Add comments

* Update tests/util/test_dt.py

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

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2024-01-02 13:57:25 +01:00
Marc Mueller 6e6575afe5
Enable strict typing for apache_kafka (#106823) 2024-01-02 13:29:38 +01:00
Franck Nijhof 06fa306821
Mark humidifier entity component as strictly typed (#106721)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2024-01-02 13:29:07 +01:00
Marc Mueller 4747460286
Enable strict typing for arwn (#106840) 2024-01-02 13:07:47 +01:00
Marc Mueller 8903aecb77
Enable strict typing for airthings (#106814) 2024-01-02 11:38:20 +01:00
Marc Mueller d93d25a7d1
Enable strict typing for ambiclimate (#106819) 2024-01-01 18:09:22 -10:00
Marc Mueller aec8dc13b2
Improve acmeda typing (#106812) 2024-01-01 22:16:22 +01:00
Marc Mueller 73ccd0d310
Enable strict typing for arcam_fmj (#106837) 2024-01-01 21:12:29 +01:00
Marc Mueller 33f8a364ab
Enable strict typing for arris_tg2492lg (#106838) 2024-01-01 20:47:37 +01:00
Marc Mueller 8501b2e71b
Enable strict typing for asterisk_cdr + asterisk_mbox (#106841) 2024-01-01 20:45:16 +01:00
Marc Mueller 3b0d877b5e
Enable strict typing for amberelectric (#106817) 2024-01-01 20:35:34 +01:00
Marc Mueller c5c132e1d4
Enable strict typing for airq (#106813) 2024-01-01 20:33:38 +01:00
Marc Mueller f67bae2cde
Enable strict typing for aruba (#106839) 2024-01-01 20:33:15 +01:00
Marc Mueller 800351287b
Enable strict typing for aquostv (#106836) 2024-01-01 20:32:29 +01:00
Marc Mueller 0077989169
Enable strict typing for alpha_vantage (#106816) 2024-01-01 20:19:19 +01:00
Marc Mueller 4e0c0cf2ca
Enable strict typing for androidtv (#106820) 2024-01-01 20:15:01 +01:00
Marc Mueller 06a5e25853
Enable strict typing for anel_pwrctrl (#106821) 2024-01-01 20:14:34 +01:00
Marc Mueller c37e268030
Enable strict typing for aprs (#106824) 2024-01-01 20:14:00 +01:00
Marc Mueller 3433e1d349
Enable strict typing for airthings_ble (#106815) 2024-01-01 18:56:44 +01:00
Franck Nijhof b1dd064f2d
Mark time entity component as strictly typed (#106720) 2023-12-31 02:52:59 +01:00
Franck Nijhof 1849d68e78
Mark siren entity component as strictly typed (#106719) 2023-12-30 20:21:33 +01:00
Franck Nijhof ff25211bf9
Mark wake_word entity component as strictly typed (#106724) 2023-12-30 20:20:33 +01:00
Franck Nijhof 2a6a347cd0
Mark datetime entity component as strictly typed (#106717) 2023-12-30 15:47:08 +01:00
Franck Nijhof faa2129e96
Mark todo entity component as strictly typed (#106718) 2023-12-30 14:32:44 +01:00
Franck Nijhof 4764af96a8
Mark date entity component as strictly typed (#106716) 2023-12-30 14:23:43 +01:00
Josef Zweck 02b863e968
Add tedee integration (#102846)
* init tedee

* init tests

* add config flow tests

* liniting

* test

* undo

* linting

* pylint

* add tests

* more tests

* more tests

* update snapshot

* more tests

* typing

* strict typing

* cleanups

* cleanups, fix tests

* remove extra platforms

* remove codeowner

* improvements

* catch tedeeclientexception

* allow bridge selection in CF

* allow bridge selection in CF

* allow bridge selection in CF

* allow bridge selection in CF

* abort earlier

* auto-select bridge

* remove cloud token, optionsflow to remove size

* remove options flow leftovers

* improve coverage

* defer coordinator setting to after first update

* define coordinator

* some improvements

* remove diagnostics, webhook

* remove reauth flow, freeze data classes

* fix lock test

* Update homeassistant/components/tedee/entity.py

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

* Update homeassistant/components/tedee/__init__.py

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

* Update homeassistant/components/tedee/config_flow.py

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

* Update homeassistant/components/tedee/entity.py

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

* Update homeassistant/components/tedee/entity.py

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

* requested changes

* requested changes

* Update lock.py

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

* Update entity.py

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

* Update lock.py

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

* Update config_flow.py

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

* Update config_flow.py

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

* Update config_flow.py

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

* requested changes

* Update tests/components/tedee/test_lock.py

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

* Update tests/components/tedee/test_lock.py

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

* Update tests/components/tedee/test_lock.py

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

* Update tests/components/tedee/test_lock.py

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

* Update tests/components/tedee/conftest.py

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

* Update homeassistant/components/tedee/coordinator.py

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

* Update homeassistant/components/tedee/lock.py

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

* Update tests/components/tedee/test_config_flow.py

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

* Update homeassistant/components/tedee/strings.json

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

* Update homeassistant/components/tedee/strings.json

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

* Update homeassistant/components/tedee/lock.py

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

* Update homeassistant/components/tedee/strings.json

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

* Update homeassistant/components/tedee/lock.py

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

* requested changes

* requested changes

* requested changes

* revert load fixture

* change tests

* Update test_config_flow.py

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

* Update strings.json

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

* Update coordinator.py

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

* remove warning

* move stuff out of try

* add docstring

* tedee lowercase, time.time

* back to some uppercase, time.time

* awaitable

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-29 14:55:41 +01:00
Joost Lekkerkerker e469c6892b
Add Airnow to strict typing (#105566) 2023-12-23 15:16:15 -10:00
Sid bd6e2c54e1
Use shorthand attributes in enigma2 (#106318)
* enigma2: add strict typing, change property functions to _attr_*

* applied changes of review

* changes from review
2023-12-23 23:12:03 +01:00
Floris272 8b0d19aca2
Add bluecurrent integration (#82483)
* Add bluecurrent integration

* Apply feedback

* Rename integration

* changed constants and removed strings.sensor.json

* update blue_current integration

* update bluecurrent-api to 1.0.4

* Update bluecurrent-api to 1.0.5

* Apply feedback

* Remove translation

* Apply feedback

* Use customer_id as unique id

* Apply feedback

* Add @pytest.mark.parametrize

* Replace loop.create_task with async_create_task
2023-12-22 16:34:16 +01:00
RJPoelstra 2c2e6171e2
Add integration for Vogel's MotionMount (#103498)
* Skeleton for Vogel's MotionMount support.

* Generated updates.

* Add validation of the discovered information.

* Add manual configuration

* Use a mac address as a unique id

* Add tests for config_flow

* Add a 'turn' sensor entity.

* Add all needed sensors.

* Add number and select entity for control of MotionMount

* Update based on development checklist

* Preset selector now updates when a preset is chosen

* Fix adding presets selector to device

* Remove irrelevant TODO

* Bump python-MotionMount requirement

* Invert direction of turn slider

* Prepare for PR

* Make sure entities have correct values when created

* Use device's mac address as unique id for entities.

* Fix missing files in .coveragerc

* Remove typing ignore from device library.

Improved typing also gave rise to the need to improve the callback mechanism

* Improve typing

* Convert property to shorthand form

* Remove unneeded CONF_NAME in ConfigEntry

* Add small comment

* Refresh coordinator on notification from MotionMount

* Use translation for entity

* Bump python-MotionMount

* Raise `ConfigEntryNotReady` when connect fails

* Use local variable

* Improve exception handling

* Reduce duplicate code

* Make better use of constants

* Remove unneeded callback

* Remove other occurrence of unneeded callback

* Improve removal of suffix

* Catch 'getaddrinfo' exception

* Add config flow tests for invalid hostname

* Abort if device with same hostname is already configured

* Make sure we connect to a device with the same unique id as configured

* Convert function names to snake_case

* Remove unneeded commented-out code

* Use tuple

* Make us of config_entry id when mac is missing

* Prevent update of entities when nothing changed

* Don't store data in `hass.data` until we know we will proceed

* Remove coordinator

* Handle situation where mac is EMPTY_MAC

* Disable polling

* Fix failing hassfest

* Avoid calling unique-id-less discovery handler for situations where we've an unique id
2023-12-22 12:04:58 +01:00
David Bonnes aa9f00099d
Make evohome strictly typed (#106012)
* initial commit

* return to conventional approach

* add type hint for wrapper

* use walrus operator
2023-12-21 13:22:42 +01:00
Miguel Camba 5175737b60
Add Valve integration (#102184)
* Add Valve integration.

This adds the valve integration discussed in https://github.com/home-assistant/architecture/discussions/975
Most of the code is taken from the cover integration but simplified since valves
can't tilt.

There are a couple outstanding errors I'm not sure how to solve and prevents
me from even making this commit without `--no-verify`.

* Apply PR feedback

* Apply more feedback: Intruduce the bare minimum

* Remove file commited by mistake

* Hopefully this fixes tests

* Match cover's typing and mypy settings

* Change some configuration files

* Fix test

* Increase code coverage a little

* Code coverate inproved to 91%

* 95% code coverage

* Coverate up to 97%

* Coverage 98%

* Apply PR feedback

* Even more feedback

* Add line I shouldn't have removed

* Derive closed/open state from current position

* Hopefully last feedback

* Update homeassistant/components/valve/__init__.py

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

* Update homeassistant/components/valve/__init__.py

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

* Remove unnecesary translation

* Remove unused method arguments

* Complete code coverage

* Update homeassistant/components/valve/__init__.py

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

* Simplify tests

* Update homeassistant/components/valve/__init__.py

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

* Apply last feedback

* Update tests/components/valve/test_init.py

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

* Update tests/components/valve/test_init.py

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

* Update tests/testing_config/custom_components/test/valve.py

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

* More feedback

* Apply suggestion

* And more feedback

* Apply feedback

* Remove commented code

* Reverse logic to unindent

* Update homeassistant/components/valve/__init__.py

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

* Update homeassistant/components/valve/__init__.py

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

* Implement stop valve for Mock valve

* Fix tests now that I've implemented stop_valve

* Assert it's neither opening nor closing

* Use current position instead

* Avoid scheduling executor when opening or closing

* Fix incorrect bitwise operation

* Simplify toggle

* Remove uneeded partial functions

* Make is_last_toggle_direction_open private

* Remove valve from test custom integration

* Improve test coverage

* Address review comments

* Address review comments

* Address review comments

* Update homeassistant/components/valve/__init__.py

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

* Update tests

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
2023-12-18 19:48:00 +01:00