Skip to content

Commit

Permalink
fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierZal committed Apr 20, 2024
1 parent b7df374 commit 9f95d86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
1 change: 1 addition & 0 deletions ariston/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export enum WheType {
lydos = 3,
nuos = 4,
}

Expand Down
11 changes: 3 additions & 8 deletions drivers/nuos/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,9 @@ export = class NuosDriver extends Driver {

async #discoverDevices(): Promise<DeviceDetails[]> {
try {
return (
(await this.#aristonAPI.plants()).data
/* eslint-disable-next-line
@typescript-eslint/no-unnecessary-condition
*/
.filter(({ wheType }) => wheType === this.#deviceType)
.map(({ gw, name }) => ({ data: { id: gw }, name }))
)
return (await this.#aristonAPI.plants()).data
.filter(({ wheType }) => wheType === this.#deviceType)
.map(({ gw, name }) => ({ data: { id: gw }, name }))
} catch (error) {
return []
}
Expand Down

0 comments on commit 9f95d86

Please sign in to comment.