|
112 | 112 | 'last_changed': <ANY>, |
113 | 113 | 'last_reported': <ANY>, |
114 | 114 | 'last_updated': <ANY>, |
115 | | - 'state': '0', |
| 115 | + 'state': '123', |
116 | 116 | }) |
117 | 117 | # --- |
118 | 118 | # name: test_sensors[sensor.balcon_today_energy-entry] |
|
286 | 286 | 'last_changed': <ANY>, |
287 | 287 | 'last_reported': <ANY>, |
288 | 288 | 'last_updated': <ANY>, |
289 | | - 'state': '0', |
| 289 | + 'state': '1223', |
290 | 290 | }) |
291 | 291 | # --- |
292 | 292 | # name: test_sensors[sensor.overview_today_energy-entry] |
|
347 | 347 | 'state': '1.54', |
348 | 348 | }) |
349 | 349 | # --- |
| 350 | +# name: test_sensors[sensor.rooftop_lifetime_energy-entry] |
| 351 | + EntityRegistryEntrySnapshot({ |
| 352 | + 'aliases': list([ |
| 353 | + None, |
| 354 | + ]), |
| 355 | + 'area_id': None, |
| 356 | + 'capabilities': dict({ |
| 357 | + 'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>, |
| 358 | + }), |
| 359 | + 'config_entry_id': <ANY>, |
| 360 | + 'config_subentry_id': <ANY>, |
| 361 | + 'device_class': None, |
| 362 | + 'device_id': <ANY>, |
| 363 | + 'disabled_by': None, |
| 364 | + 'domain': 'sensor', |
| 365 | + 'entity_category': None, |
| 366 | + 'entity_id': 'sensor.rooftop_lifetime_energy', |
| 367 | + 'has_entity_name': True, |
| 368 | + 'hidden_by': None, |
| 369 | + 'icon': None, |
| 370 | + 'id': <ANY>, |
| 371 | + 'labels': set({ |
| 372 | + }), |
| 373 | + 'name': None, |
| 374 | + 'object_id_base': 'Lifetime energy', |
| 375 | + 'options': dict({ |
| 376 | + 'sensor': dict({ |
| 377 | + 'suggested_display_precision': 2, |
| 378 | + }), |
| 379 | + }), |
| 380 | + 'original_device_class': <SensorDeviceClass.ENERGY: 'energy'>, |
| 381 | + 'original_icon': None, |
| 382 | + 'original_name': 'Lifetime energy', |
| 383 | + 'platform': 'hypontech', |
| 384 | + 'previous_unique_id': None, |
| 385 | + 'suggested_object_id': None, |
| 386 | + 'supported_features': 0, |
| 387 | + 'translation_key': 'lifetime_energy', |
| 388 | + 'unique_id': '3123456789123456789_lifetime_energy', |
| 389 | + 'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>, |
| 390 | + }) |
| 391 | +# --- |
| 392 | +# name: test_sensors[sensor.rooftop_lifetime_energy-state] |
| 393 | + StateSnapshot({ |
| 394 | + 'attributes': ReadOnlyDict({ |
| 395 | + 'device_class': 'energy', |
| 396 | + 'friendly_name': 'Rooftop Lifetime energy', |
| 397 | + 'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>, |
| 398 | + 'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>, |
| 399 | + }), |
| 400 | + 'context': <ANY>, |
| 401 | + 'entity_id': 'sensor.rooftop_lifetime_energy', |
| 402 | + 'last_changed': <ANY>, |
| 403 | + 'last_reported': <ANY>, |
| 404 | + 'last_updated': <ANY>, |
| 405 | + 'state': '100.0', |
| 406 | + }) |
| 407 | +# --- |
| 408 | +# name: test_sensors[sensor.rooftop_power-entry] |
| 409 | + EntityRegistryEntrySnapshot({ |
| 410 | + 'aliases': list([ |
| 411 | + None, |
| 412 | + ]), |
| 413 | + 'area_id': None, |
| 414 | + 'capabilities': dict({ |
| 415 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 416 | + }), |
| 417 | + 'config_entry_id': <ANY>, |
| 418 | + 'config_subentry_id': <ANY>, |
| 419 | + 'device_class': None, |
| 420 | + 'device_id': <ANY>, |
| 421 | + 'disabled_by': None, |
| 422 | + 'domain': 'sensor', |
| 423 | + 'entity_category': None, |
| 424 | + 'entity_id': 'sensor.rooftop_power', |
| 425 | + 'has_entity_name': True, |
| 426 | + 'hidden_by': None, |
| 427 | + 'icon': None, |
| 428 | + 'id': <ANY>, |
| 429 | + 'labels': set({ |
| 430 | + }), |
| 431 | + 'name': None, |
| 432 | + 'object_id_base': 'Power', |
| 433 | + 'options': dict({ |
| 434 | + 'sensor': dict({ |
| 435 | + 'suggested_display_precision': 2, |
| 436 | + }), |
| 437 | + }), |
| 438 | + 'original_device_class': <SensorDeviceClass.POWER: 'power'>, |
| 439 | + 'original_icon': None, |
| 440 | + 'original_name': 'Power', |
| 441 | + 'platform': 'hypontech', |
| 442 | + 'previous_unique_id': None, |
| 443 | + 'suggested_object_id': None, |
| 444 | + 'supported_features': 0, |
| 445 | + 'translation_key': None, |
| 446 | + 'unique_id': '3123456789123456789_pv_power', |
| 447 | + 'unit_of_measurement': <UnitOfPower.KILO_WATT: 'kW'>, |
| 448 | + }) |
| 449 | +# --- |
| 450 | +# name: test_sensors[sensor.rooftop_power-state] |
| 451 | + StateSnapshot({ |
| 452 | + 'attributes': ReadOnlyDict({ |
| 453 | + 'device_class': 'power', |
| 454 | + 'friendly_name': 'Rooftop Power', |
| 455 | + 'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>, |
| 456 | + 'unit_of_measurement': <UnitOfPower.KILO_WATT: 'kW'>, |
| 457 | + }), |
| 458 | + 'context': <ANY>, |
| 459 | + 'entity_id': 'sensor.rooftop_power', |
| 460 | + 'last_changed': <ANY>, |
| 461 | + 'last_reported': <ANY>, |
| 462 | + 'last_updated': <ANY>, |
| 463 | + 'state': '1', |
| 464 | + }) |
| 465 | +# --- |
| 466 | +# name: test_sensors[sensor.rooftop_today_energy-entry] |
| 467 | + EntityRegistryEntrySnapshot({ |
| 468 | + 'aliases': list([ |
| 469 | + None, |
| 470 | + ]), |
| 471 | + 'area_id': None, |
| 472 | + 'capabilities': dict({ |
| 473 | + 'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>, |
| 474 | + }), |
| 475 | + 'config_entry_id': <ANY>, |
| 476 | + 'config_subentry_id': <ANY>, |
| 477 | + 'device_class': None, |
| 478 | + 'device_id': <ANY>, |
| 479 | + 'disabled_by': None, |
| 480 | + 'domain': 'sensor', |
| 481 | + 'entity_category': None, |
| 482 | + 'entity_id': 'sensor.rooftop_today_energy', |
| 483 | + 'has_entity_name': True, |
| 484 | + 'hidden_by': None, |
| 485 | + 'icon': None, |
| 486 | + 'id': <ANY>, |
| 487 | + 'labels': set({ |
| 488 | + }), |
| 489 | + 'name': None, |
| 490 | + 'object_id_base': 'Today energy', |
| 491 | + 'options': dict({ |
| 492 | + 'sensor': dict({ |
| 493 | + 'suggested_display_precision': 2, |
| 494 | + }), |
| 495 | + }), |
| 496 | + 'original_device_class': <SensorDeviceClass.ENERGY: 'energy'>, |
| 497 | + 'original_icon': None, |
| 498 | + 'original_name': 'Today energy', |
| 499 | + 'platform': 'hypontech', |
| 500 | + 'previous_unique_id': None, |
| 501 | + 'suggested_object_id': None, |
| 502 | + 'supported_features': 0, |
| 503 | + 'translation_key': 'today_energy', |
| 504 | + 'unique_id': '3123456789123456789_today_energy', |
| 505 | + 'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>, |
| 506 | + }) |
| 507 | +# --- |
| 508 | +# name: test_sensors[sensor.rooftop_today_energy-state] |
| 509 | + StateSnapshot({ |
| 510 | + 'attributes': ReadOnlyDict({ |
| 511 | + 'device_class': 'energy', |
| 512 | + 'friendly_name': 'Rooftop Today energy', |
| 513 | + 'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>, |
| 514 | + 'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>, |
| 515 | + }), |
| 516 | + 'context': <ANY>, |
| 517 | + 'entity_id': 'sensor.rooftop_today_energy', |
| 518 | + 'last_changed': <ANY>, |
| 519 | + 'last_reported': <ANY>, |
| 520 | + 'last_updated': <ANY>, |
| 521 | + 'state': '2.5', |
| 522 | + }) |
| 523 | +# --- |
0 commit comments