Skip to content

Commit

Permalink
Added detection of value.direction
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Jan 14, 2025
1 parent 6a9217f commit 7dab29a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/TypePatterns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,13 @@ const SharedPatterns: {
defaultRole: 'indicator.direction',
},
direction_enum: {
role: /^(indicator|level)\.direction$/, // some old adapters implement `indicator.direction` even for number types. So try to detect it too
role: /^(indicator|value)\.direction$/, // some old adapters implement `indicator.direction` even for number types. So try to detect it too
type: StateType.Number,
notSingle: true,
name: 'DIRECTION',
required: false,
defaultRole: 'level.direction',
defaultStates: { 0: 'None', 1: 'Up/Open', 2: 'Down/Close', 3: 'Unknown' },
defaultRole: 'value.direction',
},
reachable: {
role: /^indicator\.reachable$/,
Expand Down

0 comments on commit 7dab29a

Please sign in to comment.