IKEA E1766
| Model | E1766 | 
| Vendor | IKEA | 
| Description | TRADFRI open/close remote | 
| Exposes | battery, action, linkquality | 
| Picture |  | 
Notes
Deprecated click event
By default this device exposes a deprecated click event. It’s recommended to use the action event instead.
To disable the click event, set legacy: false for this device in configuration.yaml. Example:
devices:
  '0x12345678':
    friendly_name: my_device
    legacy: false
Pairing
Pair the switch to Zigbee2MQTT by pressing the pair button (found under the back cover next to the battery) 4 times in a row. The red light on the front side should flash a few times and then turn off (it’s more visible to see the light from the back). After a few seconds it turns back on and pulsate. When connected, the light turns off.
Actions
A close or open action is triggered when the corresponding button is pressed. 
If subsequently held down for > 0.5s, a stop action is triggered upon release.
Binding
The binding functionallity of this remote varies per firmware version:
- below 2.3.075: suppports binding to groups only. It can only be bound to 1 group at a time. By default this remote is bound to the default bind group which you first have to unbind it from. This can be done by sending to zigbee2mqtt/bridge/request/device/unbindpayload{"from": "DEVICE_FRIENDLY_NAME", "to": "default_bind_group"}. Wake up the device right before sending the commands by pressing a button on it.
- 2.3.075 and greater: supports binding to devices only
Starting OTA updates
Press the button on it right before hitting the update button in Z2MA, and again every second or two for about 5 seconds until upgrade begin.
OTA updates
This device supports OTA updates, for more information see OTA updates.
Options
How to use device type specific configuration
- legacy: Set to false to disable the legacy integration (highly recommended), will change structure of the published payload (default true). The value must be- trueor- false
Exposes
Battery (numeric)
Remaining battery in %, can take up to 24 hours before reported..
Value can be found in the published state on the battery property.
To read (/get) the value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/get with payload {"battery": ""}.
It’s not possible to write (/set) this value.
The minimal value is 0 and the maximum value is 100.
The unit of this value is %.
Action (enum)
Triggered action (e.g. a button click).
Value can be found in the published state on the action property.
It’s not possible to read (/get) or write (/set) this value.
The possible values are: close, open, stop.
Linkquality (numeric)
Link quality (signal strength).
Value can be found in the published state on the linkquality property.
It’s not possible to read (/get) or write (/set) this value.
The minimal value is 0 and the maximum value is 255.
The unit of this value is lqi.