Skip to content

Commit

Permalink
Fix again new Yandex API #138
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Mar 18, 2021
1 parent 063e31b commit b28e272
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions custom_components/yandex_station/core/yandex_quasar.py
Original file line number Diff line number Diff line change
@@ -117,10 +117,14 @@ async def load_scenarios(self) -> dict:

async def add_scenario(self, device_id: str):
"""Добавляет сценарий-пустышку."""
name = encode(device_id)
payload = {
'name': encode(device_id),
'name': name,
'icon': 'home',
'trigger_type': 'scenario.trigger.voice',
'triggers': [{
'type': 'scenario.trigger.voice',
'value': name[3:]
}],
'requested_speaker_capabilities': [],
'devices': [{
'id': device_id,
2 changes: 1 addition & 1 deletion custom_components/yandex_station/manifest.json
Original file line number Diff line number Diff line change
@@ -11,5 +11,5 @@
"@AlexxIT"
],
"requirements": [],
"version": "3.1.2"
"version": "3.1.3"
}

0 comments on commit b28e272

Please sign in to comment.