File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
homeassistant/components/roku Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 77)
88from roku import RokuException
99
10- from homeassistant .components .remote import RemoteDevice
10+ from homeassistant .components .remote import ATTR_NUM_REPEATS , RemoteDevice
1111from homeassistant .config_entries import ConfigEntry
1212from homeassistant .helpers .typing import HomeAssistantType
1313
@@ -84,8 +84,11 @@ def should_poll(self):
8484
8585 def send_command (self , command , ** kwargs ):
8686 """Send a command to one device."""
87- for single_command in command :
88- if not hasattr (self .roku , single_command ):
89- continue
87+ num_repeats = kwargs [ATTR_NUM_REPEATS ]
9088
91- getattr (self .roku , single_command )()
89+ for _ in range (num_repeats ):
90+ for single_command in command :
91+ if not hasattr (self .roku , single_command ):
92+ continue
93+
94+ getattr (self .roku , single_command )()
You can’t perform that action at this time.
0 commit comments