'Test for successfully setting up the Efergy platform.'

@requests_mock.Mocker()
def test_single_sensor_readings(self, mock):

    mock_responses(mock)
    assert setup_component(self.hass, 'sensor', {'sensor': ONE_SENSOR_CONFIG})
    self.assertEqual('38.21', self.hass.states.get('sensor.energy_consumed').state)
    self.assertEqual('1580', self.hass.states.get('sensor.energy_usage').state)
    self.assertEqual('ok', self.hass.states.get('sensor.energy_budget').state)
    self.assertEqual('5.27', self.hass.states.get('sensor.energy_cost').state)
    self.assertEqual('1628', self.hass.states.get('sensor.efergy_728386').state)
