|
发表于 2024-2-6 20:17:31
|
显示全部楼层
rest:
- authentication: basic
scan_interval: 60
resource: https://apih5.xohaa.net/api/v3/devices/find-by-deviceId?deviceId=自己抓包
method: GET
headers:
Host: apih5.xohaa.net
Origin: https://m.xohaa.net
x-auth-token: 自己微信抓包
x-requested-from: apiHttpRequest
Connection: keep-alive
Accept: application/json, text/plain, */*
apiRequest: true
User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 15_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.16(0x1800102c) NetType/WIFI Language/zh_CN
Referer: https://m.xohaa.net/
Accept-Language: zh-CN,zh-Hans;q=0.9
Accept-Encoding: gzip, deflate, br
sensor:
- name: "WaterMonitor"
json_attributes_path: "$.data.iotDevice"
value_template: "OK"
json_attributes:
- "inWaterTds"
- "outWaterTds"
- "outWaterTotalFlow"
- "outWaterTodayFlow"
sensor:
- platform: template
sensors:
inwatertds:
friendly_name: inWaterTds
value_template: '{{ states.sensor.watermonitor.attributes.inWaterTds }}'
unit_of_measurement: "PPM"
outwatertds:
friendly_name: outWaterTds
value_template: '{{ states.sensor.watermonitor.attributes.outWaterTds }}'
unit_of_measurement: "PPM"
outatertotalflow:
friendly_name: outWaterTds
value_template: '{{ (states.sensor.watermonitor.attributes.outWaterTotalFlow / 1000) |round(2) }}'
unit_of_measurement: "L"
outwatertodayflow:
friendly_name: outWaterTds
value_template: '{{ (states.sensor.watermonitor.attributes.outWaterTodayFlow / 1000) |round(2) }}'
unit_of_measurement: "L"
homeassistant:
customize:
sensor.inwatertds:
friendly_name: 原水TDS
sensor.outwatertds:
friendly_name: 净水TDS
sensor.outatertotalflow:
friendly_name: 纯水总出水量
sensor.outwatertodayflow:
friendly_name: 纯水今日出水量 |
|