Hello, I need some help to set up my very first automation with hassio.
I have a Tapo C200 camera, successfully integrated that transmit and RTSP correctly.
Now I would like to set up and automation, in order to register the stream on a MP4 file, in some hours of the day.
I modified the automation.yaml file in the following way:
'automation rec_fish:
- trigger:
- platform: time_pattern
hours: “19”
minutes: “59”
seconds: “00”
action:- service: camera.record
target:
entity_id: camera.tapo_c200
data:
duration: 180
filename: “/tmp/prova.mp4”’
- service: camera.record
- platform: time_pattern
but there are some errors.
Here are the logs when I start the hassio:
‘2023-05-05 20:13:14.365 ERROR (MainThread) [homeassistant.components.automation] Unnamed automation could not be validated and has been disabled: extra keys not allowed @ data[‘automation rec_fish’]. Got [{‘trigger’: [{‘platform’: ‘time_pattern’, ‘hours’: ‘19’, ‘minutes’: ‘59’, ‘seconds’: ‘00’}], ‘action’: [{‘service’: ‘camera.record’, ‘target’: {‘entity_id’: ‘camera.tapo_c200’}, ‘data’: {‘duration’: 180, ‘filename’: ‘/tmp/prova.mp4’}}]}]
required key not provided @ data[‘action’]. Got None
required key not provided @ data[‘trigger’]. Got None’
Anyone could help me?
Regards,
Andrea