Commit Graph

41 Commits (27e3ff9c694abbcad74f1da1779539b04aa2da71)

Author SHA1 Message Date
J. Nick Koston 22daea27c2
Cleanup coordinators in synology_dsm ()
Co-authored-by: Michael <35783820+mib1185@users.noreply.github.com>
2022-06-09 10:22:16 -10:00
Michael e300908a8e
Refresh camera stream source of Synology DSM connected cameras ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-05-18 10:59:35 -07:00
Michael 781f18e0c3
Extract entity base classes into a new module for Synology DSM ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-23 22:26:34 -10:00
Michael 4853ce208f
Move constants into corresponding platforms in Synology DSM ()
* move sensor related constants

* move switch related constants

* move binary sensor related constants
2022-04-10 16:45:58 +03:00
Michael 61f8af8b58
Add update entity to Synology DSM () 2022-03-29 17:01:26 -07:00
Michael 4cd00a1a6f
remove EntityCategory from home_mode switch () 2022-02-07 00:41:02 +02:00
Michael 5d7d652237
Replace Synology DSM services with buttons () 2022-01-24 22:51:55 -10:00
Michael eda5cfc12d
Add option to select quality of camera snapshots taken from Synology DSM connected cameras () 2022-01-23 10:23:04 -10:00
epenet e5cf9b78bd
Use new enums in synology_dsm ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-20 10:53:21 -05:00
Marc Mueller f7193400d4
Use platform enum (6) [S] () 2021-12-04 13:43:48 +01:00
Philip Allgaier a5dc0e37b8
Consistent capitalization for Synology DSM entity names () 2021-11-23 22:06:05 +01:00
Michael 9a328eae67
Use native datetime value in Synology DSM sensors () 2021-11-23 20:03:22 +01:00
Michael e395e33663
Add support for entity categories to Synology DSM entities () 2021-10-14 13:52:17 -07:00
Marc Mueller 4eba2ccebc
Use EntityDescription - synology_dsm () 2021-09-03 23:35:28 +02:00
Marc Mueller 53851cb1b4
Remove temperature conversion - synology_dsm () 2021-08-25 09:32:35 -05:00
Simone Chemelli a5902fbe29
Synology sensor name clarification () 2021-08-21 21:40:18 +02:00
Michael 15feb430fc
Use DEVICE_CLASS_UPDATE in Synology DSM () 2021-08-17 19:15:02 +02:00
Michael ebfdfd172b
Add state class measurement to sensors where suitable for Synology DSM () 2021-07-26 11:42:52 +02:00
Michael f128bc9ef8
Add reauth flow to Synology DSM () 2021-07-21 09:16:27 -07:00
Michael 042822e35e
Improve typing for synology_dsm () 2021-05-09 22:44:55 +02:00
Paul Dee 6a4b755faf
Spellcheck on Synology component () 2021-03-05 15:36:07 +01:00
Michael d96249e39c
Implement additional DataUpdateCoordinator to harmonize the data update handling of Synology DSM () 2021-02-23 16:23:50 -06:00
Michael c90588d35d
Correct synology_dsm CPU sensor's naming and measurement unit () 2021-02-01 07:15:34 -10:00
Michael e506d8616f
Fix polling and update of camera state for synology_dsm ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-01-31 09:22:46 -10:00
Michael dbe89c1e02
Add reboot and shutdown service to synology_dsm ()
* add reboot and shutdown service to synology_dsm

* apply suggestions

* make _async_setup_services() async

* add comment to make sure unique_id is serial
2020-11-11 19:06:50 +01:00
Michael 8d9a844e84
Add verify_ssl option for connection setup to synology_dsm () 2020-11-02 14:23:16 +01:00
Michael 36b1756816
Add update available binary sensor to synology_dsm ()
* 'update available' binary-sensor

* make black compliant

* add available() to SynoDSMUpgradeBinarySensor

* correct spacing

* Correct usage of _with_upgrade

Co-authored-by: Quentame <polletquentin74@me.com>
2020-10-28 20:56:18 +01:00
Quentame 1d816d25f7
Add Surveillance Station home mode switch for Synology DSM ()
* Use camera name as device name

* Add Surveillance Station home mode switch for Synology DSM

- camera uses Surveillance Station as device parent
- camera uses camera name instead of NAS name + camera name

* Without device_class otherwise no icon

* Update .coveragerc
2020-09-30 18:27:06 +02:00
Thomas Germain 3881e0cb23
Add temperature and uptime to Synology DSM ()
Co-authored-by: Quentame <polletquentin74@me.com>
2020-09-14 09:42:37 +02:00
Quentame bab4ad4f17
Add timeout config option to Synology DSM () 2020-09-12 20:36:39 -05:00
Xiaonan Shen b66aaeea99
Add camera support to synology_dsm ()
* Add camera support to synology_dsm

* Code improvements

* More code improvements
2020-09-10 21:08:37 +02:00
Marius a6a011ec19
Use entity_class 'safety' in synology_dsm storage sensors ()
* Use entity_class: 'safety' in storage sensors

and more meaningful icons then 'mdi:test-tube', not sure if these are even necessary, given the device_class that defines the icons too?

* Set device_class, not icon

