From cdc7c2c4dd4f6cd62dc5c31df39a95d4f3be3d81 Mon Sep 17 00:00:00 2001 From: mileperhour <45832940+mileperhour@users.noreply.github.com> Date: Tue, 2 Apr 2019 18:26:51 +0200 Subject: [PATCH] Update README.md --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 970659f..25b096e 100644 --- a/README.md +++ b/README.md @@ -41,22 +41,23 @@ Local handling for Tuya Devices under Home-Assistant and Hassio, getting paramet sensor: - platform: template sensors: - device_voltage: + tuya-sw01_voltage: value_template: >- - {{ states.switch.TUYA_SW01.attributes.voltage }} + {{ states.switch.tuya-sw01.attributes.voltage }} unit_of_measurement: 'V' - device_current: + tuya-sw01_current: acs_voltage: >- - {{ states.switch.TUYA_SW01.attributes.current }} + {{ states.switch.tuya-sw01.attributes.current }} unit_of_measurement: 'mA' - device_current_consumption: + tuya-sw01_current_consumption: value_template: >- - {{ states.switch.TUYA_SW01.attributes.current_consumption }} + {{ states.switch.tuya-sw01.attributes.current_consumption }} unit_of_measurement: 'W' ``` 6. If all gone OK (your device's parameters local_key and device_id are correct), your switch is working, so the sensors are working too. NOTE: You can do as changes as you want in scripts ant/or yaml files. But: You can't declare your "custom_component" as "tuya", tuya is a forbidden word from 0.88 version or so. So if you declare a switch.tuya, the embedded (cloud based) Tuya component will be load instead custom_component one. + NOTE2: tuya-sw01, TUYA-SW01, is the name (friendly name), so you can name it as you want, regarding to change this word every where it appears. # Thanks to: sean6541, for the working (standard) Python Handler for Tuya devices.