localtuya:
- host: 192.168.1.xx
device_id: 你的device-id
local_key: 你的local-key
friendly_name: Tuya Device
protocol_version: "3.3"
entities:
- platform: binary_sensor
friendly_name: Plug Status
id: 1
device_class: power
state_on: "true" # Optional
state_off: "false" # Optional
- platform: switch
friendly_name: Plug
id: 1
current: 18 # Optional
current_consumption: 19 # Optional
voltage: 20 # Optional
是要配置yaml的,见官方文档:https://github.com/rospogrigio/localtuya/
我是参照他的,这是当前支持的设备:
The following Tuya device types are currently supported: - 1 and multiple gang switches
- Wi-Fi smart plugs (including those with additional USB plugs)
- Lights
- Covers
- Fans
- Climates (soon)
所以可能是你现在要添加的设备不支持吧。。。
|