|
发表于 2021-1-10 00:18:22
|
显示全部楼层
楼主:
打扰了。我使用的涂鸦的智能插座。抓包能抓到
但是在界面上显示的:
这个是yaml文件。不知道哪里出了问题。麻烦指点一下
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
switch:
- platform: localtuya
host: 112.10.64.145
local_key: 700abbb159fa093f
device_id: 01200380600194623a79
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'
|
|