mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Enable sentry reporting for zwave_js (#71719)
* Enable sentry reporting for zwave_js * Fix test
This commit is contained in:
parent
684fe242d9
commit
ca52aa47aa
@ -95,6 +95,7 @@ def get_value_of_zwave_value(value: ZwaveValue | None) -> Any | None:
|
|||||||
async def async_enable_statistics(client: ZwaveClient) -> None:
|
async def async_enable_statistics(client: ZwaveClient) -> None:
|
||||||
"""Enable statistics on the driver."""
|
"""Enable statistics on the driver."""
|
||||||
await client.driver.async_enable_statistics("Home Assistant", HA_VERSION)
|
await client.driver.async_enable_statistics("Home Assistant", HA_VERSION)
|
||||||
|
await client.driver.async_enable_error_reporting()
|
||||||
|
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
|
@ -3172,10 +3172,12 @@ async def test_data_collection(hass, client, integration, hass_ws_client):
|
|||||||
result = msg["result"]
|
result = msg["result"]
|
||||||
assert result is None
|
assert result is None
|
||||||
|
|
||||||
assert len(client.async_send_command.call_args_list) == 1
|
assert len(client.async_send_command.call_args_list) == 2
|
||||||
args = client.async_send_command.call_args[0][0]
|
args = client.async_send_command.call_args_list[0][0][0]
|
||||||
assert args["command"] == "driver.enable_statistics"
|
assert args["command"] == "driver.enable_statistics"
|
||||||
assert args["applicationName"] == "Home Assistant"
|
assert args["applicationName"] == "Home Assistant"
|
||||||
|
args = client.async_send_command.call_args_list[1][0][0]
|
||||||
|
assert args["command"] == "driver.enable_error_reporting"
|
||||||
assert entry.data[CONF_DATA_COLLECTION_OPTED_IN]
|
assert entry.data[CONF_DATA_COLLECTION_OPTED_IN]
|
||||||
|
|
||||||
client.async_send_command.reset_mock()
|
client.async_send_command.reset_mock()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user