File tree Expand file tree Collapse file tree 3 files changed +0
-36
lines changed Expand file tree Collapse file tree 3 files changed +0
-36
lines changed Original file line number Diff line number Diff line change @@ -100,18 +100,6 @@ def feels_like_temperature
100
100
"#{ entity [ :state ] . to_i } °"
101
101
end
102
102
103
- def unavailable_door_sensors
104
- out = [ ]
105
-
106
- @config [ "home_assistant" ] [ "exterior_door_sensors" ] . each do |entity_id |
107
- if data . find { _1 [ :entity_id ] == entity_id } &.fetch ( :state ) == "unavailable"
108
- out << entity_id . split ( "." ) . last . gsub ( "_opening" , "" ) . humanize
109
- end
110
- end
111
-
112
- out . uniq
113
- end
114
-
115
103
def roborock_errors
116
104
out = [ ]
117
105
Original file line number Diff line number Diff line change @@ -27,10 +27,6 @@ def call(
27
27
out [ :status_icons_with_labels ] << [ problem [ :icon ] , problem [ :message ] ]
28
28
end
29
29
30
- home_assistant_api . unavailable_door_sensors . each do |door_sensor_name |
31
- out [ :status_icons_with_labels ] << [ "triangle-exclamation" , door_sensor_name ]
32
- end
33
-
34
30
home_assistant_api . unlocked_doors . each do |door_name |
35
31
out [ :status_icons_with_labels ] << [ "lock-open" , door_name ]
36
32
end
Original file line number Diff line number Diff line change @@ -133,26 +133,6 @@ def test_unlocked_doors
133
133
end
134
134
end
135
135
136
- def test_unavailable_door_sensors
137
- config = {
138
- "home_assistant" => {
139
- "exterior_door_sensors" => [ "alley_door_sensor" ]
140
- }
141
- }
142
-
143
- data = [
144
- {
145
- entity_id : "alley_door_sensor" ,
146
- state : "unavailable"
147
- }
148
- ]
149
-
150
- api = HomeAssistantApi . new ( config )
151
- api . stub :data , data do
152
- assert_equal ( api . unavailable_door_sensors , [ "Alley door sensor" ] )
153
- end
154
- end
155
-
156
136
def test_low_batteries
157
137
data = [
158
138
{
You can’t perform that action at this time.
0 commit comments