'Setup ffmpeg component.'

@patch('haffmpeg.SensorNoise')
def test_setup_component_start_callback(self, mock_ffmpeg):

    with assert_setup_component(1, 'binary_sensor'):
        setup_component(self.hass, 'binary_sensor', self.config)
    assert (self.hass.data['ffmpeg'].binary == 'ffmpeg')
    assert (self.hass.states.get('binary_sensor.ffmpeg_noise') is not None)
    self.hass.start()
    entity = self.hass.states.get('binary_sensor.ffmpeg_noise')
    assert (entity.state == 'off')
    self.hass.add_job(mock_ffmpeg.call_args[0][2], True)
    self.hass.block_till_done()
    entity = self.hass.states.get('binary_sensor.ffmpeg_noise')
    assert (entity.state == 'on')
