Skip to content

Commit ce09002

Browse files
committed
Fixed linting issues
1 parent 84e633f commit ce09002

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

public/config/default-display-config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ _states:
5252
# =========================================================
5353

5454
switch:
55-
labelTemplates:
55+
labelTemplates: []
5656
icon: mdi:toggle-switch-off
5757
states:
5858
on:
5959
icon: mdi:toggle-switch
6060

6161
light:
62-
labelTemplates:
62+
labelTemplates: []
6363
icon: mdi:lightbulb
6464
color: '#888888'
6565
feedbackLayout: '$B1'
@@ -77,7 +77,7 @@ light:
7777
color: '#ffd484'
7878

7979
input_boolean:
80-
labelTemplates:
80+
labelTemplates: []
8181
icon: mdi:toggle-switch-off
8282
states:
8383
on:
@@ -97,7 +97,7 @@ person:
9797
icon: mdi:account-arrow-right
9898

9999
binary_sensor:
100-
labelTemplates:
100+
labelTemplates: []
101101
icon: mdi:radiobox-blank
102102
states:
103103
on:
@@ -320,4 +320,4 @@ fan:
320320
icon: mdi:fan
321321
states:
322322
off:
323-
icon: mdi:fan-off
323+
icon: mdi:fan-off

src/plugin.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ await streamDeck.connect()
2626
// Reconnect to Home Assistant when the global settings are changed.
2727
await streamDeck.settings.getGlobalSettings<GlobalSettings>().then(async (settings) => {
2828
// Convert the old WebSocket URL format to the new format required by the Home Assistant library.
29-
if (settings.serverUrl && (settings.serverUrl.startsWith('wss://') || settings.serverUrl.startsWith('ws://'))) {
29+
if (
30+
settings.serverUrl &&
31+
(settings.serverUrl.startsWith('wss://') || settings.serverUrl.startsWith('ws://'))
32+
) {
3033
settings.serverUrl = settings.serverUrl
3134
.replace('ws://', 'http://')
3235
.replace('wss://', 'https://')
@@ -38,7 +41,9 @@ await streamDeck.settings.getGlobalSettings<GlobalSettings>().then(async (settin
3841
streamDeck.logger.info('Connecting to Home Assistant...')
3942
await homeAssistant.connect(settings.serverUrl, settings.accessToken)
4043
} else {
41-
streamDeck.logger.info('No Home Assistant server URL or access token set, not connecting to Home Assistant.')
44+
streamDeck.logger.info(
45+
'No Home Assistant server URL or access token set, not connecting to Home Assistant.'
46+
)
4247
}
4348
await entityConfigFactory.setDisplayConfigurationUrl(settings.displayConfiguration?.urlOverride)
4449
})

0 commit comments

Comments
 (0)