#Testing issues
1 messages ยท Page 1 of 1 (latest)
Please use a code share site to share code or logs, for example:
- https://dpaste.org/ (select YAML for the language, and consider picking a longer expiry)
- http://pastie.org/ (select YAML for the language)
- https://paste.debian.net/ (you guessed it, select YAML as the language)
Please don't use Pastebin, since it can randomly add spaces to the main view. Please also don't share text as images since it makes it harder for people to help you. Remember that others may have colour blindness, impaired vision, etc.
@tall spoke Test passes until I add the response line https://dpaste.org/PZVTj
Here is the error https://dpaste.org/oyyM6
Have you created a file under the responses dir? What does it look like?
No. I didn't do that for my other intents. I am guessing that is the problem then... I probably didn't change the response from those intial intents that I added to. Let me look at that.
Afaik you have not added new intents. You've added sentences for existing intents
New intents require their own responses
I haven't done the PR yet. I have a bunch in a branch. Thanks that was what I didn't know. I will add those in and I assume then the test is just making sure the response file works as planned
Pretty much. You define key-value response pairs, declare the key to be used in the sentences and check that the expected value comes back in the test
I have it all working but I am wondering if I can be clever with mute and use the same intent for mute and unmute. It seems to be working except I am having trouble with the response. Looking at others on GH I should be able to use a template but I am trying to check the value of a slot but it isn't working?
Sentence
language: en intents: HassMediaMute: data: - sentences: - "({is_volume_muted:state};<name>)" requires_context: domain: media_player
Common:
is_volume_muted: values: - in: "mute" out: "true" - in: "unmute" out: "false"
Response
language: en responses: intents: HassMediaMute: default: | {% if state == "true" %} "Muted" {% else %} "Unmuted" {% endif %}
So just use two intents? (Custom intents work so different and I am used to them!)
you're probably better off doing 2 intents, as there are for turn on and turn off
OK I will do that and then will be done
erm... apart from the actual intents in core you mean ๐
Yes well my bit is done ๐
you don't have to build those, too, but the sentences are useless without them ๐
as long as you're aware and ok with that, it's all good
Yep no probs. I had done the sentences for Music Assistant so it was logical to bring them across.
i think this came up in one of our previous conversations, but take a look at my proposal here #devs_voice-archived message
this might help MA and other custom integrations
Good thoughts. See what "they" say!
Phew PR submitted! There was a git battle but I won!
Looking at MikeH PR #110757 it looks like a cut and paste exercise for the intents without extra slots so I might give that a go! I am assuming that PR is all that was done to make the intents work...?
True, but unlike Mike, we don't have the privilege of being in permanent discussions with other engineers at Nabu Casa. So my suggestion is that you create very small PRs, one for each intent
and I know I'm asking a lot after you've submitted that big PR, but it would be best to do the same for https://github.com/home-assistant/intents/pull/2063
in terms of new intents, it's also Mike that needs to approve the contributions. I can only say that a new sentence is suitable or not for an existing intent
OK I will try and do that over the next couple of days
I have pulled three intents out of the original large PR. This is the new one https://github.com/home-assistant/intents/pull/2080