MCP

Specifications

34% Complete
8/23 fields · click for tiers
Priority 1 (Core)62%
Priority 2 (Smart Specs)25%
Priority 3 (Extended)14%
BrandBrilex
Manufacturer—
Model Number—
Also Known As—
ASINB07YWBHMY5
Price—
Official Site—
Dimensions—
Weight—
Color / Material— / —
Cloud Control—
Local ControlYes
Hardware Requirements—
Requirement Notes—
Release / Discontinued— / Active
Connectivity
Power Types—
USB Type—
Battery—
Sensors—
Voice Assistants—
Compatible Apps—
Compatible Services
Sourceblakadder_templates

Description

## Scripting

To use the script, you have to compile Tasmota with [Scripting](https://tasmota.github.io/docs/Scripting-Language) enabled. [Download](https://github.com/tasmota/install/tree/main/firmware/unofficial) unofficial precompiled firmware from development branch.

{% raw %}
```haskell
>D
color=""
col1=""
led=0
mled=0
p:red=0
p:green=0
p:blue=0

>E
mled=TuyaReceived#DpType4Id6
led=TuyaReceived#DpType1Id5
if chg[led]>0 {
=>TuyaSend1 5,%0led%
=>publish stat/%topic%/RESULT {"Script":">led=%0led%"}
}
if chg[mled]>0 {
=>TuyaSend4 6,%0mled%
=>publish stat/%topic%/RESULT {"Script":">cycle=%0mled%"}
}

>F
color=hn(red)+hn(green)+hn(blue)
if color!=col1 {
col1=color
mled=0
led=1
=>TuyaSend3 8,%color%64646464
=>publish stat/%topic%/RESULT
{"Script":">color=%color%"}
=>publish stat/%topic%/RESULT {"Script":">red=%0red%"}
=>publish stat/%topic%/RESULT {"Script":">green=%0green%"}
=>publish stat/%topic%/RESULT {"Script":">blue=%0blue%"}
}

>W
sl(0 255 red "0" "Red" "255")
sl(0 255 green "0

Additional Attributes

Device TypeAroma Diffuser
Electrical Standardeu

Gallery

Related Hardware

Browse Catalog
Compare