Home Assistant Community

Text Classification Chatbot


Hi everybody !

One year ago I installed a Telegram Chatbot. I receive my notification on it, and I can interact with hassio with writing some orders :

Example :

  • Turn on the kitchen light
  • Good night
  • Feed the cat
  • etc…

For this, I’m using some regex with keywords, and I’m not obliged to have some defined sentences.

I can write : “Turn on the light of kitchen” or “Turn on kitchen” or “Turn on light of the kitchen”, etc… It understand the order if the keywords “kitchen” and “Turn on” are in the same sentence.

It works pretty well and it’s a local execution, but this method has few disadvantages :

  • I’m obliged to complete each time I add an object or a function,
  • I take a lot of time to write,
  • I’m obliged to verifying keywords of an order are not in conflict with another order, and it’s really long.

For few months I think to an intelligent chatbot, when you write an order it understands the meaning of the sentence.

To succeed, I think to data classification, with a decomposition of the sentence :

Turn on the light of the bedroom :

  1. Action : Turn on
  2. Room : bedroom
  3. Device : light

Good night :

  1. Detection a script is called “Night”
  2. Execution of the script “Night”

It’s some reflexiosn I ha,d but I’m not a developper…
If somebody done this or is interested, you’re welcome !!!