'Test rotation.'

def test_sampling_size(self):

    assert setup_component(self.hass, 'sensor', {'sensor': {'platform': 'statistics', 'name': 'test', 'entity_id': 'sensor.test_monitored', 'sampling_size': 5}})
    for value in self.values:
        self.hass.states.set('sensor.test_monitored', value, {ATTR_UNIT_OF_MEASUREMENT: TEMP_CELSIUS})
        self.hass.block_till_done()
    state = self.hass.states.get('sensor.test_mean')
    self.assertEqual(3.8, state.attributes.get('min_value'))
    self.assertEqual(14, state.attributes.get('max_value'))
