Commit graph

662 commits

Author SHA1 Message Date
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