# Decoder for Christmas Tree Lights Remote
# FCC ID: 2APJZ-CW002
#
# Reference:
# https://fccid.io/2APJZ-CW002
# https://github.com/merbanan/rtl_433/issues/2247
#
# Remote has three buttons that provide functions:
# - Brightness down
# - Brightness up
# - Change light display mode
#
# 32 bits are sent. The first 20 bit are fixed, assumed to be the ID.
# The last 12 bit change depending on which of the 3 buttons are pressed, defined as the action.

decoder {
    name        = Xmas-Tree-Remote-2APJZ-CW002,
    modulation  = OOK_PWM,
    short       = 1000,
    long        = 2000,
    gap         = 0,
    reset       = 3000,
    bits        = 32,
    get         = id:@0:{20},
    get         = action:@20:{12},
}