Skip to content

Commit

Permalink
Fix rotationPercent settings from entity config
Browse files Browse the repository at this point in the history
  • Loading branch information
HeavenFox committed Dec 11, 2024
1 parent ec0fe46 commit 228989b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/plugin/entityConfigFactoryNg.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@ export class EntityConfigFactory {
const iconString = this.resolve('icon', resolvers)
const colorString = this.resolve('color', resolvers)
const labelTemplates = this.resolve('labelTemplates', resolvers)
const rotationPercentString = this.resolve('rotationPercent', resolvers)

const feedbackLayout= this.render(feedbackLayoutString, stateObject)
const renderedFeedback = this.render(feedbackValueString, stateObject)
const feedback = feedbackValueString ? JSON.parse(renderedFeedback) : {}
const rotationPercent = rotationPercentString ? +this.render(rotationPercentString, stateObject) : undefined

const icon = this.render(iconString, stateObject)
const color = this.render(colorString, stateObject)
Expand All @@ -87,7 +89,8 @@ export class EntityConfigFactory {
feedback: feedback,
icon: icon,
color: color,
labelTemplates: labelTemplates
labelTemplates: labelTemplates,
rotationPercent
}
}

Expand Down

0 comments on commit 228989b

Please sign in to comment.