Commit graph

168 commits

Author SHA1 Message Date
Aidan Timson
65e6e1fa28
Add exception translations to System Bridge integration (#112206)
* Add exception translations to System Bridge integration

* Add translated error to coordinator

* Refactor strings.json in system_bridge component

* Sort

* Add HomeAssistantError import
2024-05-15 11:00:56 +02:00
Sid
2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Aidan Timson
e845d12733
Pin systembridgemodels to 4.0.4 (#114842) 2024-04-04 14:25:35 +02:00
Joost Lekkerkerker
6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Aidan Timson
8918eb6922
Add camera in use and pending reboot binary sensors to System Bridge (#104095)
* Add binary sensors

* Fix

* Fix

* Fix translations

* Add icons

* Fix attr

* Update string

* fix name

* Remove unnessasary check

* Remove unrelated changes

* Remove unrelated strings

* Apply suggestions from code review

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

* Update camera_in_use function and value_fn for binary sensors

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-03-18 16:21:52 +01:00
Joost Lekkerkerker
4c3943e264
Add service icons to System Bridge (#113354) 2024-03-14 11:35:43 +01:00
Joost Lekkerkerker
77917506bb
Improve lists in integrations [R-S] (#113233)
* Improve lists in integrations [R-S]

* Fix

* Fix
2024-03-13 21:55:00 +01:00
Aidan Timson
081a38a21c
Add processes services to System Bridge (#103564)
* Add processes services to System Bridge

* Update import and fixes from model updates

* Change log level from info to debug for process retrieval

* Add exception handling for process not found

* Consistency

* Change HomeAssistantError to ServiceValidationError

* Update homeassistant/components/system_bridge/__init__.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-03-13 14:56:20 +01:00
Aidan Timson
3da07bd160
Fix System Bridge media source data URL (#112612) 2024-03-12 21:54:03 +01:00
Marc Mueller
930a396712
Add empty line after module docstring [s] (#112704) 2024-03-08 14:33:51 +01:00
Aidan Timson
f8b05a0a81
Update systembridgeconnector to version 4.0.3 (#112608) 2024-03-08 12:11:17 +01:00
Aidan Timson
2599252600
Post System Bridge 4.x.x integration improvements (#112189)
* Dont remove api key during migration

* Fix return

* Fix test

* Make lambda more readable

* Move fixtures to init, move migration test to test_init.py

* Refactor config_entry data assignment

* Refactor system_bridge migration tests

* Fix type for debug message

* Fix type for debug message

* Remove duplicated unused code (rebase error)

* Refactor test_migration_minor_2_to_1 to test_migration_minor_future_to_2

* Fix version check in async_migrate_entry

* Update migration logic to handle future minor version

* Add ConfigEntryState assertion in test_init.py

* Change condition to minor_version < 2

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

* Refactor system bridge migration tests

* Remove minor downgrade code

* Update tests/components/system_bridge/test_init.py

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

* Update tests/components/system_bridge/test_init.py

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

* Apply suggestions from code review

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

* Move dataclass to store requested data to data.py

* Use dataclass in config flow

* Move media player and sensor onto data.py dataclass

* Move data and handler inside validate

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-06 10:47:21 +01:00
Aidan Timson
b070bb25a6
Add support for System Bridge service responses (#100055)
* Add support for System Bridge service responses

* Update conversion to use dataclass

* Update debug statements

* Update debug message
2024-03-05 14:30:53 +01:00
Aidan Timson
ce897b8645
Change log level for System Bridge service handlers (#112175)
Change log level from info to debug for System Bridge service handlers
2024-03-04 10:54:58 -05:00
Aidan Timson
c2a991625d
Update systembridgeconnector to 4.0.2 (#112174) 2024-03-04 14:16:22 +02:00
Aidan Timson
4c67670566
Update System Bridge to support version 4.x.x and above (#107957)
* Update System Bridge to support version 4.x.x and above

Update systembridgeconnector to version 4.0.0.dev4

Update system_bridgeconnector version to 4.0.0.dev6

Refactor WebSocket client handling in config_flow.py

Update strings

Update data handling

Add default field values to SystemBridgeCoordinatorData

Add version check and issue creation for unsupported System Bridge versions

Update coordinator.py to set disks and memory to None

Update system bridge coordinator to use token instead of API key

Update systembridgeconnector version to 4.0.0.dev7

Update systembridgeconnector version to 4.0.0.dev8

Update systembridgeconnector version to 4.0.0.dev9

Changes

Update units

Fix GPU memory calculation in sensor.py

Update GPU memory unit of measurement

Add translation keys for binary sensor names

Cleanup

Add async_migrate_entry function for entry migration

Update systembridgeconnector version to 4.0.0.dev10

Update systembridgeconnector version to 4.0.0.dev11

Add version check and authentication handling

Update token description in strings.json

Fix skipping partitions without data in system_bridge sensor

Update systembridgeconnector version to 4.0.0.dev12

Update systembridgeconnector version to 4.0.0

Add check for unsupported version of System Bridge

Update systembridgeconnector version to 4.0.1

Update debug log message in async_setup_entry function

Remove debug log statement

Fixes

Update key to token

Update tests

Update tests

Remove unused import in test_config_flow.py

Remove added missing translations for another PR

Refactor CPU power per CPU calculation

Make one liner into lambda

Refactors

Fix exception type in async_setup_entry function

Move checks to class and set minor version

Remove unnecessary comment in gpu_memory_free function

Remove translation_key for memory_used_percentage sensor

Reverse string change

Update token placeholder in strings.json

Remove suggested_display_precision from sensor descriptions

Remove suggested_display_precision from GPU sensor setup

Refactor sensor code

* Update migrate entry

* Refactor GPU-related functions to use a decorator

* Move per cpu functions to use decorator

* Refactor functions to use decorators for data availability

* Remove CONF_API_KEY from config entry data

* Add test for migration

* Refactor import statement in test_config_flow.py
2024-03-04 11:14:46 +01:00
Erik Montnemery
b0ed8c4961
Migrate integrations s-t to generic flowhandler (#111865) 2024-02-29 22:16:14 +01:00
Aidan Timson
4aafe14d4c
Fix translations for binary sensors in System Bridge (#110095)
* Add translation keys for binary sensor names

* Update version_available string in system_bridge component

* Remove unused code in SystemBridgeBinarySensor class

* Restrict SystemBridgeBinarySensorEntityDescription name type to str

* Refactor binary sensor entity descriptions and remove unused translation keys
2024-02-17 16:10:29 +01:00
Marc Mueller
438d3b01b9
Use builtin TimeoutError [o-s] (#109682) 2024-02-05 12:14:37 +01:00
Aidan Timson
ba60290431
Fix support for play/pause functionality in System Bridge (#103423)
Fix support for play/pause functionality
2024-01-06 10:06:23 +01:00
Erik Montnemery
0c2485bc03
Freeze integration entity descriptions (#105984)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-18 16:28:13 -10:00
Aidan Timson
b082ee2050
Update systembridgeconnector to 3.10.0 (#103983) 2023-11-15 09:30:56 +01:00
Aidan Timson
96e9a57fa3
Add processes count sensor to System Bridge (#103516)
* Add processes count sensor to System Bridge

* Add processes string
2023-11-06 23:47:39 +01:00
Aidan Timson
471fb4bce3
Update systembridgeconnector version to 3.9.5 (#103515) 2023-11-06 21:01:25 +01:00
Aidan Timson
ad22a11485
Update systembridgeconnector to 3.9.4 (#103425)
* Update systembridgeconnector to 3.9.2

* Update systembridgeconnector to version 3.9.3

* Update systembridgeconnector to version 3.9.4

* Fix import
2023-11-06 15:50:28 +01:00
Jan-Philipp Benecke
8b7cfc070e
Move base entity of system_bridge to own module (#103167)
* Move base entity of system_bridge to own module

* Add entity.py to .coveragerc
2023-11-01 14:21:39 +01:00
Aidan Timson
6433bf4d77
Create update component for System Bridge (#102966)
* Create update component for System Bridge

* Add
2023-10-31 19:08:47 +01:00
Aidan Timson
e406b8d1e3
Address System Bridge post merge review (#101614)
Address Post Merged PR Review for #97532
2023-10-08 10:42:08 +02:00
Aidan Timson
d05ba6cd92
Bump systembridgeconnector to 3.8.4 (#101621)
Update systembridgeconnector to 3.8.4
2023-10-08 10:10:20 +02:00
Aidan Timson
9982483395
Add media player to System Bridge integration (#97532)
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-10-06 15:08:51 +02:00
Aidan Timson
51899ce5ad
Add System Bridge notifications (#82318)
* System bridge notifications

Add notify platform

Add file to coverage

Restore and fix lint after rebase

Cleanup

Use entity to register notify service

Fix pylint

Update package to 3.6.0 and add audio actions

Update package to fix conflict

Remove addition

* Run pre-commit run --all-files

* Update homeassistant/components/system_bridge/notify.py

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

* Format

* Fix

* Remove duplicate import

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-09-10 17:32:52 +02:00
Aidan Timson
140bc03fb1
Bump systembridgeconnector to 3.8.2 (#100051)
Update systembridgeconnector to 3.8.2
2023-09-10 17:02:42 +02:00
Aidan Timson
42597f80a3
Add power service to System Bridge integration (#95719)
* Add power service to System Bridge

Add missing return types

Use in list validator and fix command

* Use attr map instead of concatination

* Update strings

* Update homeassistant/components/system_bridge/strings.json

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-08-28 17:44:23 +02:00
Joost Lekkerkerker
a6788208fe
Add entity translations to System bridge (#98959) 2023-08-28 15:36:18 +02:00
Ville Skyttä
2399cd283a
Python 3.10 support cleanups (#98640) 2023-08-21 19:14:07 +02:00
Marc Mueller
8b0fdd6fd2
Use asyncio.timeout [s-z] (#98452) 2023-08-15 14:34:18 +02:00
Erik Montnemery
045c327928
Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
Paulus Schoutsen
7859be6481
Add deduplicate translations script (#96384)
* Add deduplicate script

* Fix forecast_solar incorrect key with space

* Fix utf-8

* Do not create references to other arbitrary other integrations

* Add commented code to only allow applying to referencing integrations

* Tweak

* Bug fix

* Add command line arg for limit reference

* never suggest to update common keys

* Output of script

* Apply suggestions from code review

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>

---------

Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2023-07-13 11:52:50 -04:00
Franck Nijhof
62fe4957c9
Migrate integration services (Q-S) to support translations (#96378) 2023-07-12 01:18:22 +02:00
Aidan Timson
61d260e5fe
Add CPU Power to System Bridge (#80781)
* Add CPU Power to System Bridge

* Rename

* Update homeassistant/components/system_bridge/sensor.py

Co-authored-by: Aarni Koskela <akx@iki.fi>

* Fix unit

* Add suggested_display_precision=2

---------

Co-authored-by: Aarni Koskela <akx@iki.fi>
2023-06-14 21:47:50 -04:00
Erik Montnemery
2406b235b4
Name unnamed binary sensors by their device class (#92940)
* Name unnamed binary sensors by their device class

* Update type annotations

* Fix loading of entity component translations

* Add test

* Update integrations

* Set abode and rfxtrx binary_sensor name to None

* Revert changes in homekit_controller
2023-06-13 19:48:54 +02:00
Erik Montnemery
a71c097aeb
Revert "Allow setting an entity's name by its device class" (#93539) 2023-05-25 17:20:54 +02:00
Erik Montnemery
67c1051305
Allow setting an entity's name by its device class (#90767)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-05-09 18:55:55 +02:00
Aidan Timson
3bc023986c
Fix listener running in foreground for System Bridge integration (#91391)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-04-15 15:49:05 +02:00
Aidan Timson
d6c954a909
Reduce startup time for System Bridge integration (#91171) 2023-04-13 00:36:51 +02:00
Aidan Timson
73e1942eeb
Update entity names to capitalize first word only for System Bridge (#89688) 2023-03-14 12:28:43 +01:00
Aidan Timson
a99f6f7124
Handle ConnectionClosedException from System Bridge (#89654)
Handle unretrieved ConnectionClosedException from System Bridge
2023-03-13 20:55:37 -04:00
Aidan Timson
6809bd3029
Remove incorrect state class for System Bridge sensors (#89655) 2023-03-13 20:54:49 -04:00
Aidan Timson
85bcf11aeb
Update systembridgeconnector to 3.4.8 (#79732)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-03-07 10:22:31 +01:00
Erik Montnemery
b0b1d8143f
Sort manifests 10 (#87031) 2023-02-08 20:41:50 +01:00