Commit graph

48 commits

Author SHA1 Message Date
Dominik
239f5fe56b
Fix glances raid plugin data ()
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-06-23 14:36:43 +02:00
Dominik
c8c368340d
Glances: Improve performance ()
* Improve performance

* Apply suggestions from code review

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-05-31 09:17:23 -04:00
Dominik
f6d3b0618e
Glances: Add error handling for invalid sensor data ()
* Set sensor to Unavailable
when native_value is invalid

* Add unit tests for sensors
2023-05-30 21:35:33 -04:00
Rami Mosleh
8cbe394028
Use get_ha_sensor_data method to update glances sensors ()
* Use `get_ha_sensor_data` method to update sensor state

* update tests

* Use `get_ha_sensor_data` to validate connection

* Update test_sensor.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-03-31 14:27:37 +02:00
epenet
42b74e7f56
Adjust entity registry access in integrations (3) () 2023-03-01 08:24:56 +01:00
Franck Nijhof
5e81d28116
Update black to 23.1.0 () 2023-02-02 18:35:24 +01:00
Franck Nijhof
db6cacafcb
Add battery device class to Glances battery sensor () 2023-01-20 08:47:38 -05:00
epenet
9580c4f1ec
Use UnitOfTemperature in integrations (e-h) () 2022-12-20 18:29:16 +01:00
epenet
69bc95a715
Use DATA_SIZE device class in integrations () 2022-12-13 10:17:56 +01:00
Rami Mosleh
328eda044a
Use DataUpdateCoordinator for glances ()
* use DataUpdateCoordinator for glances

add tests to increase coverage

fix test_config_flow.py

fix codecov/patch

remove unused const, minor tweaks

remove invalid_auth test as it is not implemented

fix type hints

* change to async_forward_entry_setups

* Use Dataupdatecoordinator for glances

* minor fixex

* minor fixes

* minor fix

* remove support_versions const

* coe cleanup

* address comments

* fix sensor native_value

* Rename entry to entry_data in `get_api`

* Remove whitespace in sensor name
2022-11-03 10:02:25 +01:00
epenet
b81c7d7f8e
Use REVOLUTIONS_PER_MINUTE constant in glances () 2022-10-11 14:56:35 +02:00
epenet
af9910d143
Use _attr_native_value in glances sensor () 2022-08-29 11:58:36 -04:00
epenet
b043053aad
Improve entity type hints [g] () 2022-08-26 11:37:12 +02:00
Rami Mosleh
86b968bf79
Migrate Glances to new entity naming style ()
* Migrate Glances to new entity naming style

* minor fixes
2022-08-12 09:50:27 +02:00
Rami Mosleh
9a9fea4423
Migrate glances unique_id to new format () 2022-06-30 12:10:19 -07:00
avee87
fb5e6aaa29
Clean up Glances sensors a bit () 2022-06-26 12:33:11 +02:00
avee87
ad3bd6773c
Add device_info to Glances entities () 2022-06-25 01:23:26 +02:00
Franck Nijhof
fa09cf663e
Update black to 22.1.0 () 2022-02-05 14:19:37 +01:00
epenet
30a64bd0f2
Add sensor setup type hints [g-h] ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 19:13:59 +01:00
Marc Mueller
2a8eaf0e0f
Use assignment expressions 06 () 2021-10-17 20:05:11 +02:00
Adrian Huber
b64b926e13
Add raid monitoring to glances () 2021-09-28 10:04:08 +02:00
Erik Montnemery
6de6a5dc14
Move temperature conversions to sensor base class (3/8) ()
* Move temperature conversions to entity base class (3/8)

* Fix FritzBox sensor

* Fix tests
2021-08-12 14:23:56 +02:00
Marc Mueller
0552b9c783
Use EntityDescription - glances () 2021-07-27 17:24:18 +02:00
Marc Mueller
5c3fb77660
Use NamedTuple - glances () 2021-07-21 22:27:01 -07:00
Daniel Hjelseth Høyer
fbad453c89
Pylint 2.9.3 ()
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2021-07-14 21:44:57 -07:00
Erik Montnemery
3e09787d85
Set device_class on temperature sensors F-K ()
* Set device_class on temperature sensors F-K

