mirror of
https://github.com/adrianjagielak/home-assistant-futurehome.git
synced 2025-09-13 07:37:09 +00:00
Lint fixes
This commit is contained in:
parent
c56b9c6fbe
commit
986c85c0bf
@ -1,6 +1,6 @@
|
|||||||
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
|
# https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config
|
||||||
name: Futurehome
|
name: Futurehome
|
||||||
version: '0.1.10'
|
version: '0.1.14'
|
||||||
slug: futurehome
|
slug: futurehome
|
||||||
description: Local Futurehome Smarthub integration
|
description: Local Futurehome Smarthub integration
|
||||||
url: 'https://github.com/adrianjagielak/home-assistant-futurehome'
|
url: 'https://github.com/adrianjagielak/home-assistant-futurehome'
|
||||||
|
@ -29,6 +29,5 @@ export default defineConfig([
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
quotes: ['error', 'single'],
|
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
8
futurehome/package-lock.json
generated
8
futurehome/package-lock.json
generated
@ -16,7 +16,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.31.0",
|
"@eslint/js": "^9.31.0",
|
||||||
"@types/node": "^24.0.15",
|
"@types/node": "^24.1.0",
|
||||||
"@types/ws": "^8.18.1",
|
"@types/ws": "^8.18.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
||||||
"@typescript-eslint/parser": "^8.38.0",
|
"@typescript-eslint/parser": "^8.38.0",
|
||||||
@ -376,9 +376,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "24.0.15",
|
"version": "24.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.15.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz",
|
||||||
"integrity": "sha512-oaeTSbCef7U/z7rDeJA138xpG3NuKc64/rZ2qmUFkFJmnMsAPaluIifqyWd8hSSMxyP9oie3dLAqYPblag9KgA==",
|
"integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~7.8.0"
|
"undici-types": "~7.8.0"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.31.0",
|
"@eslint/js": "^9.31.0",
|
||||||
"@types/node": "^24.0.15",
|
"@types/node": "^24.1.0",
|
||||||
"@types/ws": "^8.18.1",
|
"@types/ws": "^8.18.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
||||||
"@typescript-eslint/parser": "^8.38.0",
|
"@typescript-eslint/parser": "^8.38.0",
|
||||||
|
@ -183,6 +183,7 @@ export function exposeSmarthubTools(parameters: {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
log.error('Failed trying to start inclusion', e);
|
||||||
ha?.publish(
|
ha?.publish(
|
||||||
`${topicPrefix}/inclusion_exclusion_status/state`,
|
`${topicPrefix}/inclusion_exclusion_status/state`,
|
||||||
'Failed trying to start inclusion.',
|
'Failed trying to start inclusion.',
|
||||||
@ -254,9 +255,10 @@ export function exposeSmarthubTools(parameters: {
|
|||||||
qos: 2,
|
qos: 2,
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
log.error('Failed trying to stop inclusion/exclusion', e);
|
||||||
ha?.publish(
|
ha?.publish(
|
||||||
`${topicPrefix}/inclusion_exclusion_status/state`,
|
`${topicPrefix}/inclusion_exclusion_status/state`,
|
||||||
'Failed trying to stop inclusion.',
|
'Failed trying to stop inclusion/exclusion.',
|
||||||
{
|
{
|
||||||
retain: true,
|
retain: true,
|
||||||
qos: 2,
|
qos: 2,
|
||||||
@ -312,6 +314,7 @@ export function exposeSmarthubTools(parameters: {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
log.error('Failed trying to start exclusion', e);
|
||||||
ha?.publish(
|
ha?.publish(
|
||||||
`${topicPrefix}/inclusion_exclusion_status/state`,
|
`${topicPrefix}/inclusion_exclusion_status/state`,
|
||||||
'Failed trying to start exclusion.',
|
'Failed trying to start exclusion.',
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { sendFimpMsg } from '../fimp/fimp';
|
|
||||||
import { InclusionReport } from '../fimp/inclusion_report';
|
import { InclusionReport } from '../fimp/inclusion_report';
|
||||||
import {
|
import {
|
||||||
VinculumPd7Device,
|
VinculumPd7Device,
|
||||||
@ -36,7 +35,7 @@ import {
|
|||||||
loginToThingsplex,
|
loginToThingsplex,
|
||||||
} from '../thingsplex/thingsplex';
|
} from '../thingsplex/thingsplex';
|
||||||
import { abbreviateHaMqttKeys } from './abbreviate_ha_mqtt_keys';
|
import { abbreviateHaMqttKeys } from './abbreviate_ha_mqtt_keys';
|
||||||
import { ha, haCommandHandlers } from './globals';
|
import { ha } from './globals';
|
||||||
import { HaDeviceConfig } from './ha_device_config';
|
import { HaDeviceConfig } from './ha_device_config';
|
||||||
import { HaMqttComponent } from './mqtt_components/_component';
|
import { HaMqttComponent } from './mqtt_components/_component';
|
||||||
|
|
||||||
@ -50,10 +49,10 @@ export type CommandHandlers = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function ignoreService(
|
function ignoreService(
|
||||||
topicPrefix: string,
|
_topicPrefix: string,
|
||||||
device: VinculumPd7Device,
|
_device: VinculumPd7Device,
|
||||||
svc: VinculumPd7Service,
|
_svc: VinculumPd7Service,
|
||||||
svcName: string,
|
_svcName: string,
|
||||||
): ServiceComponentsCreationResult | undefined {
|
): ServiceComponentsCreationResult | undefined {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ import {
|
|||||||
CommandHandlers,
|
CommandHandlers,
|
||||||
ServiceComponentsCreationResult,
|
ServiceComponentsCreationResult,
|
||||||
} from '../ha/publish_device';
|
} from '../ha/publish_device';
|
||||||
|
import { log } from '../logger';
|
||||||
|
|
||||||
export function sound_switch__components(
|
export function sound_switch__components(
|
||||||
topicPrefix: string,
|
topicPrefix: string,
|
||||||
@ -90,6 +91,7 @@ export function sound_switch__components(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
log.error('sound_switch: Failed setting the siren', e);
|
||||||
// Fallback for simple ON/OFF commands
|
// Fallback for simple ON/OFF commands
|
||||||
if (payload === 'ON') {
|
if (payload === 'ON') {
|
||||||
await sendFimpMsg({
|
await sendFimpMsg({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user