summaryrefslogtreecommitdiffstats
path: root/blueprints/script/camera/send_photo.yaml
blob: 2b14639542500db78ea85ac36602d9c2299f0aac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
blueprint:
  name: Send Photo
  description: Send a single photo from the camera
  domain: script
  input:
    camera:
      name: Camera
      description: Camera
      default: camera.192_168_50_51
      selector:
        entity:
          domain: camera
    host:
      name: Host
      description: Host running camera server
      default: http://127.0.0.1:8123
    caption: 
      name: Caption
      description: Caption to send in telegram message
      default: ''

variables:
  camera: !input camera
  smartpi: !input host
  caption: !input caption
#  caption: AubergineView
#  delay: 5
#  fast_shots: 15
#  fast_delay: 1000

mode: single
sequence:
  - service: telegram_bot.send_photo
    data:
      disable_notification: false
      caption: '{{ caption }} at {{ states("sensor.date_time_iso") }}'
      url: '{{ smartpi + state_attr(camera, "entity_picture") }}'