mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 01:58:20 +00:00
Bump datadogpy to 0.52.0 (#149596)
This commit is contained in:
parent
260ca70785
commit
25169e9075
@ -75,7 +75,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: DatadogConfigEntry) -> b
|
||||
prefix = options[CONF_PREFIX]
|
||||
sample_rate = options[CONF_RATE]
|
||||
|
||||
statsd_client = DogStatsd(host=host, port=port, namespace=prefix)
|
||||
statsd_client = DogStatsd(
|
||||
host=host, port=port, namespace=prefix, disable_telemetry=True
|
||||
)
|
||||
entry.runtime_data = statsd_client
|
||||
|
||||
initialize(statsd_host=host, statsd_port=port)
|
||||
|
@ -58,7 +58,6 @@ class DatadogConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
CONF_RATE: user_input[CONF_RATE],
|
||||
},
|
||||
)
|
||||
|
||||
return self.async_show_form(
|
||||
step_id="user",
|
||||
data_schema=vol.Schema(
|
||||
@ -107,7 +106,26 @@ class DatadogOptionsFlowHandler(OptionsFlow):
|
||||
options = self.config_entry.options
|
||||
|
||||
if user_input is None:
|
||||
user_input = {}
|
||||
return self.async_show_form(
|
||||
step_id="init",
|
||||
data_schema=vol.Schema(
|
||||
{
|
||||
vol.Required(
|
||||
CONF_PREFIX,
|
||||
default=options.get(
|
||||
CONF_PREFIX, data.get(CONF_PREFIX, DEFAULT_PREFIX)
|
||||
),
|
||||
): str,
|
||||
vol.Required(
|
||||
CONF_RATE,
|
||||
default=options.get(
|
||||
CONF_RATE, data.get(CONF_RATE, DEFAULT_RATE)
|
||||
),
|
||||
): int,
|
||||
}
|
||||
),
|
||||
errors={},
|
||||
)
|
||||
|
||||
success = await validate_datadog_connection(
|
||||
self.hass,
|
||||
|
@ -4,7 +4,7 @@ DOMAIN = "datadog"
|
||||
|
||||
CONF_RATE = "rate"
|
||||
|
||||
DEFAULT_HOST = "localhost"
|
||||
DEFAULT_HOST = "127.0.0.1"
|
||||
DEFAULT_PORT = 8125
|
||||
DEFAULT_PREFIX = "hass"
|
||||
DEFAULT_RATE = 1
|
||||
|
@ -7,5 +7,5 @@
|
||||
"iot_class": "local_push",
|
||||
"loggers": ["datadog"],
|
||||
"quality_scale": "legacy",
|
||||
"requirements": ["datadog==0.15.0"]
|
||||
"requirements": ["datadog==0.52.0"]
|
||||
}
|
||||
|
2
requirements_all.txt
generated
2
requirements_all.txt
generated
@ -759,7 +759,7 @@ crownstone-sse==2.0.5
|
||||
crownstone-uart==2.1.0
|
||||
|
||||
# homeassistant.components.datadog
|
||||
datadog==0.15.0
|
||||
datadog==0.52.0
|
||||
|
||||
# homeassistant.components.metoffice
|
||||
datapoint==0.12.1
|
||||
|
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@ -662,7 +662,7 @@ crownstone-sse==2.0.5
|
||||
crownstone-uart==2.1.0
|
||||
|
||||
# homeassistant.components.datadog
|
||||
datadog==0.15.0
|
||||
datadog==0.52.0
|
||||
|
||||
# homeassistant.components.metoffice
|
||||
datapoint==0.12.1
|
||||
|
@ -46,7 +46,7 @@ async def test_datadog_setup_full(hass: HomeAssistant) -> None:
|
||||
|
||||
assert mock_dogstatsd.call_count == 1
|
||||
assert mock_dogstatsd.call_args == mock.call(
|
||||
host="host", port=123, namespace="foo"
|
||||
host="host", port=123, namespace="foo", disable_telemetry=True
|
||||
)
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ async def test_datadog_setup_defaults(hass: HomeAssistant) -> None:
|
||||
|
||||
assert mock_dogstatsd.call_count == 1
|
||||
assert mock_dogstatsd.call_args == mock.call(
|
||||
host="localhost", port=8125, namespace="hass"
|
||||
host="localhost", port=8125, namespace="hass", disable_telemetry=True
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user