notes
pour allumer de façon programmatique
- creer un token : profile de kriko
tout en bas.
- pour allumer / eteindre
curl -X POST -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiO................A3MTU2MTQxfQ.aZNcyu7sSl8a4PdR-tS951c23TKnvzJPhk-cYUNQ4ao" -H "Content-Type: application/json" -d '{"entity_id": "switch.sonoff_zbminil2_switch"}' https://filmins.flemzouille.com/api/services/switch/turn_on
[ voir le token sans zim ou en refaire un ]
renvoie
[{"entity_id":"switch.salon_switch_2","state":"off","attributes":{"icon":"mdi:ceiling-light-outline","friendly_name":"Interrupteur salon"},"last_changed":"2023-08-11T23:52:47.489768+00:00","last_updated":"2023-08-11T23:52:47.489768+00:00","context":{"id":"01H7KG8M56YDEJ93QWTXPZEEYS","parent_id":null,"user_id":"69375059258543e0ad798ead19f3232b"}}]%
si renvoie []% c'est qu'il y a un problème
No comments:
Post a Comment