Commit Graph

224 Commits

Author SHA1 Message Date
j-stienstra 0ae5b9e880
Add Jellyfin integration (#44401)
* Initial commit after scaffold setup

* Add initial config flow

* Create initial entity

* Ready for testing

* Can browse, no result yet

* Further improvements. Browsing is working.
Now need to work on proper stream URL

* Two valid URLs. Do not play in HA

* First working version for music

* Add thumbnail

* Includes Artist->Album hierarchy

* Add sorting of artists, albums and tracks

* Remove code for video libraries

* Improved code styling

* Optimize configuration flow

* Fix unit tests for config flow

* Fix import order

* Conform to style requirements

* Use empty string as media type for non playables

* 100% code coverage config_flow

* Type async_get_media_source

* Final docsctring fix after rebase

* Add __init__ and media_source files to .coveragerc

* Fix testing issues after rebase

* Fix string format issues and relative const import

* Remove unused manifest entries

* Raise ConfigEntry exceptions, not log errors

* Upgrade dependency to avoid WARNING on startup

* Change to builtin tuple and list (deprecation)

* Log broad exceptions

* Add strict typing

* Further type fixes after rebase

* Retry when cannot connect, otherwise fail setup

* Remove unused CONFIG_SCHEMA

* Enable strict typing checks

* FlowResultDict -> FlowResult

* Code quality improvements

* Resolve mypy.ini merge conflict

* Use unique userid generated by Jellyfin

* Update homeassistant/components/jellyfin/config_flow.py

Remove connection class from config flow

Co-authored-by: Milan Meulemans <milan.meulemans@live.be>

* Minor changes for additional checks after rebase

* Remove title from string and translations

* Changes wrt review

* Fixes based on rebase and review suggestions

* Move client initialization to separate file

* Remove persistent_notification, add test const.py

Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
2021-11-12 14:57:40 +01:00
Maikel Punie 6a21b241c0
Velbus typing part 2 (#59148) 2021-11-11 13:46:35 +01:00
Paulus Schoutsen 296f678d52
Add Evil Genius Labs integration (#58720)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-08 08:56:27 -08:00
Franck Nijhof fdf1bfa140
Add RDW Vehicle information integration (#59240) 2021-11-06 19:34:51 +01:00
Martin Hjelmare c0801c1233
Type vlc_telnet strictly (#59154) 2021-11-05 14:42:08 +01:00
Franck Nijhof d126d88977
Add Button entity component platform (#57642)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-11-04 16:50:43 +01:00
Aaron Bach f7dea3aa1d
Add Ridwell integration (#57590) 2021-10-30 08:27:48 -06:00
Jonathan Keljo 687c40a622
Enable strict typing for greeneye_monitor (#58571)
* Enable strict typing for greeneye_monitor

* Fix pylint
2021-10-29 18:54:40 -07:00
Guido Schmitz f1884d34e9
Add devolo home network integration (#45866)
Co-authored-by: Markus Bong <2Fake1987@gmail.com>
Co-authored-by: Markus Bong <Markus.Bong@devolo.de>
2021-10-28 22:42:10 +02:00
Marc Mueller ced89d8f29
Enable strict typing - bmw_connected_drive (#58506) 2021-10-27 12:32:10 -05:00
Marc Mueller b60934b10d
Enable type checking - bmw_connected_drive (#58310) 2021-10-26 13:27:26 -05:00
Franck Nijhof 65b19da3ff
Refactor input_select (#53334) 2021-10-25 20:38:06 -07:00
Allen Porter 31aa168bbb
Fix bug in MediaSource definintion and enable strict type checking (#58321) 2021-10-24 11:39:39 +02:00
Yuval Aboulafia a9ccd70e71
Fully type Jewish Calendar (#56232) 2021-10-22 23:11:41 +02:00
Robert Hillis 23710d1496
Add strict typing to modem_callerid (#57683) 2021-10-22 22:04:06 +02:00
J. Nick Koston c7b4542624
Enable strict typing in lookin (#58238) 2021-10-22 20:14:33 +02:00
Robert Hillis da7b67cc29
Add strict typing to efergy (#57682) 2021-10-22 18:20:39 +02:00
Robert Hillis 19d812602e
Activate strict typing for nfandroidtv (#57743)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-15 10:27:26 +02:00
Robert Hillis abf6720cd3
Add strict typing to goalzero (#57680) 2021-10-15 00:20:08 +02:00
Franck Nijhof 82160fa350
Add config flow to Stookalert (#57119) 2021-10-08 11:34:22 +02:00
Aaron Bach 2ba8e1030c
Ensure that WattTime is strictly typed (#57130) 2021-10-07 12:40:10 +02:00
Tomasz 08cebb247f
Activate mypy for rpi_power (#57047) 2021-10-04 22:13:11 +02:00
Maciej Bieniek f3c76fb859
Add strict typing to Tractive integration (#56948)
* Strict typing

* Add few missing types

* Run hassfest

* Fix mypy errors

* Use List instead of list
2021-10-03 09:13:12 +02:00
icemanch a95c6b10f7
Flux led config flow (#56354)
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-10-02 07:19:36 -10:00
Milan Meulemans e757cb2ab4
Strictly type Nanoleaf (#56852) 2021-09-30 16:48:28 -05:00
jan iversen 19685ecff0
Set strict typing for modbus. (#56779) 2021-09-29 16:15:55 +03:00
Michael Chisholm a28fd7d61b
Config-flow for DLNA-DMR integration (#55267)
* Modernize dlna_dmr component: configflow, test, types

* Support config-flow with ssdp discovery
* Add unit tests
* Enforce strict typing
* Gracefully handle network devices (dis)appearing

* Fix Aiohttp mock response headers type to match actual response class

* Fixes from code review

* Fixes from code review

* Import device config in flow if unavailable at hass start

* Support SSDP advertisements

* Ignore bad BOOTID, fix ssdp:byebye handling

* Only listen for events on interface connected to device

* Release all listeners when entities are removed

* Warn about deprecated dlna_dmr configuration

* Use sublogger for dlna_dmr.config_flow for easier filtering

* Tests for dlna_dmr.data module

* Rewrite DMR tests for HA style

* Fix DMR strings: "Digital Media *Renderer*"

* Update DMR entity state and device info when changed

* Replace deprecated async_upnp_client State with TransportState

* supported_features are dynamic, based on current device state

* Cleanup fully when subscription fails

* Log warnings when device connection fails unexpectedly

* Set PARALLEL_UPDATES to unlimited

* Fix spelling

* Fixes from code review

* Simplify has & can checks to just can, which includes has

* Treat transitioning state as playing (not idle) to reduce UI jerking

* Test if device is usable

* Handle ssdp:update messages properly

* Fix _remove_ssdp_callbacks being shared by all DlnaDmrEntity instances

* Fix tests for transitioning state

* Mock DmrDevice.is_profile_device (added to support embedded devices)

* Use ST & NT SSDP headers to find DMR devices, not deviceType

The deviceType is extracted from the device's description XML, and will not
be what we want when dealing with embedded devices.

* Use UDN from SSDP headers, not device description, as unique_id

The SSDP headers have the UDN of the embedded device that we're interested
in, whereas the device description (`ATTR_UPNP_UDN`) field will always be
for the root device.

* Fix DMR string English localization

* Test config flow with UDN from SSDP headers

* Bump async-upnp-client==0.22.1, fix flake8 error

* fix test for remapping

* DMR HA Device connections based on root and embedded UDN

* DmrDevice's UpnpDevice is now named profile_device

* Use device type from SSDP headers, not device description

* Mark dlna_dmr constants as Final

* Use embedded device UDN and type for unique ID when connected via URL

* More informative connection error messages

* Also match SSDP messages on NT headers

The NT header is to ssdp:alive messages what ST is to M-SEARCH responses.

* Bump async-upnp-client==0.22.2

* fix merge

* Bump async-upnp-client==0.22.3

Co-authored-by: Steven Looman <steven.looman@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-27 15:47:01 -05:00
Teemu R b40d229369
Rework TPLink integration to use python-kasa (#56701)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Teemu R. <tpr@iki.fi>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-27 14:11:55 -05:00
Andre Richter a5c6a65161
Activate mypy for Vallox (#55874) 2021-09-23 10:59:28 -07:00
Joakim Sørensen 98d0c84468
Enable strict typing for the tautulli integration (#55448) 2021-09-23 16:56:21 +02:00
jan iversen 34de74d869
Strictly type tradfri config_flow.py (#56391)
* Strictly type config_flow.py.

* Review comments.
2021-09-21 16:23:10 +02:00
Daniel Hjelseth Høyer 00f7548fa0
Surepetcare, strict typing (#56425)
* Surepetcare, strict typing

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>

* Surepetcare, strict typing

Signed-off-by: Daniel Hjelseth Høyer <github@dahoiv.net>
2021-09-19 20:57:28 +02:00
jan iversen 476d04e2fb
Activate mypy. (#55965) 2021-09-18 10:02:24 +01:00
Simone Chemelli 4160a5ee3b
Strict typing for SamsungTV (#53585)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-09-17 18:51:07 -10:00
jan iversen 94f06f86cf
Activate mypy for gpmdp. (#55967) 2021-09-16 20:05:08 +03:00
jan iversen 53d5a59257
Activate mypy for directv (#55963)
* Activate mypy for directv.

* Activate mypy for directv.
2021-09-15 07:58:04 +02:00
Ricardo Steijn 2a51bb5bba
Add Crownstone integration (#50677) 2021-09-14 09:46:52 -10:00
starkillerOG 5f86388f1c
Netgear config flow (#54479)
* Original work from Quentame

* Small adjustments

* Add properties and method_version

* fix unknown name

* add consider_home functionality

* fix typo

* fix key

* swao setup order

* use formatted mac

* add tracked_list option

* add options flow

* add config flow

* add config flow

* clean up registries

* only remove if no other integration has that device

* tracked_list formatting

* convert tracked list

* add import

* move imports

* use new tracked list on update

* use update_device instead of remove

* add strings

* initialize already known devices

* Update router.py

* Update router.py

* Update router.py

* small fixes

* styling

* fix typing

* fix spelling

* Update router.py

* get model of router

* add router device info

* fix api

* add listeners

* update router device info

* remove method version option

* Update __init__.py

* fix styling

* ignore typing

* remove typing

* fix mypy config

* Update mypy.ini

* add options flow tests

* Update .coveragerc

* fix styling

* Update homeassistant/components/netgear/__init__.py

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

* Update homeassistant/components/netgear/__init__.py

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

* Update homeassistant/components/netgear/__init__.py

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

* Update homeassistant/components/netgear/config_flow.py

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

* Update homeassistant/components/netgear/router.py

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

* add ConfigEntryNotReady

* Update router.py

* use entry.async_on_unload

* Update homeassistant/components/netgear/device_tracker.py

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

* use cv.ensure_list_csv

* add hostname property

* Update device_tracker.py

* fix typo

* fix isort

* add myself to codeowners

* clean config flow

* further clean config flow

* deprecate old netgear discovery

* split out _async_remove_untracked_registries

* Update homeassistant/components/netgear/config_flow.py

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

* Update homeassistant/components/netgear/config_flow.py

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

* cleanup

* fix rename

* fix typo

* remove URL option

* fixes

* add sensor platform

* fixes

* fix removing multiple entities

* remove extra attributes

* initialize sensors correctly

* extra sensors disabled by default

* fix styling and unused imports

* fix tests

* Update .coveragerc

* fix requirements

* remove tracked list

* remove tracked registry editing

* fix styling

* fix discovery test

* simplify unload

* Update homeassistant/components/netgear/router.py

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

* add typing

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

* add typing

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

* add typing

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

* condense NetgearSensorEntities

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

* Update homeassistant/components/netgear/router.py

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

* Update homeassistant/components/netgear/router.py

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

* Update homeassistant/components/netgear/router.py

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

* Update homeassistant/components/netgear/router.py

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

* add typing

* styling

* add typing

* use ForwardRefrence for typing

* Update homeassistant/components/netgear/device_tracker.py

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

* add typing

* Apply suggestions from code review

Thanks!

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

* process review comments

* fix styling

* fix devicename not available on all models

* ensure DeviceName is not needed

* Update homeassistant/components/netgear/config_flow.py

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

* Update homeassistant/components/netgear/config_flow.py

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

* Update __init__.py

* fix styling

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-09-13 18:18:21 +02:00
Aaron Bach ed9b271fd0
Enforce strict typing for IQVIA (#53408)
* Enforce strict typing for IQVIA

* Cleanup

* Code review

* Ignore untyped numpy function
2021-09-11 12:27:13 -06:00
jan iversen 9d2861afe3
Add mypy to elkm1. (#55964) 2021-09-09 13:14:28 +02:00
Alan Tse 98ecf2888c
Remove tesla integration (#55988)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2021-09-08 22:12:03 -07:00
Erik Montnemery 8b436c43f7
Enable basic type checking for cert_expiry (#55335) 2021-08-29 10:57:18 -06:00
jan iversen d1965eef8b
Activate mypy for sonar (#55327)
* Please mypy.
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-28 12:05:48 +02:00
jan iversen 504d23ac72
Activate mypy for switchbot (#55196)
* Please mypy.

* Update homeassistant/components/switchbot/switch.py

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

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-08-25 13:37:08 +02:00
Sean Vig 6b4e3bca6f
Add type annotations to amcrest integration (#54761)
Co-authored-by: Milan Meulemans <milan.meulemans@live.be>
2021-08-25 13:24:29 +02:00
jan iversen e2b1122eec
Activate mypy in gtfs (followup on reverted #54328) (#55195) 2021-08-25 10:30:29 +02:00
jan iversen 98a3ad6fd4
Revert "Please mypy in gtfs and implement needed changes (#54328)" (#55148) 2021-08-24 14:29:03 +02:00
jan iversen e2ce1d8b24
Please mypy in gtfs and implement needed changes (#54328) 2021-08-24 11:28:45 +02:00
jan iversen 336aa74317
Activate mypy for todoist (#55096) 2021-08-24 11:23:33 +02:00
jan iversen 0ab99fc8bf
Activate mypy for surepetcare (#55079) 2021-08-24 11:21:57 +02:00