* Fix juicenet sensor
2021-07-12 20:32:55 +02:00
J. Nick Koston
3fa8ffa731
Enable mccabe complexity checks in flake8 ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-04-25 12:38:40 +02:00
Franck Nijhof
0d595a2845
Merge of nested IF-IF cases - E-G () 2021-03-27 12:39:37 +01:00
Zixuan Wang
21c72fa559
Fix missing glances temperature sensors ()
* Fix missing glances temperature sensors ()

* Revert matching rules for Glances

* Shorter if statement

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

* Revert long-line if statement

* Update if statement

Co-authored-by: J. Nick Koston <nick@koston.org>
2021-03-25 09:19:11 +01:00
Erik Montnemery
339a56e434
Migrate integrations f-h to extend SensorEntity () 2021-03-22 19:45:17 +01:00
Franck Nijhof
fb849b81b5
Rewrite of not a == b occurances () 2021-03-20 01:27:04 +01:00
Guillaume Duveau
c27c958a4d
Temperatures, fan and battery in Glances sensors ()
* Temperatures, fan and battery in Glances sensors

* Lint PR 
2020-12-14 10:46:44 +01:00
Philip Allgaier
625bbe6238
Cleanup unused loggers (components A-M) () 2020-10-12 16:59:05 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 () 2020-08-27 13:56:20 +02:00
Rami Mosleh
c66106ee98
Add Glances sensors dynamically ()
* Add temp_sensors to glances dynamically

* unsub from updates when sensor is disabled

* dynamicall add sensors

* change "device_name" to "mnt_point"

* remove unnecessary logging

* update sensor.py

* update test_config_flow.py

* remove commented code
2020-02-10 15:02:14 -08:00
Franck Nijhof
fb35d382e1
Remove all empty *_setup_platform() from integrations ()
* Remove all empty *_setup_platform() from integrations

* Fix tests for smartthings

* Fix tests for heos
2020-01-21 12:38:38 +01:00
Rami Mosleh
09f9875ccf Glances config flow ()
* Glances Integration with config flow

* Glances Integration with config flow

* fix description texts

* Glances Integration with config flow

* Glances Integration with config flow

* fix description texts

* update .coverage.py

* add codeowner

* add test_options

* Fixed typos, Added import, fixed tests

* sort imports

* remove commented code
2019-10-21 10:17:21 +02:00
Martin Brooksbank
5e15675593 Add additional needles to glances cpu_temp attribute ()
* Added additional needles to the cpu_temp attribute

* Fix conflict
2019-09-19 09:55:07 +02:00
newbee112
03cfe7247b Update sensor.py ()
Added more options for CPU temp.
2019-08-27 00:14:38 +02:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Jonathan
d25214beb1 Add aml_thermal label ()
Added label for the CPU Temperature for AmLogic ARM chips.
2019-06-22 12:58:37 +02:00
Clifford W. Hansen
0a13c47a8c Added percent to the disk,memory and swap percent labels () 2019-06-17 09:23:14 -07:00
Philippe Delodder
df9a9a1fec Add "soc-thermal 1" as CPU Temp label to Glances () 2019-05-03 15:43:51 +02:00
Christopher Viel
b1b269b302 Add more CPU temp. labels to Glances () 2019-04-19 15:21:16 +02:00
cgtobi
2c07bfb9e0 Remove dependencies and requirements ()
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
roblandry
c7a49e0820 Fix glances docker container errors ()
* Fix unavailable container errors

* Update to dev

* Use const
2019-04-07 13:07:05 -04:00
Tobias Sauerwein
048b100eea Clean up docstrings ()
* Clean up docstrings

* Fix long lines

* Fix more docstrings

* Fix more docstrings

* Fix more docstrings
2019-04-03 17:40:03 +02:00
Paulus Schoutsen
f5076188ef
Consolidate all platforms that have no tests ()
* Consolidate

* Fix tests

* Update imports

* Fix import

* Use importlib because integration and package share name

* Fix more tests

* Update .coveragerc and CODEOWNERS
2019-03-16 20:44:05 -07:00
Renamed from homeassistant/components/sensor/glances.py (Browse further)