@@ -10,7 +10,6 @@ import io.homeassistant.companion.android.common.data.integration.friendlyState
1010import io.homeassistant.companion.android.common.data.integration.getIcon
1111import io.homeassistant.companion.android.common.data.integration.isActive
1212import io.homeassistant.companion.android.common.data.integration.isExecuting
13- import io.homeassistant.companion.android.common.data.integration.supportsAlarmControlPanelArmAway
1413
1514private const val CATEGORY_CONFIG = " config"
1615private const val CATEGORY_DIAGNOSTIC = " diagnostic"
@@ -34,13 +33,6 @@ enum class EntityCategory {
3433@Immutable
3534data class EntityCoordinates (val latitude : Double , val longitude : Double )
3635
37- /* * Display information specific to `alarm_control_panel` entities. */
38- @Immutable
39- data class AlarmDisplay (
40- /* * Whether the alarm panel can be armed without entering a code. */
41- val hasNoCode : Boolean ,
42- )
43-
4436/* *
4537 * Everything needed to display an entity, fully resolved from the entity state and the
4638 * registries: the single source of truth for entity displays, so anything a display needs
@@ -62,8 +54,6 @@ data class EntityDisplayItem(
6254 val isActive : Boolean = false ,
6355 /* * Geographic position of the entity, null when it has none. */
6456 val coordinates : EntityCoordinates ? = null ,
65- /* * Alarm panel display information, only set for `alarm_control_panel` entities. */
66- val alarm : AlarmDisplay ? = null ,
6757 val areaName : String? = null ,
6858 val floorName : String? = null ,
6959 val deviceName : String? = null ,
@@ -97,7 +87,6 @@ data class EntityDisplayItem(
9787 isExecuting = entity.isExecuting(),
9888 isActive = entity.isActive(),
9989 coordinates = entity.coordinates(),
100- alarm = entity.alarmDisplay(),
10190 areaName = areaName,
10291 floorName = floorName,
10392 deviceName = deviceName,
@@ -118,12 +107,6 @@ data class EntityDisplayItem(
118107 ?.joinToString(if (layoutDirection == LayoutDirection .Ltr ) " ▸ " else " ◂ " )
119108
120109 companion object {
121- private fun Entity.alarmDisplay (): AlarmDisplay ? {
122- if (domain != " alarm_control_panel" ) return null
123- return AlarmDisplay (
124- hasNoCode = attributes[" code_format" ] == null && supportsAlarmControlPanelArmAway(),
125- )
126- }
127110
128111 private fun Entity.coordinates (): EntityCoordinates ? {
129112 val latitude = (attributes[" latitude" ] as ? Number )?.toDouble()
0 commit comments