[Custom Component] extended_openai_conversation: Let's control entities via ChatGPT

No I think its more of me not knowing how to filter properly

Has anyone gotten memory retrieval to work reliably without specifically asking for it?
I have an issue where I, for example, will tell the assistant my nickname, ask it what I am usually called and it states my name, but when told to check the memory bank it answers correctly.
It’s instructed to always refer to the memory bank but it seems that unless the content is added to the configuration file using jinja2 it won’t “see it” automatically - and with todo lists not being available in state that isn’t possible, right?
I had an idea to set up an automation to update a text box with the todo list contents but ran into the character limit of attributes. Currently out of ideas… So has anyone else succeeded here?

The newest version (v0.4) now supports camera entities as input so no need for saving the images locally anymore. This should make gpt4vision directly compatible with wyze (and other camera integrations).

As as result the spec for Extended OpenAI Conversation has also been updated and simplified:

1 Like

@valentinfrlch Excellent and useful plugin,
Is there a possibility that he will recognize people, I mean I will show him pictures of people, and he will be able to diagnose from the picture if they are the friends I showed him?

Yes this is possible. I’ve tested this myself and it works surprisingly well. Sometimes it can “recognize” a person even if the face isn’t visible. I say “recognize” because this is still an LLM and not a facial recognition model. This means halluzinations can occur and you should use this with caution.

So yes, it is possible and easier to set up than training your own facial recognition model but might not be as accurate.

If you use frigate you could use something like this in an automation to analyze the most recent frame with a person detected along with a reference photo of all members of your household:

service: gpt4vision.image_analyzer
data:
  provider: OpenAI
  message: >-
    Below you see two photos. return 'yes' if and only if the person you see
    at the front door is also in one of the reference photos. 
    Else respond 'no'. If it isn't clear, respond with 'no'.
    You can only respond with 'yes' or 'no'.
  max_tokens: 10
  model: gpt-4o
  image_file: |-
    /config/www/people/person1.jpg
    /config/www/tmp/person2.jpg
  image_entity:
    - image.front_door_person
  target_width: 1280
  detail: low
  temperature: 0.5

Frigate should provide an image entity with objects it detects for each camera. So if you have a camera called camera.front_door and have object detection for person enabled you should have an entity called image.front_door_person that you can pass to gpt4vision.

1 Like

Is there a way to filter out cameras you don’t want?

Extended OpenAI Conversation will decide which cameras to include. But it only has access to the entities that you have exposed in Settings > Voice Assistants > Expose. So if you want to exclude entities, just remove them from the list.

(This assumes you have something similar to the following as part of your prompt:)
Available Devices:

