Bonjour,
il faut utiliser une fonction et le service send_photo de telegram.
je te donne le flow qui fonctionne bien, a toi de changer l’entitée caméra :
[{"id":"02cfc8d39d27b4e4","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"24a6e02763fc909d","type":"server-state-changed","z":"02cfc8d39d27b4e4","name":"Camera 01 Motion","server":"2c5088ebae4d463e","version":4,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"binary_sensor.camera_01_cell_motion_detection","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":"0","forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":190,"y":140,"wires":[["7dd5f71775cfdced"],[]]},{"id":"7dd5f71775cfdced","type":"api-current-state","z":"02cfc8d39d27b4e4","name":"Armed away?","server":"2c5088ebae4d463e","version":3,"outputs":2,"halt_if":"armed_away","halt_if_type":"str","halt_if_compare":"is","entity_id":"alarm_control_panel.alarmo","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":0,"forType":"num","forUnits":"minutes","x":440,"y":140,"wires":[["4792c2346dfcbc18"],[]]},{"id":"4792c2346dfcbc18","type":"api-call-service","z":"02cfc8d39d27b4e4","name":"Snapshot Cam01","server":"2c5088ebae4d463e","version":5,"debugenabled":false,"domain":"camera","service":"snapshot","areaId":[],"deviceId":["6c139e0f85a17fd981b3581ef9500122"],"entityId":["camera.camera_01"],"data":"{\t \"filename\": \"/config/www/cam01_snapshot.jpg\"\t}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":690,"y":140,"wires":[["a22c85f9542552f0"]]},{"id":"a22c85f9542552f0","type":"function","z":"02cfc8d39d27b4e4","name":"Msg Cam01","func":"msg.filename = '/config/www/cam01_snapshot.jpg';\nmsg.payload = { \n data: {\n type: 'photo',\n file: '/config/www/cam01_snapshot.jpg',\n caption: 'Snapshot from camera.' }\n};\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":930,"y":140,"wires":[["3d65b0edf8628b7d"]]},{"id":"3d65b0edf8628b7d","type":"api-call-service","z":"02cfc8d39d27b4e4","name":"Envoi Telegram","server":"2c5088ebae4d463e","version":5,"debugenabled":false,"domain":"telegram_bot","service":"send_photo","areaId":[],"deviceId":[],"entityId":[],"data":"","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","output_location":"","output_location_type":"none","x":1160,"y":140,"wires":[[]]},{"id":"2c5088ebae4d463e","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":"30","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true}]
cela donne ça :
de mon coté, je joue aussi sur le boolean de detection de la caméra dans un autre flow afin d’envoyer quand même une notif si par exemple l’alarme est bien désactivée mais que tu veux quand même recevoir tes snap, ou l’inverse, pour une raison X ta caméra fait des faux positif et t’envoi plein de snap, tu peux positionner un boolean pour empecher l’envoi des snap sans pour autant désactiver la caméra.