Skip to content

Commit

Permalink
Change default idle attribute to false
Browse files Browse the repository at this point in the history
Right now when the companion app is started, the status sensor will have the
`idle` attribute set to `unknown` until the computer has been put in suspend
or is shut down. I'm suggesting that we change the default value to `false`
instead, because unless I'm mistaken, it should be safe to assume that the
computer is _not_ idle when the companion app starts. Having only two valid
states of the `idle` attribute simplifies using it in e.g. automations.
  • Loading branch information
slovdahl committed Feb 19, 2024
1 parent ab80b59 commit 3df8c11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion halinuxcompanion/sensors/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Status.icon = "mdi:cpu-64-bit"

Status.state = True
Status.attributes = {"reason": "power_on", "idle": "unknown"}
Status.attributes = {"reason": "power_on", "idle": "false"}

IDLE = {True: {"idle": "true"}, False: {"idle": "false"}}
SLEEP = {True: {"reason": "sleep"}, False: {"reason": "wake"}}
Expand Down

0 comments on commit 3df8c11

Please sign in to comment.