'Test down trend.'

def test_down(self):

    assert setup.setup_component(self.hass, 'binary_sensor', {'binary_sensor': {'platform': 'trend', 'sensors': {'test_trend_sensor': {'entity_id': 'sensor.test_state'}}}})
    self.hass.states.set('sensor.test_state', '2')
    self.hass.block_till_done()
    self.hass.states.set('sensor.test_state', '1')
    self.hass.block_till_done()
    state = self.hass.states.get('binary_sensor.test_trend_sensor')
    assert (state.state == 'off')
