feat(jeeves): home-assistant
modularization
This commit is contained in:
parent
ee98e1582c
commit
16457e0a09
6 changed files with 200 additions and 153 deletions
27
machines/nixos/x86_64-linux/jeeves/home-assistant/jokes.nix
Normal file
27
machines/nixos/x86_64-linux/jeeves/home-assistant/jokes.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
services.home-assistant.config = {
|
||||
conversation.intents = {
|
||||
TellJoke = [
|
||||
"Tell [me] (a joke|something funny|a dad joke)"
|
||||
];
|
||||
};
|
||||
sensor = [
|
||||
{
|
||||
name = "random_joke";
|
||||
platform = "rest";
|
||||
json_attributes = "joke";
|
||||
resource = "https://icanhazdadjoke.com/";
|
||||
scan_interval = "3600";
|
||||
headers.Accept = "application/json";
|
||||
}
|
||||
];
|
||||
|
||||
intent_script.TellJoke = {
|
||||
speech.text = ''{{ state_attr("sensor.random_joke", "joke") }}'';
|
||||
action = {
|
||||
service = "homeassistant.update_entity";
|
||||
entity_id = "sensor.random_joke";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue