You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -148,6 +148,26 @@ These `binary_sensor` entities provide simple on/off states:
148
148
149
149
*`binary_sensor.[tank_name]_water_change_needed`: Indicates whether a water change is currently recommended (On = Yes, Off = No).
150
150
151
+
### Parameter Analysis Toggle Switches
152
+
153
+
These `switch` entities control which parameters are included in AI analysis, allowing you to save on tokens and rate limits:
154
+
155
+
*`switch.[tank_name]_analyze_temperature`: Enable/disable AI analysis of temperature readings.
156
+
*`switch.[tank_name]_analyze_ph`: Enable/disable AI analysis of pH readings.
157
+
*`switch.[tank_name]_analyze_salinity`: Enable/disable AI analysis of salinity readings.
158
+
*`switch.[tank_name]_analyze_dissolved_oxygen`: Enable/disable AI analysis of dissolved oxygen readings.
159
+
*`switch.[tank_name]_analyze_water_level`: Enable/disable AI analysis of water level readings.
160
+
*`switch.[tank_name]_analyze_orp`: Enable/disable AI analysis of ORP (oxidation-reduction potential) readings.
161
+
*`switch.[tank_name]_analyze_camera`: Enable/disable AI visual analysis from camera images.
162
+
163
+
**Usage:**
164
+
* When a parameter toggle is **ON** (default), the AI will analyze that parameter and include it in notifications.
165
+
* When a parameter toggle is **OFF**, the AI will skip analysis of that parameter entirely, reducing token usage.
166
+
* The **camera toggle** controls whether camera images are sent to the AI for visual analysis - useful when you want to reduce token usage or don't need visual monitoring temporarily.
167
+
* Useful for temporarily disabling analysis of specific parameters that don't need monitoring.
168
+
* Changes take effect on the next scheduled analysis or when you manually trigger an analysis via service call.
169
+
* Only switches for configured sensors/camera will be created (e.g., if you don't have a camera configured, there won't be an "Analyze Camera" switch).
170
+
151
171

152
172
153
173
Example Card:
@@ -247,13 +267,15 @@ Visual analysis complements sensor readings by providing context that numbers al
247
267
248
268
The integration adds services that allow you to trigger analysis updates manually. This is useful for creating automations based on specific events (e.g., after a water change).
249
269
270
+
**Note:** Only parameters with their analysis toggle switches enabled will be included in the analysis. Use the parameter analysis toggle switches to control which parameters are analyzed and save on AI tokens/rate limits.
271
+
250
272
### Service: `aquarium_ai.run_analysis`
251
273
252
274
Triggers analysis for **all configured aquariums**.
253
275
254
276
This service will:
255
277
256
-
* Update all AI analysis sensors with fresh analysis
278
+
* Update all AI analysis sensors with fresh analysis (only for parameters with analysis enabled)
257
279
* Update all status sensors with current readings
258
280
* Send a notification (if notifications are enabled)
259
281
@@ -267,7 +289,7 @@ Triggers analysis for **a specific aquarium**.
267
289
268
290
This service will:
269
291
270
-
* Update all AI analysis sensors with fresh analysis for the selected aquarium
292
+
* Update all AI analysis sensors with fresh analysis for the selected aquarium (only for parameters with analysis enabled)
271
293
* Update all status sensors with current readings for the selected aquarium
272
294
* Send a notification (if notifications are enabled and send_notification is true) for the selected aquarium
"description": f"Detailed analysis of the aquarium's {sensor_name.lower()} conditions. Provide comprehensive explanation including current status, potential issues, trends, and detailed recommendations if needed.",
"description": f"Detailed analysis of the aquarium's {sensor_name.lower()} conditions. Provide comprehensive explanation including current status, potential issues, trends, and detailed recommendations if needed.",
521
+
"required": True,
522
+
"selector": {"text": None}
523
+
}
524
+
elifsensor_entityandnotanalyze_enabled:
525
+
_LOGGER.debug("Skipping %s analysis for %s (toggle disabled)", sensor_name, tank_name)
521
526
522
527
ifnotsensor_data:
523
528
_LOGGER.warning("No valid sensor data available for analysis")
"description": "Brief 1-2 sentence visual analysis of the aquarium from the camera image (under 200 characters). Focus on water clarity, fish/plant health, and any maintenance needs visible.",
0 commit comments