|
发表于 2020-7-23 22:25:12
|
显示全部楼层
我用抓包app截取涂鸦app,但是开了截取,就不能退出登录了,一直提示网络错误
我在package文件夹添加yaml配置是这样如果像下面那样就会提示错误,删除platform: template下面的话就可以
但是获取不到数据
switch:
- platform: localtuya
host: 192.168.1.55
local_key: xxxxxxxxxxx
device_id: xxxxxxxxxx
protocol: 3.3
current: 4
current_consumption: 5
voltage: 6
switches:
some_switch1:
friendly_name: TUYA_SW01
id: 1
sensor:
- platform: template
sensors:
switch1_voltage:
friendly_name: "电压"
value_template: >-
{{ state_attr('switch.TUYA_SW01', 'voltage') |float / 10 }}
unit_of_measurement: 'V'
switch1_current:
friendly_name: "电流"
value_template: >-
{{ state_attr('switch.TUYA_SW01', 'current') |float / 100 }}
unit_of_measurement: 'A'
switch1_current_consumption:
friendly_name: "功率"
value_template: >-
{{ state_attr('switch.TUYA_SW01', 'current_consumption') |float / 10 }}
unit_of_measurement: 'W'
压缩包里面的这个localtuya文件夹没有用上的吗?
|
|