Still, the temperature sensors have both set, should I take these out in this go too? While we're at it....

* added device_class temperature to temp sensors

and removed explicit icons
do we need to set a D_c also on the Status sensor? line 187

* revert device_class Safety

which is now set in const.py
following up on https://github.com/home-assistant/core/pull/39757#pullrequestreview-483705147

* Use DEVICE_CLASS_SAFETY from const

+ revert temp to avoid conflict

* const from binary

* reverted non binary status sensors

to use: "mdi:checkbox-marked-circle-outline" and set None to device_class

Co-authored-by: Quentame <polletquentin74@me.com>
2020-09-10 09:21:51 +02:00
springstan d2b1918e9c
Drop UNIT_ prefix for percentage constant () 2020-09-05 21:09:14 +02:00
Scotte Zinn 95563e04e8
Allow synology_dsm configuration to specify a host name ()
* Allow configuration to specify a host name.

This will default to "synology", so the sensors would be named
sensor.synology_... which is the original implementation.

By specifying a name, which is required for multiple synology hosts,
you can then have sensor.hostA_... and sensor.hostB_...

* Get the base name for the sensors from the Synology DSM hostname

* Don't need the name for the config

* Added missing import

* Fixed another typo

* Removed definition of unused BASE_NAME

* Removed end of line to revert

* Moved for ordering
2020-06-03 13:01:13 +02:00
Quentame 26cbca101a
Refactor Synology entries to allow not fetching the API when it's disabled + add security binary sensor ()
- add Synology DSM Security binary sensor (enabled by default)
- use device name instead of id in names
- add device type to name
- show disk manufacturer, model and firmware version in devices
- some entries are disabled by default (`entity_registry_enabled_default`)
- binary sensor + sensor uses `device_class` when possible
- do not fetch a concerned API if all entries of it are disabled
- entity unique_id now uses key instead of label
- entity entity_id changes for disk and volume: example from `sensor.synology_status_sda` to `sensor.synology_drive_1_status`, or from `sensor.synology_average_disk_temp_volume_1` to `sensor.synology_volume_1_average_disk_temp`
- now binary sensor:
  - disk_exceed_bad_sector_thr
  - disk_below_remain_life_thr
- removed sensor:
  - volume type (RAID, SHR ...)
  - disk name (Drive [X])
  - disk device (/dev/sd[Y])
2020-06-02 18:22:51 +02:00
Quentame 81651b0b25
Add Synology DSM scan interval option flow ()
* Add Synology DSM scan interval option flow

* Add options tests

* Review: use entry.update_listeners

* Use cv.positive_int

* Try to fix "ValueError: Config entry has already been setup!"

* Fix ValueError
2020-05-07 00:15:49 +02:00
Quentame e602de55ac
Bump python-synology to 0.8.0 + Fix disk space incorrect sensor type ()
* Fix Synology disk space incorrect sensor type

* Review 1
2020-05-02 20:31:15 +02:00
Quentame a8cd7203df
Bump python-synology to 0.7.0 () 2020-04-22 16:28:47 -05:00
Quentame 30744bea9c
Add 2SA authentication to Synology DSM ()
Co-Authored-By: J. Nick Koston <nick@koston.org>

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-04-17 18:47:50 -05:00
J. Nick Koston 078ce6766e
Add discovery support to synology_dsm ()
* Add discovery support to synology_dsm

* Remove debug

* black

* Fix mocks

* Merge strings

* Move placeholders

* add missing placeholders

* reorder

* use constants in test

* Remove CONF_NAME (only displayed in discovery now)

* test reduction

* Shorten long name

* Use name for name but NOT for unique_id, remove CONF_NAME from yaml config

* Use Synology for the name for now, hopefully we can use the hostname later

* lint

* Remove name from strings

* remove =None

* show login errors at username field

* Update tests/components/synology_dsm/test_config_flow.py

Co-Authored-By: Quentame <polletquentin74@me.com>

* Update tests/components/synology_dsm/test_config_flow.py

Co-Authored-By: Quentame <polletquentin74@me.com>

* Update homeassistant/components/synology_dsm/const.py

Co-authored-by: Quentame <polletquentin74@me.com>
2020-04-07 10:22:35 -07:00
Quentame d99e228983
Add config flow to Synology DSM ()
* Add config flow to Synology DSM

* Use proper sensor unique ID from flow + sensor name

* Add description to api_version

* Add authentication flow check

* Add device_info

* Add test_login_failed test

* Bump python-synology to 0.5.0

* 0.5.0 test updates

* Use NAS S/N as config_flow unique_id

* Add missed conf disks + volumes

* Review: async_unload the async_track_time_interval

* Fix NoneType for disks or volumes

* Keep all disks and volumes forever

* Update homeassistant/components/synology_dsm/.translations/en.json

Co-Authored-By: J. Nick Koston <nick@koston.org>

* Update homeassistant/components/synology_dsm/strings.json

Co-Authored-By: J. Nick Koston <nick@koston.org>

* Fix "Keep all disks and volumes forever" for empty import

* Fix prettier

* Remove useless LOGGER in config flow

* Fix Synology DSM tests doing I/O

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-04-05 17:50:52 -05:00