Skip to content

Commit

Permalink
Add ability to use scripts in shortcuts (kalkih#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
kalkih committed Feb 11, 2019
1 parent 7d0ebdf commit 801d525
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,10 @@ class MiniMediaPlayer extends LitElement {

_handleQuickSelect(e, entity, i) {
const { type, id } = this.config.shortcuts[entity][i];
if (type === 'source') return this._handleSource(e, id);
if (type === 'source')
return this._handleSource(e, id);
if (type === 'script')
return this._callService(e, 'turn_on', { entity_id: id }, 'script');
const options = {
media_content_type: type,
media_content_id: id,
Expand Down

0 comments on commit 801d525

Please sign in to comment.