thank you a lot for this great library. I tried to develop my own app using your work but unfortunately I get an error as soon as my intent is recognised:
[DEBUG:2020-06-06 15:39:35,283] asyncio: Using proactor: IocpProactor
[DEBUG:2020-06-06 15:39:35,284] OpenHABSwitchOnApp: Connected to MQTT broker
[DEBUG:2020-06-06 15:39:35,285] OpenHABSwitchOnApp: Subscribed to hermes/intent/SwitchOn
[ERROR:2020-06-06 15:39:39,386] HermesApp: on_raw_message
Traceback (most recent call last):
File "C:\Users\Arne\AppData\Roaming\Python\Python38\site-packages\rhasspyhermes_app\__init__.py", line 62, in on_raw_message
nlu_intent = NluIntent.from_json(payload)
File "C:\Users\Arne\AppData\Roaming\Python\Python38\site-packages\dataclasses_json\api.py", line 78, in from_json
return cls.from_dict(kvs, infer_missing=infer_missing)
File "C:\Users\Arne\AppData\Roaming\Python\Python38\site-packages\dataclasses_json\api.py", line 85, in from_dict
return _decode_dataclass(cls, kvs, infer_missing)
File "C:\Users\Arne\AppData\Roaming\Python\Python38\site-packages\dataclasses_json\core.py", line 192, in _decode_dataclass
init_kwargs[field.name] = _decode_generic(field_type,
File "C:\Users\Arne\AppData\Roaming\Python\Python38\site-packages\dataclasses_json\core.py", line 266, in _decode_generic
res = _decode_generic(type_arg, value, infer_missing)
File "C:\Users\Arne\AppData\Roaming\Python\Python38\site-packages\dataclasses_json\core.py", line 254, in _decode_generic
res = _get_type_cons(type_)(xs)
File "C:\Users\Arne\AppData\Roaming\Python\Python38\site-packages\dataclasses_json\core.py", line 297, in <genexpr>
items = (_decode_dataclass(type_arg, x, infer_missing)
File "C:\Users\Arne\AppData\Roaming\Python\Python38\site-packages\dataclasses_json\core.py", line 150, in _decode_dataclass
field_value = kvs[field.name]
KeyError: 'entity'
import logging
from rhasspyhermes_app import HermesApp
_LOGGER = logging.getLogger("OpenHABSwitchOnApp")
app = HermesApp("OpenHABSwitchOnApp")
@app.on_intent("SwitchOn")
def switch_on(intent):
return app.EndSession("test")
app.run()