Commit Graph

11 Commits (94fd6cceefd02ea69113ac3f59b2c0762bbafa1f)

Author SHA1 Message Date
Scotte Zinn 95563e04e8
Allow synology_dsm configuration to specify a host name (#36305)
* 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
Paulus Schoutsen dd32324e01
Use config flow references for data (#35529) 2020-05-12 10:50:44 -07:00
Quentame 81651b0b25
Add Synology DSM scan interval option flow (#35183)
* 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 b44464e0fa
Fix Synology DSM translation (#34696) 2020-04-26 00:37:41 +02:00
Quentame a8cd7203df
Bump python-synology to 0.7.0 (#34534) 2020-04-22 16:28:47 -05:00
Quentame 30744bea9c
Add 2SA authentication to Synology DSM (#34101)
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
Quentame 618538aeff
Add missed CONF_API_VERSION config in flow + Fix missing_data translation (#34356)
* Add missed CONF_API_VERSION config in flow + remove CONF_NAME in tests

* Fix missing_data translation
2020-04-17 22:45:17 +02:00
Paulus Schoutsen 55dfca7467
Drop title from translations if brand name (#34306) 2020-04-16 12:52:53 -07:00
Paulus Schoutsen d36204a968
Move title translation to root (#33850) 2020-04-15 09:41:18 -07:00
J. Nick Koston 078ce6766e
Add discovery support to synology_dsm (#33729)
* 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 (#32704)
* 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