```csv
entity_id,name,state,aliases
{% for entity in exposed_entities -%}
{{ entity.entity_id }},{{ entity.name }},{{ entity.state }},{{entity.aliases | join('/')}}
{% endfor -%}

This lists exposed entities in the prompt

I asked the following question on the github repository with no response. Maybe I’ll be luckier here (or maybe I just need to be more patient! time will tell):

I would like to use extended openai conversation to start a script and pass to the script identification information of the assistant device which is used to issue the command (e.g. assistant ID or area).

One way of doing it could be by creating several instances of extended openai conversation and assist pipelines, one for each assistant, with hardcoded information to pass to the script (e.g. “livingroom_assistant”). I am not sure how to implement that within a spec though so it is sent as a variable to a script.

A more efficient way would be to include some preexisting identification variables which are automatically generated when using an assistant, but I don’t know if this is available, and if it is, how to implement it.

The purpose of this would be, for example, the ability to ask the assistant to start a timer and then run a script which will show the timer countdown and/or inform that the timer is finished on a particular device. That way, if start the timer via a voice command on the kitchen tablet, the kitchen tablets can show the timer and announce it has ended but if I do it in the office, the office esp32-box3 is used.

Why didn’t I think of that, thank you.

But I do get this error

Something went wrong: Fetch failed with status code 500

When I ask what is happening around the house

Have you exposed the camera entities? If yes can you check in Developer tools > States if your camera entities have an attribute called entity_picture?

If yes, can you open a bug report here ?

Does anyone have an example of a function parsing a function response through the llm before responding, i.e. not using a template but rather letting the llm more dynamically generate a response?
Or would that necessitate a script to both query a service / api etc for a response, then having a separate api call to an llm and then outputting that as a response in the chat?

I finally got it to work. It would be great if it would show a picture of what is sees. Is that even possible?

‘A picture of what it sees’ as in drawing boxes around recognized objects? This is possible, just not with this integration. You’d be looking for an object recognition integration.
Here are some I’ve tried in the past: DOODS2 or frigate’s object recognition feature.

Why would I be getting random responses when it comes to controlling devices. Specifically lights

If I ask what lights can be controlled I get different answers every time.

If I ask to turn off all of the lights it usually does some but leaves others. And it’s random which ones

Any ideas?





Perhaps you have exposed too many lights and maximum functions are limited. Try script or group instead.

Not sure. I need to be very specific with things. Such as if i ask it to list all devices in the CSV it always just tells me a small snippit and adds [Additional Devices]. When i am very specific it lists them properly. I have had to max out the total tokens for this to work however. I thought it would be smarter and not dumb down the answers. I ahve about 30 or so lights enabled plus other devices. 91 devices in total

List out the entire CSV Device list

Here is the list of devices in the CSV:

entity_id,name,state,area_id,aliases
media_player.soundbar,Family TV,off,family_room,
cover.lounge_blinds,Lounge Blinds,open,living_room,
cover.bed_blinds,Bed Blinds,closed,master_bedroom,
cover.family_room_blinds,Family Room Blinds,open,family_room,
light.fish_tank_light,Fish Tank Light,off,family_room,Family room fish tank light
light.ensuite_light,Ensuite Light,off,ensuite,
light.ensuite_pendant,Ensuite Pendant,off,ensuite,
light.ensuite_heat,Ensuite Heat,off,ensuite,
light.ensuite_fan,Ensuite Fan,off,ensuite,
...
[Additional device entries]
...

If you have any specific actions or queries you'd like to perform with these devices, feel free to let me know!

Stop adding [Additional device entries] and tell me every deviceApologies for the confusion. Here is the complete list of devices in the CSV:

1. media_player.soundbar - Family TV
2. cover.lounge_blinds - Lounge Blinds
3. cover.bed_blinds - Bed Blinds
4. cover.family_room_blinds - Family Room Blinds
5. light.fish_tank_light - Fish Tank Light
6. light.ensuite_light - Ensuite Light
7. light.ensuite_pendant - Ensuite Pendant
8. light.ensuite_heat - Ensuite Heat
9. light.ensuite_fan - Ensuite Fan
10. weather.openweathermap - Weather
11. sensor.grid_power_use_daily - Grid Power Use Daily
12. sensor.electricity_used_daily - Electricity Used Daily
13. sensor.water_used_daily - Water Used Daily
14. sensor.solar_produced_daily - Solar Produced Daily
15. sensor.gas_used_daily - Gas Used Daily
16. sensor.laundry_temperature - Laundry Temperature
17. sensor.laundry_humidity - Laundry Humidity
18. light.small_lamp - Small Lamp
19. light.garden_lights - Garden Lights
20. binary_sensor.kitchen_window - Kitchen Window
21. binary_sensor.garage_window - Garage window
22. fan.bedroom_fan - Bedroom Fan
23. light.bedroom_light - Bedroom Light
24. binary_sensor.bed_1_windows - Bed 1 Windows
25. binary_sensor.bed_2_window - Bed 2 Window
26. binary_sensor.bed_3_window - Bed 3 Window
27. binary_sensor.study_window - Study Window
28. binary_sensor.lounge_windows - Lounge Windows
29. binary_sensor.ensuite_window - Ensuite Window
30. binary_sensor.bathroom_window - Bathroom Window
31. binary_sensor.front_door - Front Door
32. binary_sensor.garage_rear_door - Garage Rear Door
33. binary_sensor.laundry_door - Laundry Door
34. binary_sensor.lounge_sliding - Lounge Sliding
35. binary_sensor.dining_sliding - Dining Sliding
36. switch.air_conditioner - Air Conditioner
37. sensor.hallway_temperature - Hallway Temperature
38. cover.kitchen_blinds - Kitchen Blinds
39. fan.study_fan - Study Fan
40. light.study_light - Study Light
41. cover.garage_door - Garage Door
42. switch.heater - Heater
43. todo.chatgpt - Chatgpt
44. light.left_bed_lamp - Left Bed Lamp
45. light.right_bed_lamp - Right Bed Lamp
46. light.lounge_cabinet_downlights - Lounge Cabinet Downlights
47. light.kitchen_led_strip - Kitchen Led Strip
48. light.family_room_led_strip - Family Room LED Strip
49. lock.rear_entry_door - Rear entry door
50. fan.air_purifier - Air Purifier
51. camera.back_gate - Back Gate
52. camera.backyard - Backyard
53. camera.cat_room - Cat Room
54. camera.driveway - Driveway
55. camera.family - Family
56. camera.front_door - Front Door
57. camera.front_gate - Front Gate
58. camera.front_of_house - Front Of House
59. camera.garage - Garage
60. camera.garage_door - Garage Door
61. camera.lounge - Lounge
62. switch.tasmota2_3 - Rear garden irrigation
63. switch.tasmota3_2 - Rear grass irrigation
64. switch.tasmota4 - Front garden irrigation
65. light.dining_room_light - Dining room Light
66. light.family_room_lamp - Family room lamp
67. light.family_room_light - Family room light
68. light.front_hall_light - Front Hall light
69. light.front_porch_light - Front porch light
70. light.front_downlights - Front Downlights
71. light.garage_light - Garage Wall Switch Garage Light
72. light.hollys_wall_switch - Holly's Light
73. light.laundry_light - Laundry Light
74. light.backyard_lights - Backyard Lights
75. light.wardrobe_light - Master Bedroom Switch Wardrobe Light
76. light.tv_led_strip - TV Led Strip
77. light.kitchen_light - Kitchen light
78. light.lounge_light - Lounge Light
79. light.name_light - Holly’s name light
80. light.bathroom_light - Bathroom light
81. light.bedroom_3_light - Bedroom 3 light
82. sensor.indoor_temperature - Indoor Temperature
83. sensor.indoor_carbon_dioxide - Indoor Carbon dioxide
84. sensor.indoor_humidity - Indoor Humidity
85. sensor.outdoor_station_temperature - Outdoor station Temperature
86. sensor.outdoor_station_humidity - Outdoor station Humidity
87. media_player.receiver - Receiver
88. media_player.rx_v685_7e43da - rx-v685 7e43da
89. media_player.ceiling_speakers - Family room speakers
90. media_player.homepod_mini - Siri HomePod mini
91. light.display_cabinet_lights - Cabinet lights

I hope this provides the information you were looking for! If you have any specific requests for these devices, feel free to let me know.

List out the entire CSV, showing every device, including their entity id, name, state, area and any aliases

Here is the complete list of devices in the CSV, including their entity ID, name, state, area, and aliases:

1. **media_player.soundbar**
- Name: Family TV
- State: off
- Area: family_room
- Aliases: None

2. **cover.lounge_blinds**
- Name: Lounge Blinds
- State: open
- Area: living_room
- Aliases: None

3. **cover.bed_blinds**
- Name: Bed Blinds
- State: closed
- Area: master_bedroom
- Aliases: None

4. **cover.family_room_blinds**
- Name: Family Room Blinds
- State: open
- Area: family_room
- Aliases: None

5. **light.fish_tank_light**
- Name: Fish Tank Light
- State: off
- Area: family_room
- Aliases: Family room fish tank light

6. **light.ensuite_light**
- Name: Ensuite Light
- State: off
- Area: ensuite
- Aliases: None

7. **light.ensuite_pendant**
- Name: Ensuite Pendant
- State: off
- Area: ensuite
- Aliases: None

8. **light.ensuite_heat**
- Name: Ensuite Heat
- State: off
- Area: ensuite
- Aliases: None

9. **light.ensuite_fan**
- Name: Ensuite Fan
- State: off
- Area: ensuite
- Aliases: None

10. **weather.openweathermap**
- Name: Weather
- State: sunny
- Area: outdoors
- Aliases: None

... [Additional device entries] ...

If you need any specific actions to be performed on these devices or have any other inquiries, feel free to let me know!

stop adding [Additional device entries]Apologies for the confusion. Here is the complete list of devices in the CSV, including their entity ID, name, state, area, and aliases:

1. **media_player.soundbar**
- Name: Family TV
- State: off
- Area: family_room
- Aliases: None

2. **cover.lounge_blinds**
- Name: Lounge Blinds
- State: open
- Area: living_room
- Aliases: None

3. **cover.bed_blinds**
- Name: Bed Blinds
- State: closed
- Area: master_bedroom
- Aliases: None

4. **cover.family_room_blinds**
- Name: Family Room Blinds
- State: open
- Area: family_room
- Aliases: None

5. **light.fish_tank_light**
- Name: Fish Tank Light
- State: off
- Area: family_room
- Aliases: Family room fish tank light

6. **light.ensuite_light**
- Name: Ensuite Light
- State: off
- Area: ensuite
- Aliases: None

7. **light.ensuite_pendant**
- Name: Ensuite Pendant
- State: off
- Area: ensuite
- Aliases: None

8. **light.ensuite_heat**
- Name: Ensuite Heat
- State: off
- Area: ensuite
- Aliases: None

9. **light.ensuite_fan**
- Name: Ensuite Fan
- State: off
- Area: ensuite
- Aliases: None

10. **weather.openweathermap**
- Name: Weather
- State: sunny
- Area: outdoors
- Aliases: None

11. **sensor.grid_power_use_daily**
- Name: Grid Power Use Daily
- State: 8.8283
- Area: outdoors
- Aliases: Electricity/Power/Grid Power

12. **sensor.electricity_used_daily**
- Name: Electricity Used Daily
- State: 8.8283
- Area: outdoors
- Aliases: Electricity/Power

13. **sensor.water_used_daily**
- Name: Water Used Daily
- State: 0.148
- Area: outdoors
- Aliases: Water

14. **sensor.solar_produced_daily**
- Name: Solar Produced Daily
- State: 4.7737
- Area: outdoors
- Aliases: Solar

15. **sensor.gas_used_daily**
- Name: Gas Used Daily
- State: 0.51
- Area: outdoors
- Aliases: Gas

16. **sensor.laundry_temperature**
- Name: Laundry Temperature
- State: 21.8
- Area: laundry
- Aliases: None

17. **sensor.laundry_humidity**
- Name: Laundry Humidity
- State: 44
- Area: laundry
- Aliases: None

18. **light.small_lamp**
- Name: Small Lamp
- State: off
- Area: living_room
- Aliases: None

19. **light.garden_lights**
- Name: Garden Lights
- State: unavailable
- Area: outdoors
- Aliases: None

20. **binary_sensor.kitchen_window**
- Name: Kitchen Window
- State: off
- Area: alarm
- Aliases: None

21. **binary_sensor.garage_window**
- Name: Garage window
- State: off
- Area: alarm
- Aliases: None

22. **fan.bedroom_fan**
- Name: Bedroom Fan
- State: off
- Area: master_bedroom
- Aliases: None

23. **light.bedroom_light**
- Name: Bedroom Light
- State: off
- Area: master_bedroom
- Aliases: None

24. **binary_sensor.bed_1_windows**
- Name: Bed 1 Windows
- State: off
- Area: alarm
- Aliases: None

25. **binary_sensor.bed_2_window**
- Name: Bed 2 Window
- State: off
- Area: alarm
- Aliases: None

26. **binary_sensor.bed_3_window**
- Name: Bed 3 Window
- State: on
- Area: alarm
- Aliases: None

27. **binary_sensor.study_window**
- Name: Study Window
- State: off
- Area: alarm
- Aliases: None

28. **binary_sensor.lounge_windows**
- Name: Lounge Windows
- State: off
- Area: alarm
- Aliases: None

29. **binary_sensor.ensuite_window**
- Name: Ensuite Window
- State: on
- Area: alarm
- Aliases: None

30. **binary_sensor.bathroom_window**
- Name: Bathroom Window
- State: on
- Area: alarm
- Aliases: None

31. **binary_sensor.front_door**
- Name: Front Door
- State: off
- Area: alarm
- Aliases: None

32. **binary_sensor.garage_rear_door**
- Name: Garage Rear Door
- State: off
- Area: alarm
- Aliases: None

33. **binary_sensor.laundry_door**
- Name: Laundry Door
- State: off
- Area: alarm
- Aliases: None

34. **binary_sensor.lounge_sliding**
- Name: Lounge Sliding
- State: off
- Area: alarm
- Aliases: None

35. **binary_sensor.dining_sliding**
- Name: Dining Sliding
- State: on
- Area: alarm
- Aliases: None

36. **switch.air_conditioner**
- Name: Air Conditioner
- State: off
- Area: hallway
- Aliases: None

37. **sensor.hallway_temperature**
- Name: Hallway Temperature
- State: 16.8
- Area: hallway
- Aliases: None

38. **cover.kitchen_blinds**
- Name: Kitchen Blinds
- State: opening
- Area: kitchen
- Aliases: None

39. **fan.study_fan**
- Name: Study Fan
- State: off
- Area: study
- Aliases: None

40. **light.study_light**
- Name: Study Light
- State: off
- Area: study
- Aliases: None

41. **cover.garage_door**
- Name: Garage Door
- State: closed
- Area: garage
- Aliases: None

42. **switch.heater**
- Name: Heater
- State: off
- Area: family_room
- Aliases: None

43. **todo.chatgpt**
- Name: Chatgpt
- State: 3
- Area: None
- Aliases: None

44. **light.left_bed_lamp**
- Name: Left Bed Lamp
- State: off
- Area: master_bedroom
- Aliases: None

45. **light.right_bed_lamp**
- Name: Right Bed Lamp
- State: off
- Area: master_bedroom
- Aliases: None

46. **light.lounge_cabinet_downlights**
- Name: Lounge Cabinet Downlights
- State: off
- Area: living_room
- Aliases: None

47. **light.kitchen_led_strip**
- Name: Kitchen Led Strip
- State: off
- Area: kitchen
- Aliases: None

48. **light.family_room_led_strip**
- Name: Family Room LED Strip
- State: off
- Area: family_room
- Aliases: None

49. **lock.rear_entry_door**
- Name: Rear entry door
- State: unlocked
- Area: garage
- Aliases: Back door/Rear door

50. **fan.air_purifier**
- Name: Air Purifier
- State: off
- Area: master_bedroom
- Aliases: None

51. **camera.back_gate**
- Name: Back Gate
- State: recording
- Area: outdoors
- Aliases: None

52. **camera.backyard**
- Name: Backyard
- State: recording
- Area: outdoors
- Aliases: None

53. **camera.cat_room**
- Name: Cat Room
- State: recording
- Area: cat_room
- Aliases: None

54. **camera.driveway**
- Name: Driveway
- State: recording
- Area: outdoors
- Aliases: None

55. **camera.family**
- Name: Family
- State: recording
- Area: family_room
- Aliases: None

56. **camera.front_door**
- Name: Front Door
- State: recording
- Area: outdoors
- Aliases: None

57. **camera.front_gate**
- Name: Front Gate
- State: recording
- Area: outdoors
- Aliases: None

58. **camera.front_of_house**
- Name: Front Of House
- State: recording
- Area: outdoors
- Aliases: None

59. **camera.garage**
- Name: Garage
- State: recording
- Area: garage
- Aliases: None

60. **camera.garage_door**
- Name: Garage Door
- State: recording
- Area: outdoors
- Aliases: None

61. **camera.lounge**
- Name: Lounge
- State: recording
- Area: living_room
- Aliases: None

62. **switch.tasmota2_3**
- Name: Rear garden irrigation
- State: off
- Area: outdoors
- Aliases: None

63. **switch.tasmota3_2**
- Name: Rear grass irrigation
- State: off
- Area: outdoors
- Aliases: None

64. **switch.tasmota4**
- Name: Front garden irrigation
- State: off
- Area: outdoors
- Aliases: None

65. **light.dining_room_light**
- Name: Dining room Light
- State: off
- Area: dining_room
- Aliases: None

66. **light.family_room_lamp**
- Name: Family room lamp
- State: off
- Area: family_room
- Aliases: None

67. **light.family_room_light**
- Name: Family room light
- State: off
- Area: family_room
- Aliases: None

68. **light.front_hall_light**
- Name: Front Hall light
- State: off
- Area: front_hall
- Aliases: None

69. **light.front_porch_light**
- Name: Front porch light
- State: off
- Area: front_hall
- Aliases: None

70. **light.front_downlights**
- Name: Front Downlights
- State: off
- Area: front_hall
- Aliases: None

71. **light.garage_light**
- Name: Garage Wall Switch Garage Light
- State: off
- Area: garage
- Aliases: None

72. **light.hollys_wall_switch**
- Name: Holly's Light
- State: off
- Area: holly_s_bedroom
- Aliases: None

73. **light.laundry_light**
- Name: Laundry Light
- State: off
- Area: laundry
- Aliases: None

74. **light.backyard_lights**
- Name: Backyard Lights
- State: off
- Area: laundry
- Aliases: None

75. **light.wardrobe_light**
- Name: Master Bedroom Switch Wardrobe Light
- State: off
- Area: master_bedroom
- Aliases: None

76. **light.tv_led_strip**
- Name: TV Led Strip
- State: off
- Area: living_room
- Aliases: None

77. **light.kitchen_light**
- Name: Kitchen light
- State: off
- Area: kitchen
- Aliases: None

78. **light.lounge_light**
- Name: Lounge Light
- State: off
- Area: living_room
- Aliases: None

79. **light.name_light**
- Name: Holly’s name light
- State: off
- Area: holly_s_bedroom
- Aliases: None

80. **light.bathroom_light**
- Name: Bathroom light
- State: off
- Area: bathroom
- Aliases: None

81. **light.bedroom_3_light**
- Name: Bedroom 3 light
- State: off
- Area: cat_room
- Aliases: None

82. **sensor.indoor_temperature**
- Name: Indoor Temperature
- State: 15.2
- Area: family_room
- Aliases: None

83. **sensor.indoor_carbon_dioxide**
- Name: Indoor Carbon dioxide
- State: 490
- Area: family_room
- Aliases: None

84. **sensor.indoor_humidity**
- Name: Indoor Humidity
- State: 61
- Area: family_room
- Aliases: None

85. **sensor.outdoor_station_temperature**
- Name: Outdoor station Temperature
- State: 13.8
- Area: outdoors
- Aliases: None

86. **sensor.outdoor_station_humidity**
- Name: Outdoor station Humidity
- State: 72
- Area: outdoors
- Aliases: None

87. **media_player.receiver**
- Name: Receiver
- State: idle
- Area: living_room
- Aliases: None

88. **media_player.rx_v685_7e43da**
- Name: rx-v685 7e43da
- State: off
- Area: living_room
- Aliases: None

89. **media_player.ceiling_speakers**
- Name: Family room speakers
- State: idle
- Area: family_room
- Aliases: None

90. **media_player.homepod_mini**
- Name: Siri HomePod mini
- State: off
- Area: family_room
- Aliases: None

91. **light.display_cabinet_lights**
- Name: Cabinet lights
- State: off
- Area: family_room
- Aliases: Family room cabinet lights

I hope this provides the information you were looking for! If you have any specific requests for these devices or need further assistance, feel free to let me know.

Did you check your prompt? What model are you using? I think default prompt told GPT to talk concisely. Since it can specify your 91 devices when you told GPT to do so, I think this is related to GPT capability or prompt.

i have multiple issues with multiple prompts.
For instance, when asking what lights can be controlled, blinds are included.

How can I assist?

what lights can you control

You have the following lights that I can control: - Lounge Blinds - Bed Blinds - Family Room Blinds - Fish Tank Light - Ensuite Light - Ensuite Pendant - Ensuite Heat - Ensuite Fan - Small Lamp - Kitchen Blinds - Bedroom Light - Bedroom Fan - Study Light - Cabinet lights - Family room lamp - Family room light - Front Hall light - Front porch light - Front Downlights - Garage Wall Switch Garage Light - Holly’s Light - Laundry Light - Backyard Lights - Wardrobe Light - TV Led Strip - Kitchen light - Lounge Light - Holly’s name light - Bathroom light - Bedroom 3 light

Asking the same prompt 3 separate times in 3 separate windows (Closing the assist window and reopening) i get 3 different answers.

image


Any idea what i can do to check this

Same thing running gpt-4o-2024-05-13



This is my prompt, it does say to speak concisely

Any idea what I should try to make this more accurate when controlling devices

You possess the knowledge of all the universe, answer any question given to you truthfully and to your fullest ability.  
You are also a smart home manager who has been given permission to control my smart home which is powered by Home Assistant.
I will provide you information about my smart home, you can truthfully make corrections or respond in polite and concise language.


Current Time: {{now()}}

Available Devices:
csv
entity_id,name,state,area_id,aliases
{% for entity in exposed_entities -%}
{{ entity.entity_id }},{{ entity.name }},{{ entity.state }},{{area_id(entity.entity_id)}},{{entity.aliases | join('/')}}
{% endfor -%}


Areas:
csv
area_id,name
{% for area_id in areas() -%}
{{area_id}},{{area_name(area_id)}}
{% endfor -%}



The current state of devices is provided in Available Devices.
Only use the execute_services function when smart home actions are requested.
Do not tell me what you're thinking about doing either, just do it.
If I ask you about the current state of the home, or many devices I have, or how many devices are in a specific state, just respond with the accurate information but do not call the execute_services function.
If I ask you what time or date it is be sure to respond in a human readable format.
If you don't have enough information to execute a smart home command then specify what other information you need.
For current weather information, be sure to get what attributes you can from the Indoor temperature and humidity and Outdoor temperature and humidy entities before checking the weather.openweathermap entity for any other information you need.
When you are asked to turn off all lights, make sure to run the script called script.lights_off

Im able to get around this by making a group helper, listing all lights in the group and specifically saying in the prompt

When you are asked to turn off all lights, make sure to use the device with the entity id of light.all

I just feel like it should be easier. Would be keen to know other ideas