Commit da6bf93 1 parent c891e29 commit da6bf93 Copy full SHA for da6bf93
File tree 1 file changed +13
-5
lines changed
custom_components/samsungtv_custom
1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 12
12
import requests
13
13
14
14
from homeassistant import util
15
- from homeassistant .components .media_player import MediaPlayerEntity , PLATFORM_SCHEMA
15
+ from homeassistant .components .media_player import (
16
+ MediaPlayerEntity ,
17
+ PLATFORM_SCHEMA ,
18
+ DEVICE_CLASS_TV ,
19
+ )
16
20
from homeassistant .components .media_player .const import (
17
21
MEDIA_TYPE_CHANNEL ,
18
22
SUPPORT_NEXT_TRACK ,
38
42
CONF_NAME ,
39
43
CONF_PORT ,
40
44
CONF_TIMEOUT ,
45
+ CONF_ID ,
46
+ CONF_TOKEN ,
41
47
STATE_OFF ,
42
- STATE_ON ,
48
+ STATE_ON
43
49
)
44
50
import homeassistant .helpers .config_validation as cv
45
51
from homeassistant .util import dt as dt_util
49
55
MEDIA_TYPE_KEY = "send_key"
50
56
DEFAULT_NAME = "Samsung TV Remote"
51
57
DEFAULT_PORT = 55000
52
- DEFAULT_TIMEOUT = 2
53
- KEY_PRESS_TIMEOUT = 1.2
58
+ DEFAULT_TIMEOUT = 1.5
59
+ KEY_PRESS_TIMEOUT = 0.3
54
60
KNOWN_DEVICES_KEY = "samsungtv_known_devices"
55
61
SOURCES = {"TV" : "KEY_TV" , "HDMI" : "KEY_HDMI" }
56
62
CONF_SOURCELIST = "sourcelist"
57
63
CONF_APPLIST = "applist"
58
64
CONF_PROTOCOL = "protocol"
59
- MIN_TIME_BETWEEN_FORCED_SCANS = timedelta (seconds = 2 )
65
+ CONF_ID = ""
66
+ CONF_TOKEN = ""
67
+ MIN_TIME_BETWEEN_FORCED_SCANS = timedelta (seconds = 1 )
60
68
MIN_TIME_BETWEEN_SCANS = timedelta (seconds = 10 )
61
69
62
70
SUPPORT_SAMSUNGTV = (
You can’t perform that action at this time.
0 commit comments