mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
parent
b4238443c8
commit
1e05c81fe6
@ -220,7 +220,7 @@ async def test_cost_sensor_price_entity(
|
|||||||
hass.states.async_set(
|
hass.states.async_set(
|
||||||
usage_sensor_entity_id,
|
usage_sensor_entity_id,
|
||||||
"14",
|
"14",
|
||||||
{ATTR_UNIT_OF_MEASUREMENT: ENERGY_KILO_WATT_HOUR},
|
energy_attributes,
|
||||||
)
|
)
|
||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
state = hass.states.get(cost_sensor_entity_id)
|
state = hass.states.get(cost_sensor_entity_id)
|
||||||
|
@ -359,6 +359,7 @@ def test_compile_hourly_sum_statistics_total_increasing_small_dip(
|
|||||||
assert stats == {
|
assert stats == {
|
||||||
"sensor.test1": [
|
"sensor.test1": [
|
||||||
{
|
{
|
||||||
|
"last_reset": None,
|
||||||
"statistic_id": "sensor.test1",
|
"statistic_id": "sensor.test1",
|
||||||
"start": process_timestamp_to_utc_isoformat(zero),
|
"start": process_timestamp_to_utc_isoformat(zero),
|
||||||
"max": None,
|
"max": None,
|
||||||
@ -368,6 +369,7 @@ def test_compile_hourly_sum_statistics_total_increasing_small_dip(
|
|||||||
"sum": approx(factor * 10.0),
|
"sum": approx(factor * 10.0),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"last_reset": None,
|
||||||
"statistic_id": "sensor.test1",
|
"statistic_id": "sensor.test1",
|
||||||
"start": process_timestamp_to_utc_isoformat(zero + timedelta(hours=1)),
|
"start": process_timestamp_to_utc_isoformat(zero + timedelta(hours=1)),
|
||||||
"max": None,
|
"max": None,
|
||||||
@ -377,6 +379,7 @@ def test_compile_hourly_sum_statistics_total_increasing_small_dip(
|
|||||||
"sum": approx(factor * 30.0),
|
"sum": approx(factor * 30.0),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"last_reset": None,
|
||||||
"statistic_id": "sensor.test1",
|
"statistic_id": "sensor.test1",
|
||||||
"start": process_timestamp_to_utc_isoformat(zero + timedelta(hours=2)),
|
"start": process_timestamp_to_utc_isoformat(zero + timedelta(hours=2)),
|
||||||
"max": None,
|
"max": None,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user