@@ -72,16 +72,16 @@ export default {
7272 let direct, equipment, allPoints, points
7373 switch (this .type ) {
7474 case ' battery' :
75- direct = findPoints (this .element .properties , ' Point_Status_LowBattery ' , true )
75+ direct = findPoints (this .element .properties , ' Point ' , true , ' Property_LowBattery ' )
7676 if (direct .length ) return direct
77- return findPoints (allEquipmentPoints (this .element .equipment ), ' Point_Status_LowBattery ' , true )
77+ return findPoints (allEquipmentPoints (this .element .equipment ), ' Point ' , true , ' Property_LowBattery ' )
7878 case ' lights' :
79- return [... this .queryLightPoints , ... this .queryLightEquipment (' Equipment_Lightbulb ' ), ... this . queryLightEquipment ( ' Equipment_LightStripe ' )]
79+ return [... this .queryLightPoints , ... this .queryLightEquipment (' Equipment_LightSource ' )]
8080 case ' windows' :
8181 equipment = findEquipment (this .element .equipment , ' Equipment_Window' , false )
8282 if (! equipment .length ) return []
8383 allPoints = allEquipmentPoints (equipment)
84- points = findPoints (allPoints, ' Point_Status_OpenState ' , false )
84+ points = findPoints (allPoints, ' Point ' , true , ' Property_Opening ' )
8585 if (points .length ) return points
8686 return equipment .filter ((e ) => e .points .length === 0 ).map ((e ) => e .item )
8787 case ' doors' :
@@ -95,36 +95,38 @@ export default {
9595 ]
9696 if (! equipment .length ) return []
9797 allPoints = allEquipmentPoints (equipment)
98- points = findPoints (allPoints, ' Point_Status_OpenState ' , false )
98+ points = findPoints (allPoints, ' Point ' , true , ' Property_Opening ' )
9999 if (points .length ) return points
100100 return equipment .filter ((e ) => e .points .length === 0 ).map ((e ) => e .item )
101101 case ' garagedoors' :
102102 equipment = findEquipment (this .element .equipment , ' Equipment_Door_GarageDoor' , false )
103103 if (! equipment .length ) return []
104104 allPoints = allEquipmentPoints (equipment)
105- points = findPoints (allPoints, ' Point_Status_OpenState ' , false )
105+ points = findPoints (allPoints, ' Point ' , true , ' Property_Opening ' )
106106 if (points .length ) return points
107107 return equipment .filter ((e ) => e .points .length === 0 ).map ((e ) => e .item )
108108 case ' blinds' :
109- equipment = findEquipment (this .element .equipment , ' Equipment_Blinds ' , false )
109+ equipment = findEquipment (this .element .equipment , ' Equipment_WindowCovering ' , true )
110110 if (! equipment .length ) return []
111111 allPoints = allEquipmentPoints (equipment)
112- points = findPoints (allPoints, ' Point_Status_OpenState ' , false )
112+ points = findPoints (allPoints, ' Point ' , true , ' Property_Opening ' )
113113 if (points .length ) return points
114114 return equipment .filter ((e ) => e .points .length === 0 ).map ((e ) => e .item )
115115 case ' presence' :
116- direct = findPoints (this .element .properties , ' Point_Status' , false , ' Property_Presence' )
116+ direct = [
117+ ... findPoints (this .element .properties , ' Point' , true , ' Property_Presence' ),
118+ ... findPoints (this .element .properties , ' Point' , true , ' Property_Motion' )
119+ ]
117120 if (direct .length ) return direct
118- return findPoints (allEquipmentPoints (this .element .equipment ), ' Point_Status' , true , ' Property_Presence' )
121+ return [
122+ ... findPoints (allEquipmentPoints (this .element .equipment ), ' Point' , true , ' Property_Presence' ),
123+ ... findPoints (allEquipmentPoints (this .element .equipment ), ' Point' , true , ' Property_Motion' )
124+ ]
119125 case ' lock' :
120126 equipment = findEquipment (this .element .equipment , ' Equipment_Lock' , false )
121127 if (! equipment .length ) return []
122128 allPoints = allEquipmentPoints (equipment)
123- points = [
124- ... findPoints (allPoints, ' Point_Status_OpenState' , false ),
125- ... findPoints (allPoints, ' Point_Status' , false ),
126- ... findPoints (allPoints, ' Point_Control' , true )
127- ]
129+ points = findPoints (allPoints, ' Point' , true , ' Property_Opening' )
128130 if (points .length ) return points
129131 return equipment .filter ((e ) => e .points .length === 0 ).map ((e ) => e .item )
130132 case ' climate' :
@@ -138,7 +140,10 @@ export default {
138140 if (points .length ) return points
139141 return equipment .filter ((e ) => e .points .length === 0 ).map ((e ) => e .item )
140142 case ' screens' :
141- equipment = findEquipment (this .element .equipment , ' Equipment_Screen' , true )
143+ equipment = [
144+ ... findEquipment (this .element .equipment , ' Equipment_AudioVisual_Display' , true ),
145+ ... findEquipment (this .element .equipment , ' Equipment_AudioVisual_Screen' , true )
146+ ]
142147 if (! equipment .length ) return []
143148 allPoints = allEquipmentPoints (equipment)
144149 points = [
@@ -149,9 +154,10 @@ export default {
149154 return equipment .filter ((e ) => e .points .length === 0 ).map ((e ) => e .item )
150155 case ' speakers' :
151156 equipment = [
152- ... findEquipment (this .element .equipment , ' Equipment_Receiver' , false ),
153- ... findEquipment (this .element .equipment , ' Equipment_Speaker' , false ),
154- ... findEquipment (this .element .equipment , ' Equipment_VoiceAssistant' , false )
157+ ... findEquipment (this .element .equipment , ' Equipment_AudioVisual_Receiver' , false ),
158+ ... findEquipment (this .element .equipment , ' Equipment_AudioVisual_Speaker' , false ),
159+ ... findEquipment (this .element .equipment , ' Equipment_VoiceAssistant' , false ),
160+ ... findEquipment (this .element .equipment , ' Equipment_AudioVisual_MediaPlayer' , false )
155161 ]
156162 if (! equipment .length ) return []
157163 allPoints = allEquipmentPoints (equipment)
@@ -162,7 +168,7 @@ export default {
162168 if (points .length ) return points
163169 return equipment .filter ((e ) => e .points .length === 0 ).map ((e ) => e .item )
164170 case ' projectors' :
165- equipment = findEquipment (this .element .equipment , ' Equipment_Projector ' , false )
171+ equipment = findEquipment (this .element .equipment , ' Equipment_AudioVisual_Display_Projector ' , false )
166172 if (! equipment .length ) return []
167173 allPoints = allEquipmentPoints (equipment)
168174 points = [
@@ -201,9 +207,9 @@ export default {
201207 }
202208 },
203209 queryLightPoints () {
204- let direct = findPoints (this .element .properties , ' Point_Control ' , true , ' Property_Light' )
210+ let direct = findPoints (this .element .properties , ' Point ' , true , ' Property_Light' )
205211 if (direct .length ) return direct
206- return findPoints (allEquipmentPoints (this .element .equipment ), ' Point_Control ' , true , ' Property_Light' )
212+ return findPoints (allEquipmentPoints (this .element .equipment ), ' Point ' , true , ' Property_Light' )
207213 }
208214 },
209215 methods: {
@@ -217,10 +223,10 @@ export default {
217223 return this .exprAst
218224 },
219225 queryLightEquipment (equipmentType ) {
220- let equipment = findEquipment (this .element .equipment , equipmentType, false )
226+ let equipment = findEquipment (this .element .equipment , equipmentType, true )
221227 if (! equipment .length ) return []
222228 let allPoints = allEquipmentPoints (equipment)
223- let points = findPoints (allPoints, ' Point_Status_Light ' , false )
229+ let points = findPoints (allPoints, ' Point ' , true , ' Property_Light ' )
224230 if (points .length ) return points
225231 return equipment .filter ((e ) => e .points .length === 0 ).map ((e ) => e .item )
226232 }
0 commit comments