Commit Graph

447 Commits (ef7e2cfc08bb4d1f1649c99cf8bb53f4be1aaa54)

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