Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106521

Variable template being changed after saving

$
0
0

I am trying to add a variable to a automation im creating however whenever i save the automation home assistant changes the template i added to the variable to “[object Object]”: null

I have confirmed that my template in the variable works as a template.

has anyone got any ideas on how i can get this working?

Before Save

alias: Test
description: ""
triggers: []
conditions: []
actions:
  - variables:
      TS: {{now().strftime('%H:%M_%d-%m-%Y')}}
  - action: camera.snapshot
    metadata: {}
    data:
      filename: /media/local/snapshots/doorbell_person_{{TS}}.jpg
    target:
      entity_id: camera.reolink_video_doorbell_wifi_fluent
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - action: notify.mobile_app_iphone15
    metadata: {}
    data:
      title: Camera Detection
      message: Person Detected on Doorbell Camera
      data:
        image: /media/local/local/snapshots/doorbell_person{{TS}}.jpg
        actions:
          - action: URI
            title: Open Camera
            uri: /lovelace/family-cameras
mode: single

After saving

alias: Test
description: ""
triggers: []
conditions: []
actions:
  - variables:
      TS:
        "[object Object]": null
  - action: camera.snapshot
    metadata: {}
    data:
      filename: /media/local/snapshots/doorbell_person_{{TS}}.jpg
    target:
      entity_id: camera.reolink_video_doorbell_wifi_fluent
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - action: notify.mobile_app_iphone15
    metadata: {}
    data:
      title: Camera Detection
      message: Person Detected on Doorbell Camera
      data:
        image: /media/local/local/snapshots/doorbell_person{{TS}}.jpg
        actions:
          - action: URI
            title: Open Camera
            uri: /lovelace/family-cameras
mode: single

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106521

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>