'Setup ffmpeg component.'

@patch('haffmpeg.SensorMotion.open_sensor', return_value=mock_coro())
def test_setup_component_start(self, mock_start):

    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_motion') is not None)
    self.hass.start()
    assert mock_start.called
    entity = self.hass.states.get('binary_sensor.ffmpeg_motion')
    assert (entity.state == 'unavailable')
