mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-25 10:16:35 +00:00
Blog post about HassGetState intent (#1676)
* Blog post about HassGetState intent * Update blog/2023-02-09-hassgetstate.md Co-authored-by: Paulus Schoutsen <balloob@gmail.com> * Update blog/2023-02-09-hassgetstate.md Co-authored-by: Paulus Schoutsen <balloob@gmail.com> --------- Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
parent
a8ff3d9c47
commit
76ed0c52bf
46
blog/2023-02-09-hassgetstate.md
Normal file
46
blog/2023-02-09-hassgetstate.md
Normal file
@ -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 <config>/custom_sentences/en/get_state.yaml
|
||||||
|
|
||||||
|
language: en
|
||||||
|
intents:
|
||||||
|
HassGetState:
|
||||||
|
data:
|
||||||
|
- sentences:
|
||||||
|
- what is <name> [in <area>]
|
||||||
|
- is <name> {state} [in <area>]
|
||||||
|
|
||||||
|
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?"
|
Loading…
x
Reference in New Issue
Block a user