@Lifelogger wrote:
Hi,
I have a front door camera that I trigger to take a snapshot when movement by a PIR sensor is detect. I use the date and time of the change of the pir sensor in the filename, so that I have a history of images. However, there is one problem. The timestamp is off by 1 hour. I live in UTC+1 so I understand where it comes from. Although Hass used the correct date and time.
How do I update my automation, so that the time is actually correct? Who can help me?
alias: frontdoor_camera_snapshot trigger: - platform: state entity_id: binary_sensor.frontdoor_pir_sensor_occupancy from: "off" to: "on" action: - service: camera.snapshot data: entity_id: camera.frontdoor_camera filename: '/config/www/camera/camera_{{ states.binary_sensor.frontdoor_pir_sensor_occupancy.last_updated.strftime("%Y%m%d_%H%M%S") }}.jpg'
Posts: 1
Participants: 1