Skip to content

Commit

Permalink
fix(binary-sensor): Handle async for attributes
Browse files Browse the repository at this point in the history
fix(sensor): Handle async for attributes

Fixes: #1079
  • Loading branch information
zachowj committed Sep 28, 2023
1 parent 0fc163d commit 240de61
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/common/controllers/SensorBaseController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export default abstract class SensorBase<
let attr: Record<string, any> = {};
try {
attr = await attributes.reduce(async (acc, cur) => {
acc = await acc;
// Change string to lower-case and remove unwanted characters
const property = slugify(cur.property, {
replacement: '_',
Expand Down

0 comments on commit 240de61

Please sign in to comment.