Compare commits
1 Commits
master
...
06ddb003a5
| Author | SHA1 | Date | |
|---|---|---|---|
| 06ddb003a5 |
@@ -2,8 +2,9 @@
|
||||
trigger:
|
||||
platform: state
|
||||
entity_id: binary_sensor.indkorsel_sensor_motion
|
||||
to: 'on'
|
||||
actions:
|
||||
to: 'on' condition:
|
||||
- condition: template
|
||||
value_template: "{{ states('input_number.ai_gemini_calls_today') | int < 20 }}" actions:
|
||||
- action: script.overvaagning
|
||||
metadata: {}
|
||||
data: {}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
- alias: Reset AI Gemini Calls Daily
|
||||
trigger:
|
||||
platform: time
|
||||
at: '00:00:00'
|
||||
action:
|
||||
- service: input_number.set_value
|
||||
data:
|
||||
entity_id: input_number.ai_gemini_calls_today
|
||||
value: 0
|
||||
@@ -0,0 +1,7 @@
|
||||
ai_gemini_calls_today:
|
||||
name: AI Gemini Calls Today
|
||||
min: 0
|
||||
max: 50
|
||||
step: 1
|
||||
mode: box
|
||||
unit_of_measurement: calls
|
||||
@@ -43,11 +43,14 @@ overvaagning:
|
||||
eller stationære objekter. Hvis der ikke er nogen synlig årsag til
|
||||
bevægelsen, svar blot med 'Ingen åbenlys bevægelse detekteret.' Hold
|
||||
beskeden kort og underholdende – som en notifikation på Apple!
|
||||
filenames:
|
||||
images:
|
||||
- /config/www/indkorsel_snapshot.jpg
|
||||
response_variable: generated_content
|
||||
action: google_generative_ai_conversation.generate_content
|
||||
- if:
|
||||
action: ai_task.generate_data
|
||||
- service: input_number.set_value
|
||||
data:
|
||||
entity_id: input_number.ai_gemini_calls_today
|
||||
value: "{{ states('input_number.ai_gemini_calls_today') | int + 1 }}"
|
||||
- condition: template
|
||||
value_template: "{{ 'No Obvious Motion Detected.' in generated_content.text }}"
|
||||
then:
|
||||
|
||||
Reference in New Issue
Block a user