[
{
"id": "facba989297a7ad7",
"type": "inject",
"z": "40338f2c11e8254b",
"name": "",
"props": [],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 550,
"y": 2300,
"wires": [
[
"db200ed5a0bb4203"
]
]
},
{
"id": "f5f1e3d0787e7e6c",
"type": "debug",
"z": "40338f2c11e8254b",
"name": "debug 80",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1200,
"y": 2300,
"wires": []
},
{
"id": "db200ed5a0bb4203",
"type": "api-current-state",
"z": "40338f2c11e8254b",
"name": "play_control",
"server": "a98d657cf9377f5c",
"version": 3,
"outputs": 1,
"halt_if": "",
"halt_if_type": "str",
"halt_if_compare": "is",
"entity_id": "media_player.xiaomi_l09b_3716_play_control",
"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",
"override_topic": false,
"state_location": "payload",
"override_payload": "msg",
"entity_location": "data",
"override_data": "msg",
"x": 690,
"y": 2300,
"wires": [
[
"0395b50ed7bc6f21"
]
]
},
{
"id": "8f22f20a929380f4",
"type": "switch",
"z": "40338f2c11e8254b",
"name": "判断",
"property": "data.attributes.volume_level",
"propertyType": "msg",
"rules": [
{
"t": "eq",
"v": "0.36",
"vt": "num"
},
{
"t": "lt",
"v": "0.36",
"vt": "num"
},
{
"t": "gt",
"v": "0.36",
"vt": "num"
}
],
"checkall": "true",
"repair": false,
"outputs": 3,
"x": 1030,
"y": 2300,
"wires": [
[
"f5f1e3d0787e7e6c"
],
[],
[]
]
},
{
"id": "0395b50ed7bc6f21",
"type": "function",
"z": "40338f2c11e8254b",
"name": "提取volume_level",
"func": "msg.payload = msg.data.attributes.volume_level\nreturn msg;",
"outputs": 1,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 870,
"y": 2300,
"wires": [
[
"8f22f20a929380f4"
]
]
},
{
"id": "a98d657cf9377f5c",
"type": "server",
"name": "Home Assistant",
"version": 5,
"addon": false,
"rejectUnauthorizedCerts": true,
"ha_boolean": "y|yes|true|on|home|open",
"connectionDelay": false,
"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
}
]