Skip to content

Commit

Permalink
Update DND sensor icon based on state (#4507)
Browse files Browse the repository at this point in the history
* Update DNDSensorManager.kt

Add dynamic icons to DND sensor

* Update to binary sensor like icon behavior

* Update common/src/main/java/io/homeassistant/companion/android/common/sensors/DNDSensorManager.kt

Co-authored-by: Daniel Shokouhi <dshokouhi@gmail.com>

* Remove icon variable

---------

Co-authored-by: Daniel Shokouhi <dshokouhi@gmail.com>
  • Loading branch information
mikosoft83 and dshokouhi authored Jul 17, 2024
1 parent 7dc7f50 commit 5cc5efa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class DNDSensorManager : SensorManager {
context,
dndSensor,
state,
dndSensor.statelessIcon,
if (state != "off") dndSensor.statelessIcon else "mdi:minus-circle-off",
mapOf(
"options" to listOf("alarms_only", "off", "priority_only", "total_silence")
)
Expand Down

0 comments on commit 5cc5efa

Please sign in to comment.