Commit Graph

54 Commits (85fdc562400211bbaab07233bd5e9a7c496ddb44)

Author SHA1 Message Date
epenet afe2b71b2e
Update model info from SSDP in SamsungTV (#71992)
* Update model info from SSDP in SamsungTV

* Add tests
2022-05-17 22:49:19 +03:00
epenet db08c04da6
Only test for EncryptedBridge in Samsung J/H models (#71291) 2022-05-04 22:15:24 -07:00
epenet d8d1e98d4e
Fix unique id in SamsungTV config flow (#69899)
* Fix unique id in SamsungTV config flow

* coverage

Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-11 23:37:05 -10:00
J. Nick Koston 4b5033d08f
Abort samsungtv discovery of legacy devices when unique id not available (#69376) 2022-04-05 16:38:55 -07:00
epenet 2bb42f48aa
Add CONF_MODEL to core constants (#68806)
* Add CONF_MODEL to core constants

* Use CONF_MODEL in SamsungTV

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-29 10:01:10 +02:00
epenet de130d3b28
Update REST api mocking in SamsungTV (#68172)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-28 09:04:19 -10:00
J. Nick Koston 6cec53bea1
Add support for finding the samsungtv MainTvAgent service location (#68763) 2022-03-27 22:01:07 -10:00
J. Nick Koston cc75cebfc5
Add support for setting up encrypted samsung tvs from config flow (#68717)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-27 10:30:45 -10:00
epenet 9ba0475644
Use callback to get app_list in SamsungTV (#68506)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-23 11:12:12 -10:00
epenet 87378016c1
Add basic support for SamsungTV encrypted models (#68500)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-22 00:11:41 -10:00
epenet 125ab5eb2b
Handle ConnectionClosed in SamsungTV try_connect (#68125)
* Handle ConnectionClosed in SamsungTV try_connect

* Add tests

* Add quotes around the error message

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-15 08:20:24 +01:00
epenet 9ab56bd5c8
Allow discovery to update invalid unique_id in SamsungTV (#67859)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-08 22:27:53 +01:00
epenet 5b23b9a617
Adjust get_mac routine in SamsungTV (#67804)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-08 07:54:12 +01:00
epenet 2d4ccddd99
Fix SSDP unique id in SamsungTV config flow (#67811)
Co-authored-by: epenet <epenet@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-03-08 07:53:59 +01:00
epenet 8e3b0f6554
Cleanup mac fixtures in samsungtv tests (#67529)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-03 08:07:08 -10:00
epenet b8861578ff
Implement async websocket in samsungtv (#67127)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-03-02 09:30:33 -10:00
epenet 1556868d56
Use async rest api in SamsungTV (#67369)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-28 09:53:42 -10:00
epenet a60c37cdb8
Expose Samsung wrapper as async (#67042)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-22 08:31:16 -10:00
epenet 3aa18ea5d8
Add installed apps to samsungtv sources (#66752)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-18 13:33:49 -08:00
epenet 8bf19655f1
Fix samsung mocks (#66765)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-17 13:04:48 -08:00
epenet 6d0a06c57a
Add type hints in samsungtv tests (#66632)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-17 12:47:58 -08:00
epenet 2687f61428
Fix slow samsungtv test (#66696) 2022-02-16 16:04:50 -06:00
epenet 0138caa277
Fix side_effect patching in samsungtv tests (#66651)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-16 12:40:11 -08:00
epenet 14e48bac3a
Fix SamsungTVWS mocking in samsungtv tests (#66650)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-16 12:13:11 -08:00
epenet cf5652737a
Cleanup samsungtv tests (#66570)
* Drop unused init method

* Add type hints to media_player tests

* Adjust test_init

* Adjust media_player

* Add type hints to conftest

* Use Mock in test_media_player

* Use lowercase in test_init

* Use relative import in diagnostics

* Add type hints to config_flow

* Adjust coveragerc

* Make gethostbyname autouse

* Cleanup gethostbyname and remote fixtures

* Drop unused fixtures

* Undo type hints and usefixtures on media_player

* Undo type hints and usefixtures in test_init

* Undo type hints in conftest

* Undo usefixtures in test_config_flow

* Format

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-02-16 09:29:52 +01:00
Joshua Roys 9134e5c844
Get discovered zeroconf IPv6 addresses (#65462) 2022-02-11 16:46:17 -06:00
epenet f292691b7b
Use SsdpServiceInfo for ssdp tests (part 3) (#60334)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-25 11:46:20 -06:00
Simone Chemelli 15f62a7237
More tests optimizations for SamsungTV (#60297)
* More tests optimizations

* Apply review comments
2021-11-24 22:54:49 +01:00
epenet 77dfeb062f
Update ZeroconfServiceInfo in tests (n-t) (#60219)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-23 10:35:44 -06:00
epenet 560546f65e
Use dataclass for DhcpServiceInfo (#60136)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-23 13:35:53 +01:00
Simone Chemelli e673d9dbd0
Fix missing mocking (#60181) 2021-11-23 11:56:16 +01:00
epenet a72a5486c2
Use ServiceInfo in samsungtv tests (#60097) 2021-11-21 16:00:59 -06:00
Erik Montnemery ec52763706
Prevent 3rd party lib from opening sockets in samsungtv tests (#56334) 2021-09-18 22:24:27 -10:00
Simone Chemelli 2025afe14b
Add MAC to SamsungTV when missing (#53479)
* Add MAC when missing

* Fix I/O

* Add test for missing MAC address
2021-07-26 16:43:05 +02:00
J. Nick Koston 19b4d2e4d2
Add OUIs for legacy samsungtv (#52928) 2021-07-15 14:43:35 +02:00
Simone Chemelli 13c142a402
Fix Soundbar exclusion from SamsungTV (#51023)
* Improved check

* Fix tests

* Fix logic and tests

* Update tests
2021-07-12 08:58:53 +02:00
J. Nick Koston a71af8e9d3
Abort samsungtv config flow for existing hosts when the unique id is set (#52138)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-25 10:31:33 -10:00
J. Nick Koston 5695710463
Add mac address to samsungtv config entry data if missing (#51634)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-24 08:15:16 -10:00
J. Nick Koston ab490bc769
Ensure samsungtv reloads after reauth (#51714)
* Ensure samsungtv reloads after reauth

- Fixes a case of I/O in the event loop

* Ensure config entry is reloaded
2021-06-10 19:23:00 +02:00
J. Nick Koston b3d826f2e2
Fix samsungtv yaml import without configured name (#51204) 2021-05-28 16:06:17 +02:00
Franck Nijhof c5383219f1
Remove stale debug statements from tests (#51059) 2021-05-25 11:52:20 +02:00
Simone Chemelli b9a0fb93eb
Add samsungtv dhcp and zeroconf discovery (#48022)
Co-authored-by: J. Nick Koston <nick@koston.org>
2021-05-22 10:41:18 -05:00
Ville Skyttä 153d6e891e
Use config_entries.SOURCE_* constants (#49631) 2021-04-25 11:27:40 +02:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
zetvio 78b4c3981f
Use reference strings in Samsung TV config flow (#41248)
* Use reference strings in samsungtv config flow

* Adjust samsungtv config flow tests
2020-10-05 11:45:35 +02:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
Ziv ffa111deb9
Fix exceptions in tests for samsung_tv (#33732) 2020-04-06 11:21:52 +02:00
escoand 2bb29485be
Try all Samsung TV websocket ports (#33001)
* Update bridge.py

* add test

* silence pylint

* correct pylint

* add some tests

* Update test_media_player.py
2020-03-21 16:50:18 +01:00
Paolo Tuninetto a8758ed3a1
Add support for newer SamsungTV models (#31537)
* Added support for newer SamsungTV models

* Fixed legacy port

* store token in HA config directory

* Change token name

* rebasing and exception handling

* implement update

* fix error creating mediaplayer

* Debug logging

* Increase timeout

* Restore update timeout

* Store token_file path in config_entry

* Introduction of samsung bridge class

* Added bridge class functions

* Code cleanup

* more fixes

* Begin testing

* samsungtvws 1.2.0

* Config flow tests 0.1

* Fixed some mediaplayer tests

* Fixed fixture in media player

* use of constants and turn off

* more media player tests

* samsungtvws 1.3.1 and other fixes

* WS tv update rewritten

* more tests

* test_init

* fixed tests

* removed reset mock

* tests reset mock

* close_remote and tests

* deprecate port config

* deprecate port config 2

* deprecate port config 3

* save token only if needed

* cleanup

* better websocket protocol detection

* config removal
2020-03-10 11:48:09 +01:00