hassil icon indicating copy to clipboard operation
hassil copied to clipboard

Hassil behaves differently standalone vs. within Home Assistant

Open hacookbook opened this issue 11 months ago • 1 comments

I am testing the same scenario in the test "test_wildcard_ordering" (link).

I cloned and ran hassil 1.6.1 locally, and was able to replicate the results expected in the test. Great!

$ python3 -m hassil examples/test.yaml --areas 'living room'
INFO:hassil:Area names: ['living room']
INFO:hassil:Device/Entity names: []
Reading sentences from stdin...
play the white album by the beatles in the living room
{'intent': 'Test', 'album': 'the white album ', 'artist': 'the beatles ', 'room': 'the living room'}

However, using the latest Home Assistant 2024.2.5, I do not get the same results. I am using the same yaml from the test, saved as custom_sentences/en/test.yaml.

language: "en"
intents:
  Test:
    data:
      - sentences:
          - "play {album} by {artist}"
          - "play {album} by {artist} in {room}"
lists:
  album:
    wildcard: true
  artist:
    wildcard: true
  room:
    wildcard: true

HA 2024.2.5 looks to be using the same version, 1.6.1

However, using "developer tools > assist" I get different results.

intent:
  name: Test
slots:
  album: 'the white album '
  artist: the beatles in the living room
details:
  album:
    name: album
    value: 'the white album '
    text: 'the white album '
  artist:
    name: artist
    value: the beatles in the living room
    text: the beatles in the living room
targets: {}
match: true
sentence_template: play {album} by {artist}
unmatched_slots: {}
source: custom
file: en/test.yaml

Does hassil behave differently in HA vs. standalone? Is there anyway to reproduce the same behaviour in HA? Thanks!

hacookbook avatar Mar 01 '24 16:03 hacookbook