Skip to content

Commit

Permalink
dep: updated viessmann-gridbox-connector -> 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
unl0ck committed May 10, 2024
1 parent b3ff938 commit 9048bdc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion GridboxConnectorAddon-dev/GridboxConnector/main_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,20 @@ def test_main(self, mock_retrieve_live_data, mock_init, mock_init_auth,mock_mqtt
mqtt_settings)

with patch.object(viessmann_gridbox_connector.self_supply_sensor, 'set_state') as mock_self_supply_sensor, \
patch.object(viessmann_gridbox_connector.self_consumtion_rate_sensor, 'set_state') as mock_self_consumtion_rate_sensor:
patch.object(viessmann_gridbox_connector.self_consumtion_rate_sensor, 'set_state') as mock_self_consumtion_rate_sensor, \
patch.object(viessmann_gridbox_connector.consumption_household_sensor, 'set_state') as mock_consumption_household_sensor, \
patch.object(viessmann_gridbox_connector.direct_consumption_household_sensor, 'set_state') as mock_direct_consumption_household_sensor, \
patch.object(viessmann_gridbox_connector.direct_consumtion_heatpump_sensor, 'set_state') as mock_direct_consumtion_heatpump_sensor, \
patch.object(viessmann_gridbox_connector.direct_consumtion_rate_sensor, 'set_state') as mock_direct_consumtion_rate_sensor, \
patch.object(viessmann_gridbox_connector.self_sufficiency_rate_sensor, 'set_state') as mock_self_sufficiency_rate_sensor:
viessmann_gridbox_connector.update_sensors(result)
mock_self_supply_sensor.assert_called_once_with(600.0)
mock_self_consumtion_rate_sensor.assert_called_once_with(96.09788359788359)
mock_consumption_household_sensor.assert_called_once_with(600)
mock_direct_consumption_household_sensor.assert_called_once_with(600.0)
mock_direct_consumtion_heatpump_sensor.assert_called_once_with(0.0)
mock_direct_consumtion_rate_sensor.assert_called_once_with(39.682539682539684)
mock_self_sufficiency_rate_sensor.assert_called_once_with(100.0)

if __name__ == '__main__':
unittest.main()
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ha-mqtt-discoverable==0.13.1
requests==2.31.0
viessmann-gridbox-connector==1.0.1
viessmann-gridbox-connector==1.0.2
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ha-mqtt-discoverable==0.13.1
requests==2.31.0
viessmann-gridbox-connector==1.0.1
viessmann-gridbox-connector==1.0.2

0 comments on commit 9048bdc

Please sign in to comment.