6
24
210
中级会员
使用道具 举报
4
174
1383
金牌会员
7
352
3417
论坛元老
114
1090
论坛DIY达人
rest_command: shuffle_on: url: "http://YOUR_ITUNES-API_SERVER_IP:8181/shuffle" method: put content_type: "application/x-www-form-urlencoded" payload: "mode=songs" shuffle_off: url: "http://YOUR_ITUNES-API_SERVER_IP:8181/shuffle" method: put content_type: "application/x-www-form-urlencoded" payload: "mode=off"
查看全部评分
yuyuye 发表于 2022-11-8 16:32 可以用command line switch集成配合curl命令 https://www.home-assistant.io/integrations/switch.command_ ...
{"response":[{"index":0,"status":1}],"led":1,"def_st":2,"result":0}
command_state: 'curl -X GET "my_url"' value_template: '{{ status == "1" }}'
dianxin11 发表于 2022-11-8 18:41 https://www.home-assistant.io/integrations/rest_command/
d1178775534 发表于 2022-11-9 00:52 dalao你好,这个能实现开关,请问状态怎么监测呢
switch: - platform: rest resource: http://IP_ADDRESS/led_endpoint body_on: '{"active": "true"}' body_off: '{"active": "false"}' is_on_template: "{{ value_json.is_active }}" headers: Content-Type: application/json X-Custom-Header: '{{ states("input_text.the_custom_header") }}' verify_ssl: true
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|Hassbian
GMT+8, 2025-3-19 14:11 , Processed in 0.093540 second(s), 30 queries .
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.