Follow Community -> SETTINGS
to add custom repository to HACS
Fill first field with the url of this repo (https://github.com/AlexOwl/YandexSwitch) and select Integration
category
First of all, you need to get the localKey and devId of your switch
There are a lot of ways to pull it, but here is the easiest way:
- You must have the android device, because we need to install old version of the tuya app and you can't install old version on ios, so find the android device or use emulator
- Download Smart Life v.3.4.1 and install it on your android device
- Register/Login to your Tuya account and add Yandex Switch as the normal Tuya Wi-Fi switch
- Connect your android device and laptop/pc to the same router
- If you don't have installed NodeJS, download it and install
- Open cmd/Terminal and install tuyapi/cli package using the following command:
npm i @tuyapi/cli -g
- Type
tuya-cli list-app
command and follow the instructions
P.S.
- Instead of scanning qr-code you can type open
http://ip-of-your-laptop:8002/ca.pem
- Use parameter
--ip
if the wrong ip was chosen bytuya-cli
- Use retrieved
id
parameter asdevice_id
andkey
aslocal_key
switch:
- platform: yandex_switch
name: Bedside Lamp
icon: mdi:lamp
host: 192.168.0.5
local_key: aaaaaaaaaaaaaaaa
device_id: bbbbbbbbbbbbbbbbbbbbbb
The local ip of your switch
The localKey parameter of your switch
The devId parameter of your switch
The name that will be displayed in the home assistant
The icon that will be displayed in the home assistant
The interval in seconds to force pull update from the switch
The custom schema to be used instead of the yandex switch schema
Use it, if you want to change the name of the attribute or you have the Tuya switch that has the same protocol, but other dps
The switch attribute must have switch
in the code
parameter like "code":"switch_2"
The custom switch id (dps) to use instead of the found one in the schema (you can name switch attribute as you want)
Released under MIT license