diff --git a/.vscode/settings.json b/.vscode/settings.json index 54dbf9d22..9797380a3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -33,7 +33,8 @@ "linux/cpu", "linux/system", "linux/mem", - "BREAKING_CHANGES" + "BREAKING_CHANGES", + "linux/power" ], "go.testFlags": ["-v"], "[markdown]": { diff --git a/internal/linux/power/powerState.go b/internal/linux/power/powerState.go index af4a4f1e5..9eda3287c 100644 --- a/internal/linux/power/powerState.go +++ b/internal/linux/power/powerState.go @@ -42,6 +42,9 @@ func newPowerState(name powerSignal, value any) sensor.Entity { Attributes: map[string]any{ "data_source": linux.DataSrcDbus, }, + RequestMetadata: sensor.RequestMetadata{ + RetryRequest: true, + }, }, } } diff --git a/internal/linux/power/screenLock.go b/internal/linux/power/screenLock.go index ee85efef8..9b6a9e7dc 100644 --- a/internal/linux/power/screenLock.go +++ b/internal/linux/power/screenLock.go @@ -37,6 +37,9 @@ func newScreenlockSensor(value bool) sensor.Entity { Attributes: map[string]any{ "data_source": linux.DataSrcDbus, }, + RequestMetadata: sensor.RequestMetadata{ + RetryRequest: true, + }, }, } }