Skip to content

Commit

Permalink
Add "on" state to ikea_power_on_behavior (#1907)
Browse files Browse the repository at this point in the history
Noticed this comment Koenkk/zigbee2mqtt#5213 (comment) and decided to give it a shot :)
  • Loading branch information
Kryzek authored Dec 14, 2020
1 parent 8367871 commit 4029444
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions converters/toZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ const converters = {
ikea_power_on_behavior: {
key: ['power_on_behavior'],
convertSet: async (entity, key, value, meta) => {
// ZCL spec also has on: 1 and toggle: 2 but this is not supported
const lookup = {'off': 0, 'previous': 255};
// ZCL spec also has toggle: 2 but this is not supported
const lookup = {'off': 0, 'on': 1, 'previous': 255};
if (!lookup.hasOwnProperty(value)) {
throw new Error(`'${value}' not supported, choose between: ${Object.keys(lookup)}`);
}
Expand Down

0 comments on commit 4029444

Please sign in to comment.