Skip to content

Commit 2eeb6a5

Browse files
author
Ted Roberts
committed
Improve send_raw_command UX and debug visibility
1 parent f76631a commit 2eeb6a5

5 files changed

Lines changed: 17 additions & 10 deletions

File tree

custom_components/novastar_h/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,13 @@ async def async_send_raw_command(call: ServiceCall) -> None:
199199
)
200200
return
201201

202+
_LOGGER.debug(
203+
"send_raw_command host=%s endpoint=%s effective_body=%s",
204+
resolved_host,
205+
endpoint,
206+
effective_body,
207+
)
208+
202209
result = await client_found.async_send_raw_command(endpoint, effective_body)
203210
if result is None:
204211
_LOGGER.warning("Raw command to %s failed", endpoint)

custom_components/novastar_h/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
}
2222
],
2323
"zeroconf": ["_novastar._tcp.local."],
24-
"version": "0.2.61"
24+
"version": "0.2.62"
2525
}

custom_components/novastar_h/services.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
send_raw_command:
22
name: Send Raw Command
3-
description: Send a raw API command to the Novastar processor (requires "Allow Raw Commands" option in configuration).
3+
description: Send a raw API command to the Novastar processor (requires "Allow Raw Commands" option in configuration). Host is optional when only one Novastar device is configured.
44
fields:
55
host:
66
name: Host
7-
description: The IP address of the Novastar processor to send the command to.
8-
required: true
7+
description: Optional IP address of the Novastar processor. Host is optional when only one Novastar device is configured.
8+
required: false
99
example: "192.168.1.100"
1010
selector:
1111
text:
1212
endpoint:
13-
name: Endpoint
14-
description: The API endpoint path (e.g., "device/readDetail", "screen/writeBrightness").
13+
name: Command
14+
description: The API command endpoint path (e.g., "device/readDetail", "screen/writeBrightness").
1515
required: true
1616
example: "device/readDetail"
1717
selector:

custom_components/novastar_h/strings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@
178178
"description": "The IP address of the Novastar processor."
179179
},
180180
"endpoint": {
181-
"name": "Endpoint",
182-
"description": "The API endpoint path (e.g., 'device/readDetail')."
181+
"name": "Command",
182+
"description": "The API command endpoint path (e.g., 'device/readDetail')."
183183
},
184184
"body": {
185185
"name": "Body",

custom_components/novastar_h/translations/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@
178178
"description": "The IP address of the Novastar processor."
179179
},
180180
"endpoint": {
181-
"name": "Endpoint",
182-
"description": "The API endpoint path (e.g., 'device/readDetail')."
181+
"name": "Command",
182+
"description": "The API command endpoint path (e.g., 'device/readDetail')."
183183
},
184184
"body": {
185185
"name": "Body",

0 commit comments

Comments
 (0)