@@ -53,7 +53,7 @@ def mock_daily_log(monkeypatch):
5353def test_calc_charge_cost_reference_middle (mock_data , monkeypatch ):
5454 cp = Chargepoint (4 , None )
5555 cp .data .set .log .imported_since_plugged = cp .data .set .log .imported_since_mode_switch = 3950
56- cp .data .set .log .timestamp_start_charging = 1652682600 # 8:30
56+ cp .data .set .log .timestamp_mode_switch = 1652682600 # 8:30
5757 cp .data .get .imported = 4050
5858 cp .data .set .log .charged_energy_by_source = {'bat' : 100 , 'cp' : 0 , 'grid' : 100 , 'pv' : 100 }
5959 daily_log = mock_daily_log (monkeypatch )
@@ -69,7 +69,7 @@ def test_calc_charge_cost_reference_middle(mock_data, monkeypatch):
6969def test_calc_charge_cost_reference_start (mock_data , monkeypatch ):
7070 cp = Chargepoint (4 , None )
7171 cp .data .set .log .imported_since_plugged = cp .data .set .log .imported_since_mode_switch = 100
72- cp .data .set .log .timestamp_start_charging = 1652683230 # 8:40:30
72+ cp .data .set .log .timestamp_mode_switch = 1652683230 # 8:40:30
7373 cp .data .get .imported = 4100
7474 cp .data .set .log .charged_energy_by_source = {'bat' : 0 , 'cp' : 0 , 'grid' : 0 , 'pv' : 0 }
7575 daily_log = mock_daily_log (monkeypatch )
@@ -85,7 +85,7 @@ def test_calc_charge_cost_reference_start(mock_data, monkeypatch):
8585def test_calc_charge_cost_reference_end (mock_data , monkeypatch ):
8686 cp = Chargepoint (4 , None )
8787 cp .data .set .log .imported_since_plugged = cp .data .set .log .imported_since_mode_switch = 3950
88- cp .data .set .log .timestamp_start_charging = 1652682600 # 8:30
88+ cp .data .set .log .timestamp_mode_switch = 1652682600 # 8:30
8989 cp .data .get .imported = 4100
9090 cp .data .set .log .charged_energy_by_source = {'grid' : 1243 , 'pv' : 386 , 'bat' : 671 , 'cp' : 0.0 }
9191 daily_log = mock_daily_log (monkeypatch )
@@ -100,7 +100,7 @@ def test_calc_charge_cost_reference_end(mock_data, monkeypatch):
100100def test_calc_charge_cost_reference_middle_day_change (mock_data , monkeypatch ):
101101 cp = Chargepoint (4 , None )
102102 cp .data .set .log .imported_since_plugged = cp .data .set .log .imported_since_mode_switch = 3950
103- cp .data .set .log .timestamp_start_charging = 1652682600 # 8:30
103+ cp .data .set .log .timestamp_mode_switch = 1652682600 # 8:30
104104 cp .data .get .imported = 4050
105105 cp .data .set .log .charged_energy_by_source = {'bat' : 100 , 'cp' : 0 , 'grid' : 100 , 'pv' : 100 }
106106 yesterday_daily_log = {"entries" : [{'bat' : {'all' : {'exported' : 2000 , 'imported' : 2000 , 'soc' : 100 },
0 commit comments