{"id":23841,"library":"hassil","title":"Hassil - Home Assistant Intent Language Parser","description":"A Python library to parse Home Assistant Intent Language (HassIL) sentence definitions. Version 3.5.0 is current; follows a rolling release cadence aligned with Home Assistant developments.","status":"active","version":"3.5.0","language":"python","source_language":"en","source_url":"https://github.com/home-assistant/hassil","tags":["home-assistant","intent-parsing","natural-language","voice-assistant"],"install":[{"cmd":"pip install hassil","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"parse_sentence is exposed at top-level package, not in a submodule.","wrong":"from hassil.parser import parse_sentence","symbol":"parse_sentence","correct":"from hassil import parse_sentence"},{"note":"Intents is at top level.","wrong":"from hassil.intents import Intents","symbol":"Intents","correct":"from hassil import Intents"},{"note":"SlotSchema is exported from top-level.","wrong":"from hassil.schema import SlotSchema","symbol":"SlotSchema","correct":"from hassil import SlotSchema"},{"note":"TextSlotList is in slot_schemas submodule.","wrong":"from hassil import TextSlotList","symbol":"TextSlotList","correct":"from hassil.slot_schemas import TextSlotList"}],"quickstart":{"code":"from hassil import parse_sentence, Intents, SlotSchema\n\nintents_yaml = \"\"\"\nlanguage: \"en\"\nintents:\n  Greet:\n    data:\n      - sentences:\n          - \"hello\"\n\"\"\"\n\nintents = Intents.from_yaml(intents_yaml)\nslots = []  # optional slot schemas\nresult = parse_sentence(\"hello\", intents, slots)\nif result:\n    print(f\"Intent: {result.intent.name}\")\nelse:\n    print(\"No match\")","lang":"python","description":"Parses a sentence against YAML-defined intents and prints the matched intent name."},"warnings":[{"fix":"Update code to expect `result.intent.name` instead of `intent_name` from tuple unpacking.","message":"In version 3.0, the `parse_sentence` function signature changed: the `slots` parameter is now optional and the return type changed from a tuple to an `IntentMatch` object.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Replace `Sentence` with `Intents` and use `Intents.from_yaml()`.","message":"The `from hassil import Sentence` class is deprecated in favor of using `Intents.from_yaml` directly.","severity":"deprecated","affected_versions":">=2.5.0"},{"fix":"Use the provided schema classes: `from hassil.slot_schemas import TextSlotList` and construct properly.","message":"Slot lists expect a list of `TextSlotList` or `ListSlotSchema` objects, not plain dicts. Passing raw YAML dicts will raise a validation error.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `pip install hassil` and ensure you are using Python >=3.9.","cause":"Package not installed or environment issue.","error":"ModuleNotFoundError: No module named 'hassil'"},{"fix":"Upgrade to hassil >=1.0 and use `from hassil import parse_sentence`.","cause":"Import path changed; parse_sentence is top-level but not in older versions.","error":"AttributeError: module 'hassil' has no attribute 'parse_sentence'"},{"fix":"Make sure the `language` field in YAML is a valid code (e.g., 'en', 'de', 'fr') and that the intents are defined with that language.","cause":"Unsupported or missing language definition in YAML.","error":"ValueError: No parser available for language '...'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}