|
9 | 9 | }), |
10 | 10 | ]) |
11 | 11 | # --- |
| 12 | +# name: test_webhook_update[vehicle_state-vw_id_4][binary_sensor.vw_id_4_charging_cable_plugged_in] |
| 13 | + StateSnapshot({ |
| 14 | + 'attributes': ReadOnlyDict({ |
| 15 | + 'device_class': 'plug', |
| 16 | + 'friendly_name': 'VW ID.4 Charging Cable Plugged In', |
| 17 | + }), |
| 18 | + 'context': <ANY>, |
| 19 | + 'entity_id': 'binary_sensor.vw_id_4_charging_cable_plugged_in', |
| 20 | + 'last_changed': <ANY>, |
| 21 | + 'last_reported': <ANY>, |
| 22 | + 'last_updated': <ANY>, |
| 23 | + 'state': 'unavailable', |
| 24 | + }) |
| 25 | +# --- |
| 26 | +# name: test_webhook_update[vehicle_state-vw_id_4][device_tracker.vw_id_4_location] |
| 27 | + StateSnapshot({ |
| 28 | + 'attributes': ReadOnlyDict({ |
| 29 | + 'age': '2025-12-08T20:54:12+00:00', |
| 30 | + 'fetched_at': '2025-12-08T21:34:15.488000+00:00', |
| 31 | + 'friendly_name': 'VW ID.4 Location', |
| 32 | + 'gps_accuracy': 0, |
| 33 | + 'icon': 'mdi:car', |
| 34 | + 'latitude': 52.238523055555554, |
| 35 | + 'longitude': 0.15465555555555555, |
| 36 | + 'source_type': <SourceType.GPS: 'gps'>, |
| 37 | + }), |
| 38 | + 'context': <ANY>, |
| 39 | + 'entity_id': 'device_tracker.vw_id_4_location', |
| 40 | + 'last_changed': <ANY>, |
| 41 | + 'last_reported': <ANY>, |
| 42 | + 'last_updated': <ANY>, |
| 43 | + 'state': 'not_home', |
| 44 | + }) |
| 45 | +# --- |
| 46 | +# name: test_webhook_update[vehicle_state-vw_id_4][lock.vw_id_4_door_lock] |
| 47 | + StateSnapshot({ |
| 48 | + 'attributes': ReadOnlyDict({ |
| 49 | + 'friendly_name': 'VW ID.4 Door Lock', |
| 50 | + 'supported_features': <LockEntityFeature: 0>, |
| 51 | + }), |
| 52 | + 'context': <ANY>, |
| 53 | + 'entity_id': 'lock.vw_id_4_door_lock', |
| 54 | + 'last_changed': <ANY>, |
| 55 | + 'last_reported': <ANY>, |
| 56 | + 'last_updated': <ANY>, |
| 57 | + 'state': 'unavailable', |
| 58 | + }) |
| 59 | +# --- |
| 60 | +# name: test_webhook_update[vehicle_state-vw_id_4][number.vw_id_4_charge_limit] |
| 61 | + StateSnapshot({ |
| 62 | + 'attributes': ReadOnlyDict({ |
| 63 | + 'friendly_name': 'VW ID.4 Charge Limit', |
| 64 | + 'icon': 'mdi:battery-charging-80', |
| 65 | + 'max': 100.0, |
| 66 | + 'min': 50.0, |
| 67 | + 'mode': <NumberMode.BOX: 'box'>, |
| 68 | + 'step': 1.0, |
| 69 | + 'unit_of_measurement': '%', |
| 70 | + }), |
| 71 | + 'context': <ANY>, |
| 72 | + 'entity_id': 'number.vw_id_4_charge_limit', |
| 73 | + 'last_changed': <ANY>, |
| 74 | + 'last_reported': <ANY>, |
| 75 | + 'last_updated': <ANY>, |
| 76 | + 'state': 'unavailable', |
| 77 | + }) |
| 78 | +# --- |
| 79 | +# name: test_webhook_update[vehicle_state-vw_id_4][sensor.vw_id_4_battery] |
| 80 | + StateSnapshot({ |
| 81 | + 'attributes': ReadOnlyDict({ |
| 82 | + 'device_class': 'battery', |
| 83 | + 'friendly_name': 'VW ID.4 Battery', |
| 84 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 85 | + 'unit_of_measurement': '%', |
| 86 | + }), |
| 87 | + 'context': <ANY>, |
| 88 | + 'entity_id': 'sensor.vw_id_4_battery', |
| 89 | + 'last_changed': <ANY>, |
| 90 | + 'last_reported': <ANY>, |
| 91 | + 'last_updated': <ANY>, |
| 92 | + 'state': 'unavailable', |
| 93 | + }) |
| 94 | +# --- |
| 95 | +# name: test_webhook_update[vehicle_state-vw_id_4][sensor.vw_id_4_battery_capacity] |
| 96 | + StateSnapshot({ |
| 97 | + 'attributes': ReadOnlyDict({ |
| 98 | + 'device_class': 'energy_storage', |
| 99 | + 'friendly_name': 'VW ID.4 Battery Capacity', |
| 100 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 101 | + 'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>, |
| 102 | + }), |
| 103 | + 'context': <ANY>, |
| 104 | + 'entity_id': 'sensor.vw_id_4_battery_capacity', |
| 105 | + 'last_changed': <ANY>, |
| 106 | + 'last_reported': <ANY>, |
| 107 | + 'last_updated': <ANY>, |
| 108 | + 'state': 'unavailable', |
| 109 | + }) |
| 110 | +# --- |
| 111 | +# name: test_webhook_update[vehicle_state-vw_id_4][sensor.vw_id_4_charging_status] |
| 112 | + StateSnapshot({ |
| 113 | + 'attributes': ReadOnlyDict({ |
| 114 | + 'friendly_name': 'VW ID.4 Charging Status', |
| 115 | + 'icon': 'mdi:ev-station', |
| 116 | + }), |
| 117 | + 'context': <ANY>, |
| 118 | + 'entity_id': 'sensor.vw_id_4_charging_status', |
| 119 | + 'last_changed': <ANY>, |
| 120 | + 'last_reported': <ANY>, |
| 121 | + 'last_updated': <ANY>, |
| 122 | + 'state': 'unavailable', |
| 123 | + }) |
| 124 | +# --- |
| 125 | +# name: test_webhook_update[vehicle_state-vw_id_4][sensor.vw_id_4_engine_oil_life] |
| 126 | + StateSnapshot({ |
| 127 | + 'attributes': ReadOnlyDict({ |
| 128 | + 'friendly_name': 'VW ID.4 Engine Oil Life', |
| 129 | + 'icon': 'mdi:oil-level', |
| 130 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 131 | + 'unit_of_measurement': '%', |
| 132 | + }), |
| 133 | + 'context': <ANY>, |
| 134 | + 'entity_id': 'sensor.vw_id_4_engine_oil_life', |
| 135 | + 'last_changed': <ANY>, |
| 136 | + 'last_reported': <ANY>, |
| 137 | + 'last_updated': <ANY>, |
| 138 | + 'state': 'unavailable', |
| 139 | + }) |
| 140 | +# --- |
| 141 | +# name: test_webhook_update[vehicle_state-vw_id_4][sensor.vw_id_4_fuel] |
| 142 | + StateSnapshot({ |
| 143 | + 'attributes': ReadOnlyDict({ |
| 144 | + 'friendly_name': 'VW ID.4 Fuel', |
| 145 | + 'icon': 'mdi:gas-station', |
| 146 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 147 | + 'unit_of_measurement': <UnitOfVolume.LITERS: 'L'>, |
| 148 | + }), |
| 149 | + 'context': <ANY>, |
| 150 | + 'entity_id': 'sensor.vw_id_4_fuel', |
| 151 | + 'last_changed': <ANY>, |
| 152 | + 'last_reported': <ANY>, |
| 153 | + 'last_updated': <ANY>, |
| 154 | + 'state': 'unavailable', |
| 155 | + }) |
| 156 | +# --- |
| 157 | +# name: test_webhook_update[vehicle_state-vw_id_4][sensor.vw_id_4_fuel_percent] |
| 158 | + StateSnapshot({ |
| 159 | + 'attributes': ReadOnlyDict({ |
| 160 | + 'friendly_name': 'VW ID.4 Fuel Percent', |
| 161 | + 'icon': 'mdi:gas-station', |
| 162 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 163 | + 'unit_of_measurement': '%', |
| 164 | + }), |
| 165 | + 'context': <ANY>, |
| 166 | + 'entity_id': 'sensor.vw_id_4_fuel_percent', |
| 167 | + 'last_changed': <ANY>, |
| 168 | + 'last_reported': <ANY>, |
| 169 | + 'last_updated': <ANY>, |
| 170 | + 'state': 'unavailable', |
| 171 | + }) |
| 172 | +# --- |
| 173 | +# name: test_webhook_update[vehicle_state-vw_id_4][sensor.vw_id_4_fuel_range] |
| 174 | + StateSnapshot({ |
| 175 | + 'attributes': ReadOnlyDict({ |
| 176 | + 'device_class': 'distance', |
| 177 | + 'friendly_name': 'VW ID.4 Fuel Range', |
| 178 | + 'icon': 'mdi:map-marker-distance', |
| 179 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 180 | + 'unit_of_measurement': <UnitOfLength.KILOMETERS: 'km'>, |
| 181 | + }), |
| 182 | + 'context': <ANY>, |
| 183 | + 'entity_id': 'sensor.vw_id_4_fuel_range', |
| 184 | + 'last_changed': <ANY>, |
| 185 | + 'last_reported': <ANY>, |
| 186 | + 'last_updated': <ANY>, |
| 187 | + 'state': 'unavailable', |
| 188 | + }) |
| 189 | +# --- |
| 190 | +# name: test_webhook_update[vehicle_state-vw_id_4][sensor.vw_id_4_odometer] |
| 191 | + StateSnapshot({ |
| 192 | + 'attributes': ReadOnlyDict({ |
| 193 | + 'device_class': 'distance', |
| 194 | + 'friendly_name': 'VW ID.4 Odometer', |
| 195 | + 'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>, |
| 196 | + 'unit_of_measurement': <UnitOfLength.KILOMETERS: 'km'>, |
| 197 | + }), |
| 198 | + 'context': <ANY>, |
| 199 | + 'entity_id': 'sensor.vw_id_4_odometer', |
| 200 | + 'last_changed': <ANY>, |
| 201 | + 'last_reported': <ANY>, |
| 202 | + 'last_updated': <ANY>, |
| 203 | + 'state': 'unavailable', |
| 204 | + }) |
| 205 | +# --- |
| 206 | +# name: test_webhook_update[vehicle_state-vw_id_4][sensor.vw_id_4_range] |
| 207 | + StateSnapshot({ |
| 208 | + 'attributes': ReadOnlyDict({ |
| 209 | + 'device_class': 'distance', |
| 210 | + 'friendly_name': 'VW ID.4 Range', |
| 211 | + 'icon': 'mdi:map-marker-distance', |
| 212 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 213 | + 'unit_of_measurement': <UnitOfLength.KILOMETERS: 'km'>, |
| 214 | + }), |
| 215 | + 'context': <ANY>, |
| 216 | + 'entity_id': 'sensor.vw_id_4_range', |
| 217 | + 'last_changed': <ANY>, |
| 218 | + 'last_reported': <ANY>, |
| 219 | + 'last_updated': <ANY>, |
| 220 | + 'state': 'unavailable', |
| 221 | + }) |
| 222 | +# --- |
| 223 | +# name: test_webhook_update[vehicle_state-vw_id_4][sensor.vw_id_4_tire_pressure_back_left] |
| 224 | + StateSnapshot({ |
| 225 | + 'attributes': ReadOnlyDict({ |
| 226 | + 'device_class': 'pressure', |
| 227 | + 'friendly_name': 'VW ID.4 Tire Pressure Back Left', |
| 228 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 229 | + 'unit_of_measurement': <UnitOfPressure.KPA: 'kPa'>, |
| 230 | + }), |
| 231 | + 'context': <ANY>, |
| 232 | + 'entity_id': 'sensor.vw_id_4_tire_pressure_back_left', |
| 233 | + 'last_changed': <ANY>, |
| 234 | + 'last_reported': <ANY>, |
| 235 | + 'last_updated': <ANY>, |
| 236 | + 'state': 'unavailable', |
| 237 | + }) |
| 238 | +# --- |
| 239 | +# name: test_webhook_update[vehicle_state-vw_id_4][sensor.vw_id_4_tire_pressure_back_right] |
| 240 | + StateSnapshot({ |
| 241 | + 'attributes': ReadOnlyDict({ |
| 242 | + 'device_class': 'pressure', |
| 243 | + 'friendly_name': 'VW ID.4 Tire Pressure Back Right', |
| 244 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 245 | + 'unit_of_measurement': <UnitOfPressure.KPA: 'kPa'>, |
| 246 | + }), |
| 247 | + 'context': <ANY>, |
| 248 | + 'entity_id': 'sensor.vw_id_4_tire_pressure_back_right', |
| 249 | + 'last_changed': <ANY>, |
| 250 | + 'last_reported': <ANY>, |
| 251 | + 'last_updated': <ANY>, |
| 252 | + 'state': 'unavailable', |
| 253 | + }) |
| 254 | +# --- |
| 255 | +# name: test_webhook_update[vehicle_state-vw_id_4][sensor.vw_id_4_tire_pressure_front_left] |
| 256 | + StateSnapshot({ |
| 257 | + 'attributes': ReadOnlyDict({ |
| 258 | + 'device_class': 'pressure', |
| 259 | + 'friendly_name': 'VW ID.4 Tire Pressure Front Left', |
| 260 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 261 | + 'unit_of_measurement': <UnitOfPressure.KPA: 'kPa'>, |
| 262 | + }), |
| 263 | + 'context': <ANY>, |
| 264 | + 'entity_id': 'sensor.vw_id_4_tire_pressure_front_left', |
| 265 | + 'last_changed': <ANY>, |
| 266 | + 'last_reported': <ANY>, |
| 267 | + 'last_updated': <ANY>, |
| 268 | + 'state': 'unavailable', |
| 269 | + }) |
| 270 | +# --- |
| 271 | +# name: test_webhook_update[vehicle_state-vw_id_4][sensor.vw_id_4_tire_pressure_front_right] |
| 272 | + StateSnapshot({ |
| 273 | + 'attributes': ReadOnlyDict({ |
| 274 | + 'device_class': 'pressure', |
| 275 | + 'friendly_name': 'VW ID.4 Tire Pressure Front Right', |
| 276 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 277 | + 'unit_of_measurement': <UnitOfPressure.KPA: 'kPa'>, |
| 278 | + }), |
| 279 | + 'context': <ANY>, |
| 280 | + 'entity_id': 'sensor.vw_id_4_tire_pressure_front_right', |
| 281 | + 'last_changed': <ANY>, |
| 282 | + 'last_reported': <ANY>, |
| 283 | + 'last_updated': <ANY>, |
| 284 | + 'state': 'unavailable', |
| 285 | + }) |
| 286 | +# --- |
| 287 | +# name: test_webhook_update[vehicle_state-vw_id_4][switch.vw_id_4_charging] |
| 288 | + StateSnapshot({ |
| 289 | + 'attributes': ReadOnlyDict({ |
| 290 | + 'friendly_name': 'VW ID.4 Charging', |
| 291 | + 'icon': 'mdi:ev-plug-type2', |
| 292 | + }), |
| 293 | + 'context': <ANY>, |
| 294 | + 'entity_id': 'switch.vw_id_4_charging', |
| 295 | + 'last_changed': <ANY>, |
| 296 | + 'last_reported': <ANY>, |
| 297 | + 'last_updated': <ANY>, |
| 298 | + 'state': 'unavailable', |
| 299 | + }) |
| 300 | +# --- |
0 commit comments