From 76ed0c52bf29c9357d4de99f4b6c8b3f7d4fd3f3 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Fri, 10 Feb 2023 09:23:43 -0600 Subject: [PATCH] Blog post about HassGetState intent (#1676) * Blog post about HassGetState intent * Update blog/2023-02-09-hassgetstate.md Co-authored-by: Paulus Schoutsen * Update blog/2023-02-09-hassgetstate.md Co-authored-by: Paulus Schoutsen --------- Co-authored-by: Paulus Schoutsen --- blog/2023-02-09-hassgetstate.md | 46 +++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 blog/2023-02-09-hassgetstate.md diff --git a/blog/2023-02-09-hassgetstate.md b/blog/2023-02-09-hassgetstate.md new file mode 100644 index 00000000..17e7b552 --- /dev/null +++ b/blog/2023-02-09-hassgetstate.md @@ -0,0 +1,46 @@ +--- +author: Michael Hansen +authorURL: https://twitter.com/rhasspy +authorImageURL: /img/profile/mike_hansen.png +authorTwitter: rhasspy +title: The HassGetState intent +--- + +We've added a new [built-in intent](/docs/intent_builtin/): `HassGetState` + +This intent will enable users to ask questions to [Assist](https://www.home-assistant.io/docs/assist) once we've added translations to the [intents repository](https://github.com/home-assistant/intents/). +You can try it out now by adding [custom sentences](https://www.home-assistant.io/docs/assist/custom_sentences): + +```yaml +# Example /custom_sentences/en/get_state.yaml + +language: en +intents: + HassGetState: + data: + - sentences: + - what is [in ] + - is {state} [in ] + +responses: + intents: + HassGetState: + default: "{{ slots.name }} is {{ state.state_with_unit }}" + +lists: + state: + values: + - "on" + - "off" + - open + - closed + - locked + - unlocked + - wet + - dry +``` + +With these sentences, you can now ask Assist things like "what is the outside temperature?", "is the front door locked?", or "is the floor in the basement wet?" +This relies on having entity names (or aliases) set up just right, of course. For example, a sensor named "outside temperature" and a binary moisture sensor named "floor" in the "basement" area. + +As we add translations, more types of questions will be possible such as "which lights are in the living room?" and "are any doors unlocked?"