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

How to check if picture is uptodate

$
0
0

@Thuurke wrote:

Hello,

I have an automation that is triggered by a button (doorbell)
The action is taking a picture from a esp32-cam programmed with esphome and send the picture to telegram.

I have this code:

    - service: camera.snapshot
      data:
        entity_id: camera.esp32cam01
        filename: '/home/homeassistant/.homeassistant/www/camerapictures/doorbell.jpg'

If the camare is disconnected the file is not replaced and an old picture is sent.

I can add a condition of “when camera is online”, and make an other automation that is triggered if not and send a telegram that camera is down (but doorbell is pushed).

Other way could be: Check if file exists before sending and if so send picture and delete it after sending the telegram. Is this possible?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 95386

Trending Articles



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