ha-samsungtv-tizen
ha-samsungtv-tizen copied to clipboard
Key chain delays behaving inconsistently for sources and direct keys
When setting up a key chain as a service the delay is shorter than when setting up the same key chain as source.
For example (switching the audio output):
service: 'media_player.play_media'
{
entity_id: media_player.samsung_tv_remote
media_content_type: send_key
media_content_id: 'KEY_HOME+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_LEFT+100+KEY_UP+100+KEY_RIGHT+100+KEY_RIGHT+1000+KEY_ENTER+1000+KEY_HOME'
}
will perform in 5 seconds, while the same key chain would take several seconds for each button press in sources.
This seems to be due to different implementations for parsing the keys for MEDIA_TYPE_KEY or _source_list.
I have a suggestion on how to fix this, I'll create a pull request shortly and reference this issue.