Skip to content

Commit

Permalink
fix(linux): 🐛 correct screen lock state with new device class
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuar committed Sep 29, 2024
1 parent 8d5ebf2 commit f6811bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/linux/power/screenLock.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func newScreenlockSensor(value bool) sensor.Entity {
ID: "screen_lock",
Icon: screenLockIcon(value),
EntityType: types.BinarySensor,
Value: value,
Value: !value, // For device class BinarySensorDeviceClassLock: On means open (unlocked), Off means closed (locked).
Attributes: map[string]any{
"data_source": linux.DataSrcDbus,
},
Expand Down

0 comments on commit f6811bb

Please sign in to comment.