Commit Graph

27 Commits (b3f7f379df235bcd7ebdd2b039932c98e2dff937)

Author SHA1 Message Date
Åke Strandberg 172778053c
Add select platform to myuplink (#118661) 2024-07-19 11:29:58 +02:00
Marc Mueller 921430d497
Import Generator from collections.abc (3) (#120916) 2024-07-01 12:09:11 +02:00
Sid 721b2c2ca8
Enable Ruff PT012 (#113957) 2024-06-08 17:59:08 +02:00
Marc Mueller 33ed4fd862
Import Generator from typing_extensions (3) (#118990) 2024-06-06 17:28:59 +02:00
epenet b81f0b600f
Move current_request_with_host fixture to decorator (#118810)
* Move current_request_with_host fixture to decorator

* One more
2024-06-04 17:50:22 +02:00
epenet d10362e226
Add AiohttpClientMocker type hints in tests (#118373) 2024-05-29 14:38:46 +02:00
epenet ead0e797c1
Use registry fixtures in tests (m-n) (#118291) 2024-05-28 13:40:45 +02:00
Åke Strandberg c4c96be880
Add alarm and connectivity binary_sensors to myuplink (#111643)
* Add alarm and connectivity binary_sensors

* Get is_on for correct system

* Make coverage 100% in binary_sensor

* Address review comments

* Revert dict comprehension for now
2024-05-15 17:13:56 +02:00
Erik Montnemery db8597a742
Reduce scope of JSON/XML test fixtures (#116197) 2024-04-25 19:12:36 -05:00
epenet 0b01326f9f
Use is in ConfigEntryState enum comparison in tests (A-M) (#114925) 2024-04-05 17:16:55 +02:00
Joost Lekkerkerker 5d500cb74b
Use is in enum comparison in config flow tests K-O (#114672) 2024-04-02 11:21:42 -10:00
Joost Lekkerkerker be7c4295dc
Fix MyUplink tests (#113534) 2024-03-15 18:26:28 +01:00
Åke Strandberg eb1f37ea9b
Filter out irrelevant entities on SMO20 devices in myuplink (#113493) 2024-03-15 14:06:10 +01:00
Åke Strandberg 86607d2bbb
Create more relevant names for myuplink DeviceInfo (#111502) 2024-03-15 12:11:13 +01:00
Åke Strandberg f95d649f44
Add icon translations to myuplink (#111466) 2024-03-15 00:47:10 +01:00
Marc Mueller aa16a9d707
Add empty line after module docstring (3) (#112750) 2024-03-08 20:38:34 +01:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 1722e23df8
Add empty line after module docstring [tests l-p] (#112710) 2024-03-08 14:55:15 +01:00
Åke Strandberg 073fcfcd6f
Add tests for number of devices created in myuplink (#111816)
* Add tests for number of devices created

* Change default fixture to 2 devices in one system

* Update snapshot

* Change deviuce to test

* Merge tests to one module
2024-03-03 14:27:24 +01:00
Åke Strandberg cd46cc6e80
Add myuplink number platform (#111154)
* Add number platform

* Use constant for SERVICE_SET_VALUE
2024-02-24 22:39:14 +01:00
Åke Strandberg c167001861
Add myuplink switch platform (#110810)
* Add switch platform

* Add mypulink switch platform

* Update tests according to review

* Address more review comments

* Adjust types

* More typing

* Fix typo

* Use constants in tests

* Revert constants

* Catch aiohttp.ClientError when API call fails

* Add test case for failed async_set_device_points call

* Test api failures for both toggle directions

* Use parametrize for testing switching
2024-02-22 11:27:46 +01:00
Åke Strandberg 2614d6fece
Add tests to myuplink binary_sensor (#110995) 2024-02-21 12:32:25 +01:00
Åke Strandberg 230ac417c0
Add check for myuplink startup ClientError (#110926)
* Raise ConfigEntryNotReady if appropriate

* Catchin exceptions during startup

* Change expected_state to SETUP_ERROR
2024-02-20 02:17:35 +01:00
Åke Strandberg f5dad1d312
Add myuplink reauth flow (#110587)
* WIP test

* WIP

* WIP Reauth flow. Test fail otherways OK.

* Minor adjustments to tests

* Merge

* Merge

* Next level...

* Cleanup according to review

* It works!

* Simplify setup

* Remove default

* Remove files from PR

* Add back test_init

* Add back test_sensor

* Adjust error message

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-02-17 10:18:53 +01:00
Åke Strandberg fd0f093299
Add some myuplink tests (#110521)
* Add some myuplink tests

* Update fixtures for api endpoints

* Adjust according to review

* Update snapshot file

* Remove unneded fixtures and improve typing

* More cleanup

* One last session scope removed

* Fix typing

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-02-15 13:44:45 +01:00
Åke Strandberg 8376c07969
Add myuplink diagnostics download (#109925)
* Dump all relevant data from API

* Cleanup and adjust

* Redact serialNumber

* WIP

* Add fixtures

* WIP

* Tests for diagnostics completed

* Address review comments

* Change to fake token

* Add missed redact

* Improve mocks

* Resolve review comments
2024-02-12 10:56:06 +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